Expo SDK 33 + custom iOS Expo Client + MapView Issue

I have been using the MapView component with the Google Provider in my app with no problems - iOS Expo Client, Android Expo Client, TestFlight build, Android standalone build. With Background Location not being currently available in the App Store Expo Client, I’ve created an iOS custom build of the Expo Client to have access to this feature. However when I run the app in the custom client it crashes with -

Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] prior to use

I have the Google Maps API Key in app.json . . .

{
  "expo": {
    . . .
    "ios": {
      "bundleIdentifier": "nz.co.bosun.swarm",
      "infoPlist": {
        "UIBackgroundModes": [
          "location",
          "fetch"
        ],
      },
      "config": {
        "googleMapsApiKey": "####################"
      }
    }
  }
}

I’ve also tried to add the api key here too . . .

    "ios": {
        "infoPlist": {
            . . .
            "GMSApiKey": "####################"
         }
      },

Does perhaps the built Expo Client itself require the API key?
Is anyone else having success with Expo SDK 33 + custom iOS Expo Client + MapView + Google Provider?

I’ve tried with the most recent two Expo CLI versions - 2.19.5 and 2.20.0

1 Like

Anybody?

I’m having a similar issue. Not using Google Provider but am on the latest SDK, using a custom Expo client for iOS and trying to use MapView and it’s crashing the app every time.

Any insight here would be great. This is currently blocking development.

1 Like

Super easy repro steps (using a custom Expo client):

  1. Open your custom Expo Client app
  2. Go to the Explore tab
  3. Tap Expo APIs row
  4. Click the Expo Components tab on the bottom tab bar
  5. Scroll down and click on Maps. The default Apple Maps should be loaded
  6. Flip the Use Google maps toggle and the app should crash immediately

Opened a new issue here.

Update
Reposting here for visibility—looks like the team is already aware of the issue and has a PR open with a fix.

Thanks Vince

I have a similar problem. I get no error output, but my Google Map doesn’t show, it’s an empty map.

I saw that there is a PR open, but is there a fix yet? Do I need to install a new version of the custom iOS build?

Thanks!

Yes it’s fixed now. A rebuild of the custom iOS Expo Client fixes the issue.

1 Like

Hi, did you find a solution for this. I’m using Expo with google auto complete inconjuction with react-native-maps.

Since UIWebView is now out, they saying my use WKWebView.

But when I hit the page on my ipa app, it crashes the entire app, when trying to load map.

I have the same issue still: On iOS I get crashes when showing a MapView with the GOOGLE provider. It works fine in simulator, but crashes w/o any logs on the custom Expo client as well as a TestFlight build. Any ideas? Using Expo Client App 2.15.2.1046

I seem t to be experiencing a similar issue:

  • Android: Map loads but is blank
  • iOS: App crashes when map screen is activated

Did anyone have any procedure to follow that solved this issue?

Hi, i’m having the same problem, my map goes blank on Android, were you able to fix it? Thanks in advance.