[ios] Switch to script-based token insertion for benchmarking app [ios] Update Developing.md [iosapp, benchmark app] Look for token file outside of version-controlled directory [iosapp, benchmark app] Remove remaining code for access token checking from app delegates Feedback edits for @friedbunny
18 lines
637 B
Bash
Executable File
18 lines
637 B
Bash
Executable File
if [[ "$CI" ]]; then
|
|
echo "CI environment, access token not required"
|
|
exit 0
|
|
else
|
|
echo "Inserting Mapbox access token..."
|
|
token_file=~/.mapbox
|
|
token_file2=~/mapbox
|
|
token="$(cat $token_file 2>/dev/null || cat $token_file2 2>/dev/null)"
|
|
if [ "$token" ]; then
|
|
plutil -replace MGLMapboxAccessToken -string $token "$TARGET_BUILD_DIR/$INFOPLIST_PATH"
|
|
echo "Token insertion successful"
|
|
else
|
|
echo \'error: Missing Mapbox access token\'
|
|
echo "error: Get an access token from <https://www.mapbox.com/studio/account/tokens/>, then create a new file at $token_file that contains the access token."
|
|
exit 1
|
|
fi
|
|
fi
|