MapView with provider="google" throws error on iOS build

MapView works fine in Expo, but when I detach and run via xcode I get an error:
libc++abi.dylib: terminating with uncaught exception of type NSException

This only happens when using provider=google.

To reproduce:

          <MapView
              style={{ flex: 1,  alignSelf: 'stretch'}}
              initialRegion={{
                  latitude: 37.78825,
                  longitude: -122.4324,
                  latitudeDelta: 0.0922,
                  longitudeDelta: 0.0421,
              }}
              provider={MapView.PROVIDER_GOOGLE}
          />
#!/usr/bin/env bash
create-react-native-app test-mapview-ios-eject
npm run eject
cd ios
pod install
open test-mapview-ios-eject.xcworkspace
# build in xcode

# error:
# ios/test-mapview-ios-eject/Supporting/main.m
# libc++abi.dylib: terminating with uncaught exception of type NSException

Do I need to configure MapView for Google when ejecting?

The docs do not mention any special config is needed.

I thought that Expo modules worked identically in ExpoKit when you are ejected?

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

Sorry for the extremely late reply here. We were missing some documentation about how to provide your own API key when using the Google provider for MapView. I’ve made a change to our docs which should clarify this.