I am facing this issue which I believe a lot of other people are facing after some searching. I am trying to install Google maps IOS SDK manually rather than pods approach. Any solution pertaining to pods does not work for me. I am able to render the map but when I provide "provider google" it throws me the error. I need to have the google maps rather than the apple maps. What I have done so far:
My package.json snippet:
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"moment": "^2.22.2",
"npm": "^6.5.0",
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-blur": "^3.2.2",
"react-native-drawer": "^2.5.0",
"react-native-elements": "^0.19.1",
"react-native-maps": "^0.23.0",
I am following this documentation which I think is quite accurate other than some small tweaks.
My react native component which renders maps.
import React from 'react'
import { ScrollView, View } from 'react-native'
import styles from './style'
import MapView, { PROVIDER_GOOGLE } from 'react-native-maps'
class Location extends React.Component {
render () {
return (
<View style={styles.container}>
<MapView
provider={PROVIDER_GOOGLE} // remove if not using Google Maps
style={styles.map}
region={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.015,
longitudeDelta: 0.0121,
}}
>
</MapView>
</View>
)
}
}
My Xcode File hierarchy:
Libraries linked:
Also, I have included the paths in header search in build settings. Also, I have included AirMaps.xcodeproj under my libraries in Xcode. I have seen more solutions with Podfile but I am curious If somebody has manually done it by resolving this error. I am not sure what I have done wrong.