-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflicting Frameworks #37
Comments
Thanks for the detailed workaround. The issue was obviously known but for projects that do not include GoogleMaps this pod must specify them as dependency. Maybe there is some way to add the dependencies as a subspec or so (thus making them optional) |
Well the pod still does specify them as a dependency, it just tells Cocoapods that the frameworks are required and leaves the installation to it. That way if you have multiple pods that require the same framework, it will only be resolved once. Why would you want to make them optional? Aren't those frameworks required? I guess I don't understand the goal. |
Oh I see. I thought they were removed. |
Done. You'll have to take a look and let me know if I missed anything dumb. |
I was having a bunch of issues using this with my project. My project has Firebase installed, which includes a bunch of Google libraries by default.
This framework bundles older versions of GooglePlaces and GoogleMaps base along with, which causes a bunch of errors on launch complaining about the duplication of symbols. The framework also doesn't work, even though I'm setting my API key the app was telling me I didn't have authentication.
The issue was that when I set the API key, that was happening on a different copy of the framework as the one the GooglePlacesRow was trying to use.
My fix is pretty simple, instead of bundling the Google frameworks, just tell Cocoapods that there are dependencies on GooglePlaces and GoogleMaps/Base and let it figure everything out. This removed the duplicate copy and everything worked as expected. You also have to tell Cocoapods that this framework is now a static framework, because the Google frameworks are also static. This didn't seem to have any ill effects.
You can see the changes I made to the pod spec file in my fork here: https://github.com/Vortec4800/GooglePlacesRow/blob/master/GooglePlacesRow.podspec
The only other thing I had to do was also import GoogleMapsBase in the Row swift file, as it's no longer included by default.
The text was updated successfully, but these errors were encountered: