Google Maps iOS base map not rendering without SDK on *some* devices

I’d like to report an interesting thing with the MapView. Prior to 27, Google Maps was working just fine.
After 27 the following happened:

  • On TestFlight the map style would not render for some iOS users. Both with base default and a custom style.
  • In an iOS Simulator ipa install, the map style would never render.
  • However on both Testflight and Simulator, the markers and such would still paint and the Google logo showed up, and the map was interactive. ONLY that the base style (roads, buildings, etc) does not load.
  • On Expo, the map worked normally as before.

Upon activating the iOS SDK on Google API Console (attached to the given API key), fixes this problem 100% across the board.

So I suspect the “bug” is that it appears MapView recently is not able to grab the native Google Maps installation on the phone. The bug is not device specific because it occurred to random people on our beta testing team, even with the same devices running. Is there something with cacheEnabled? (We don’t set that option).

Again the funny thing is that the map is fully operational, meaning you can drag and zoom. It just simply doesn’t load the tiles.

1 Like

Hi @ericjames - I’m surprised that it worked for you on some devices without activating the iOS SDK on the console! iOS apps are not able to easily see what other apps are installed so it’s not surprising that your app could not get any information from the installation - you need to include all keys with your own app. The reason it works on the Expo app is because we have our own API key tied to Expo’s bundle identifier, but you need to have an active API key for it to work in your standalone app.

Yeah I feel like something is amiss because we are definitely not registering as many iOS SDK hits on our API key as we should be.

Is it possible that React-Native-Maps is somehow able to read from an existing Google Maps app installation on the phone (like how Apple Maps comes via Swift MapKit)? That would seem like an API loophole though.

Perhaps the final bundled app is still reading the Expo API key, something to investigate for your team so you don’t get charged.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.