Files
MapLibreParticleLab/platform/ios/benchmark/insert_access_token.sh
mwilsnd 20d9e1028c Platform flattening overhaul (#1393)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
2023-07-26 17:50:34 +02:00

11 lines
363 B
Bash

echo "Inserting MapLibre API key..."
token_file=~/.maplibre
token_file2=~/maplibre
token="$(cat $token_file 2>/dev/null || cat $token_file2 2>/dev/null || echo $MLN_API_KEY)"
if [ "$token" ]; then
plutil -replace MLNApiKey -string $token "$TARGET_BUILD_DIR/$INFOPLIST_PATH"
echo "API key insertion successful"
else
echo 'Warning: Missing API key.'
fi