Files
iNaturalistReactNative/ios/link-inat-model-files.sh
Johannes Klein bad9c5a4d8 Add firebase dependency, and basic logging (#3127)
* Update package.json

* Update AppDelegate.mm

* Update Podfile

* Update .gitignore

* Update link-inat-model-files.sh

* Add plist file to project

* Update project.pbxproj

* Add analytics package

* Update project.pbxproj

* Update PrivacyInfo.xcprivacy

* Basic screen tracking

* Basic button press logging to firebase

* Update package-lock.json

* Update Podfile.lock

* Add Android setup

* Update .gitignore

* Add analytics mock

* Ignore rubocop warning here

* Create GoogleService-Info.example.plist

* Create google-services.example.json

* Add instructions to set up Firebase configs

* Update e2e_ios.yml

* Update e2e_android.yml

* Better plural

* Use specific XCode version in e2e CI

* Update GoogleService-Info.example.plist

* Revert "Update GoogleService-Info.example.plist"

This reverts commit 0bc0ed4862.

* We need an actual real app id or we get a crash during app start

* My bad, we do need both files for building

* Also set API key

* Add comments

* Add comment

* Update Podfile.lock

* Revert "Use specific XCode version in e2e CI"

This reverts commit cbd63d1b5d.
2025-10-16 13:15:10 +02:00

47 lines
1.9 KiB
Bash
Executable File

# Hard links the model and taxonomy files specified in .env or .env.staging to the
# files declared in the xcode project
# https://developer.apple.com/documentation/xcode/running-custom-scripts-during-a-build
if [ $CONFIGURATION = "Debug" ]; then
source $SRCROOT/../.env.staging
else
source $SRCROOT/../.env
fi
if ! [ -f $SRCROOT/$IOS_MODEL_FILE_NAME ]; then
echo "CV model file does not exist at $SRCROOT/$IOS_MODEL_FILE_NAME"
exit 1
fi
if ! [ -f $SRCROOT/$IOS_TAXONOMY_FILE_NAME ]; then
echo "CV taxonomy file does not exist at $SRCROOT/$IOS_TAXONOMY_FILE_NAME"
exit 1
fi
echo "Linking $IOS_MODEL_FILE_NAME to cvmodel.mlmodel..."
ln -f $SRCROOT/$IOS_MODEL_FILE_NAME $SRCROOT/cvmodel.mlmodel
echo "Linking $IOS_TAXONOMY_FILE_NAME to taxonomy.json..."
ln -f $SRCROOT/$IOS_TAXONOMY_FILE_NAME $SRCROOT/taxonomy.json
if [ -f $SRCROOT/$IOS_GEOMODEL_FILE_NAME ]; then
echo "Geomodel file does exist at $SRCROOT/$IOS_GEOMODEL_FILE_NAME"
echo "Linking $IOS_GEOMODEL_FILE_NAME to geomodel.mlmodel..."
ln -f $SRCROOT/$IOS_GEOMODEL_FILE_NAME $SRCROOT/geomodel.mlmodel
fi
# Also hard links the GoogleService-Info.plist file depending on the build configuration
if [ $CONFIGURATION = "Debug" ]; then
if ! [ -f $SRCROOT/GoogleService-Info.staging.plist ]; then
echo "GoogleService-Info.staging.plist file does not exist at $SRCROOT/GoogleService-Info.staging.plist"
exit 1
fi
echo "Linking GoogleService-Info.staging.plist to GoogleService-Info.plist..."
ln -f $SRCROOT/GoogleService-Info.staging.plist $SRCROOT/GoogleService-Info.plist
else
if ! [ -f $SRCROOT/GoogleService-Info.production.plist ]; then
echo "GoogleService-Info.production.plist file does not exist at $SRCROOT/GoogleService-Info.production.plist"
exit 1
fi
echo "Linking GoogleService-Info.production.plist to GoogleService-Info.plist..."
ln -f $SRCROOT/GoogleService-Info.production.plist $SRCROOT/GoogleService-Info.plist
fi