Skip to content
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

Link failed on 0.10.0 #653

Closed
stephanemaillard opened this issue Oct 6, 2016 · 12 comments
Closed

Link failed on 0.10.0 #653

stephanemaillard opened this issue Oct 6, 2016 · 12 comments

Comments

@stephanemaillard
Copy link

After upgrading react-native-maps to 0.10.0, the linking failed because it can't find the following file

node_modules/react-native-maps/ios/AirGoogleMaps.xcodeproj/project.pbxproj
@aprihodko
Copy link

+1

@aprihodko
Copy link

Same is true for a v0.9.0

@kelset
Copy link

kelset commented Oct 6, 2016

Looks like #656 is the same error, but since it is the older I'll write what I found out digging: by looking at the docs regarding the manual linking it doesn't link AirGoogleMaps BUT AIRMaps.
That said, it seems that AirGoogleMaps is the one required when using GoogleMapsSDK on iOS, which may require some additional installation(?) - and AirMaps is the standard iOS.

Moreover, in my node_modules/react-native-maps/ios/AirGoogleMaps.xcodeproj/ folder there is a project. file but its extension is different, .xcworkspace - so in the end it may be simply that.

@cipick
Copy link

cipick commented Oct 7, 2016

+1

1 similar comment
@olegdeezus
Copy link

+1

@ippa
Copy link

ippa commented Oct 9, 2016

bitten by this as well

@gilbox
Copy link
Contributor

gilbox commented Oct 9, 2016

There is no AirGoogleMaps.xcodeproj because if you are going to use GoogleMaps on iOS, including the xcodeproj file in your project file is not a valid way to compile. If you want to stick with MapKit, you shouldn't need any AirGoogleMaps-related files. If you want to use GoogleMaps then you should use Option 1 (or for the more adventurous, Option 2).

@jgkim
Copy link

jgkim commented Oct 10, 2016

In addition to the above comment by @gilbox, if you don't want to use CocoaPods, you can install Google Maps SDK for iOS manually by following the instruction. Then, use the Option 3 and do the following:

  1. Open your project in XCode

  2. Drag the following folder into your project: node_modules/react-native-maps/ios/AirGoogleMaps/

  3. Click on the project and go the Build Settings tab. Double click the text to the right of Header Search Paths and verify that it has $(SRCROOT)/../../react-native/React as well as the below:

    • $(SRCROOT)/../../react-native/Libraries/ActionSheetIOS
    • $(SRCROOT)/../../react-native/Libraries/Geolocation
    • $(SRCROOT)/../../react-native/Libraries/Network
    • $(SRCROOT)/../../react-native/Libraries/Image
    • $(SRCROOT)/../../react-native/Libraries/LinkingIOS
    • $(SRCROOT)/../../react-native/Libraries/Settings
    • $(SRCROOT)/../../react-native/Libraries/Text
    • $(SRCROOT)/../../react-native/Libraries/Vibration
    • $(SRCROOT)/../../react-native/Libraries/WebSocket

    if they aren't, then add them. This is so XCode is able to find the headers that the AirGoogleMaps source files are referring to by pointing to the header files installed within the react-native node_modules directory.

If you need to use GoogleMaps, you also need to set the API key in AppDelegate.m or elsewhere.

@gilbox
Copy link
Contributor

gilbox commented Oct 10, 2016

According to Google:

From version 1.10.0 onwards, the Google Maps SDK for iOS is available for installation only via CocoaPods.

That's why we don't support Option 3 with GoogleMaps on iOS.

@aprihodko
Copy link

@gilbox Why it does not work with a "react-native link"? I personally do not need a new Google Maps engine. But there is only one possible option to link a react-native-maps is to install v. 0.8.2, link it and then upgrade react-native-maps to a most recent version. But running a "react-native link" again will not work

@kelset
Copy link

kelset commented Oct 10, 2016

imho @aprihodko has a point, given what you guys said: maybe rnpm link should not try at all linking Google Maps SDK for iOS - ofc this would also mean (maybe) modifying the installation docs saying that the GMaps SDK for iOS is only available using the other ways.

@alvelig
Copy link
Contributor

alvelig commented Dec 9, 2017

I recently made a fresh example build with pods and GoogleMaps with no issues.
https://github.com/alvelig/react-native-maps-pods-example.
Try to check it out or build through the README.MD. If it does not help, let me know.

@alvelig alvelig closed this as completed Dec 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants