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

iOS build failed - please fix this line addressComponent[@"types"] = place.addressComponents[i].type; #225

Closed
bear-junior opened this issue May 20, 2019 · 8 comments

Comments

@bear-junior
Copy link

As is - BUILD FAILED:
addressComponent[@"types"] = place.addressComponents[i].types;

Should be:
addressComponent[@"types"] = place.addressComponents[i].type;

in NSMutableDictionary+GMSPlace.m

@tolu360
Copy link
Owner

tolu360 commented May 20, 2019

I answered this in a closed issue which I have just pinned - please take a look there. Would leave this open for others to see. Cheers!

@bear-junior
Copy link
Author

@tolu360 still visible after pod update...

@tolu360
Copy link
Owner

tolu360 commented May 20, 2019

Can you check the version you are currently on in your Podfile.lock file? If you are on 3.1.0 or above, clean and rebuild your project, you should be fine - I ran into same issue while reviewing and testing PRs.

@bear-junior
Copy link
Author

if I try to set version in Podfile to 3.1.0, after pod update I have this error -

CocoaPods could not find compatible versions for pod "GoogleMaps":
In Podfile:
GoogleMaps

react-native-google-maps (from `../node_modules/react-native-maps`) was resolved to 0.24.0, which depends on
  GoogleMaps (= 3.0.3)

CocoaPods could not find compatible versions for pod "GoogleMaps/Base":
In Podfile:
GooglePlaces (= 3.1.0) was resolved to 3.1.0, which depends on
GoogleMaps/Base (= 3.1.0)

react-native-google-maps (from `../node_modules/react-native-maps`) was resolved to 0.24.0, which depends on
  GoogleMaps (= 3.0.3) was resolved to 3.0.3, which depends on
    GoogleMaps/Maps (= 3.0.3) was resolved to 3.0.3, which depends on
      GoogleMaps/Base (= 3.0.3)

@bear-junior
Copy link
Author

So I'm on 3.0.3 version

@tolu360
Copy link
Owner

tolu360 commented May 20, 2019

So there goes your error - your pods were not updated to 3.1.0 the first time either and that was because react-native-google-maps was depending on 3.0.3. Just so you can continue with your development, you can temporarily leave in the types to type correction you made earlier - your project would build with that in place but you would not have consistent response format with Android (if your project is cross-platform), as only types is available on Android.

@bear-junior
Copy link
Author

yup, I can change types to type locally, but still - without patch it won't work on CI

@tolu360
Copy link
Owner

tolu360 commented May 20, 2019

So running a patch is easy, or force both react-native-google-maps and react-native-google-places to use 3.1.0 - either would make your CI build happy!

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

2 participants