Files
react-native-maps/enable-google-maps
Whitney Young 496426c9d4 Enable custom configuration for iOS maps (#2396)
This allows setting up the library to work with Google Maps on iOS via
`react-native link` instead of only via CocoaPods.

Because Google-Maps-iOS-Utils is not distributed as a binary (at this
time), it disables functionality that depends on this library and raises
an exception that points to the reason why there's a problem.

Additionally:

- A missing file has been added back into the AirMaps.xcodeproj project.
2018-09-07 15:36:06 +02:00

16 lines
417 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}")"
GOOGLE_MAPS_INSTALL_LOCATION=$1
if [[ -z "$GOOGLE_MAPS_INSTALL_LOCATION" ]]; then
echo "usage: enable-google-maps <google-frameworks-relative-install-dir>"
exit 1
fi
cat > lib/ios/User.xcconfig <<EOF
FRAMEWORK_SEARCH_PATHS = \$(inherited) \$(SRCROOT)/../../../../$GOOGLE_MAPS_INSTALL_LOCATION
GCC_PREPROCESSOR_DEFINITIONS = \$(inherited) HAVE_GOOGLE_MAPS=1
EOF