-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Remove AirGoogleMaps from AirMaps.xcodeproj #2310
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
Conversation
Nice! it working for me :) |
+1 I think google maps shouldn't be auto-included if the build breaks by default. |
+1 |
I drafted this up for non-cocoapoders: https://gist.github.com/theonetheycallneo/bea215ebfbc7d7ade422458f60760df1 |
This should be the default behaviour of this library, thanks @mikemorris. |
+1. Putting
in my package.json avoids the problem. |
@alvaromb @alvelig can you guys have a look at this as it seems to be related to #1954 (comment) 🐽 |
Well, makes sense. So just to declare: we won't include GMaps by default. Developers are responsible for adding it manually themselves. Is it ok? |
That's ok @alvelig, thanks. |
@jdonald I would use specific commit imho. |
non-pods installation instructions are missing |
@alvelig In the spirit of #1954 (comment) I wasn't attempting to add a documented or "endorsed" installation method, just removing an obstacle to upgrading for users who have chosen to install in an undocumented manner by restoring prior behavior. I'd be happy to document a non-Cocoapods installation in a separate PR if that would be desirable. |
@mikemorris the problem is that it breaks current installation instruction process, doesn't it? Do we need to modify current installation instructions? |
It shouldn't, but would be good to confirm. The existing Cocoapods installation instructions should still work just fine, pulling down the Google Maps SDK as a pod instead of expecting it to already exist in the project. |
@rborn could you check please, as you made the actual installation instructions, if they still work as they are. To have them up to date with the changes we make. TY! |
@alvelig I'll do it after 5th of August, I'll be offline starting tomorrow :) |
Thanks! Happy holiday :D |
@rborn we're testing this installation tomorrow. I'll ping you if it works ok. |
My goal was to install and use Google Maps. I ended up on this issue & initially misunderstood what it does. For what it's worth, after installing, I started from the instructions here and am successfully running on iOS w/ Google Maps without CocoaPods & using I'm not quite sure where to suggest it, but here's the changes that I made to the installation instructions: < Make sure your GoogleMapsBase.framework, GoogleMapsCore.framdwork, and GoogleMaps.framework are all listed in the Compiled Sources.
< ** You might need to drag them into Embedded Frameworks depending your Xcode project setup too.
< - Search Xcode Build Settings for "Header Paths" and add your new framwork folder from above:
< ```
< $(SRCROOT)/Frameworks/Google-Maps-iOS-Utils
< ```
< 4. Install AirMaps React Native Wrapper
< - Open
< ```
< $(GITROOT)/node_modules/react-native-maps/lib/ios
< ```
< - Drag both folders into your Xcode project and ignore the Airmaps.xcproject
< ```
< $(GITROOT)/node_modules/react-native-maps/lib/ios/AirGoogleMaps
< $(GITROOT)/node_modules/react-native-maps/lib/ios/AirMaps
< ```
---
> Make sure your GoogleMapsBase.framework, GoogleMapsCore.framdwork, and GoogleMaps.framework are all listed in the _Link Binary With Libraries_ section.
>
> 4. Link required frameworks
>
> In the _Link Binary With Libraries_ section, click the plus button to link the following frameworks:
>
> - `GLKit.framework`
> - `CoreData.framework`
>
> Note that there are quite a few other frameworks that Google suggests linking that may be required for other uses of the framework and/or `react-native-maps`, but these should get you started. Reference the start guide from above for additional frameworks that should be linked.
42c36
< 5. Now link
---
> 5. Now link
44c38
< react-native link
---
> react-native link react-native-maps
46d39
< We run this command to link the Android side (which works fine as-is) and make sure once we can still successfully link npm updates. An example of a library that has optional iOS dependencies that require removal in order to use them is Perhaps all of the AirMaps file could be wrapped in an |
@mikemorris @alvelig @rbor I've opened #2396 which allows |
I can confirm this installation made by @mikemorris works perfect under iOS with Haven't tested @wbyoung PR, but it looks nice in order to ease the support of Google Maps for iOS. |
I was also able to use this library without cocoapods by using commit #ef5c839252e427268ae2ebbf4f0cced1cb51fed6. I now only run |
Are there plans to merge this PR? |
@mikemorris Do you have an eta for when this PR will be merged? |
@jamesone Nope, as I don't have commit access. It's working for myself, and a few others per the comments above though, so I'd very much like to see it merged and released soon! |
I just tested this PR on my Simulator (#2310) and everything is working as expected 🥇 ENV:
|
@jamesone did you install the google maps manually to the project and just replace the node module reference? wondering if I should clear cache too |
@icemancast I didn't setup Google maps. I used the default (Apple maps) I would suggest removing node_modules, clearing the cache, reinstalling, and then restarting the dev server.
|
Thanks @jamesone , I finally got it working. I used the pr as my library until they merge it in and then installed google maps manually per google sdk docs. That and a couple back flips made it work! |
@mikemorris have you had a chance to try #2396 which should solve the same problem? There’s been some discussion over there and it may help to get your feedback to see if it also resolves your problems as well. I think/hope it likely will. |
@wbyoung @mikemorris did't have the chance to test the last push to #2396 that fixes the markers (as far as I remember) so maybe if somebody could do it we'll push for it |
If anybody needs something tested, please let me know 👍Happy to help |
@rborn @wbyoung I'm kinda philosophically opposed to the approach of leaving a vendored library committed in this repo. The changes in #2396 look good, but I'd kinda like to see that happen in addition to removing this dependency and recommending Cocoapods to manage the dependency if there's a desire to use Google Maps on iOS. |
@mikemorris maybe you can work with @wbyoung toward this? 🤗 |
@mikemorris the changes in #2396 don’t add the vendored Google frameworks/libraries to the repository. They leave that as the user’s responsibility during install (only if not using CocoaPods). The choice of committing those files or managing them in another way is entirely deferred to the user. What #2396 does is basically remove all of the AirGoogleMaps files but with preprocessor conditionals. So it’s essentially exactly the same as this PR in the default case. The subtle difference is that compiler will still see the files, but won’t produce any instructions as a result. And when desired, that conditional can be flipped on so the files do get compiled. Personally, I have the desire to avoid using CocoaPods for the project that I’m integrating this into while needing to use Google Maps as well. I’d imagine others will at some point have the same preferences and/or needs. While I understand the superiority of CocoaPods for this specific case (especially since some dependencies aren’t pre-built & since many in the RN community don’t know Xcode well), I think it’s still important to have the option. |
@wbyoung Ack, yea okay seeing that now - for some reason I was thinking that Your approach looks good, I'll test it this weekend. |
Closing in favor of #2396 |
Does any other open PR do the same thing?
No
What issue(s) is this PR fixing?
#2159, #2270
The non-Cocoapods manual install instructions appear to be gone, but IIRC it was previously required to manually link the Google Maps libraries in your Xcode project if you wished to use Google Maps on iOS - this patch restores that behaviour.
How did you test this PR?
npm link
with the patch applied onmaster
into a project where I was reproducing #2270, after usinggit bisect
to identify the likely first bad commit.