forked from arnesson/cordova-plugin-firebase
-
-
Notifications
You must be signed in to change notification settings - Fork 473
Home
Dave Alden edited this page Nov 7, 2024
·
3 revisions
- The official Firestore Pod depends on some 500k lines of mostly C++, which can lead to very long build times (e.g.see #794)
- Therefore this plugin offers the option to use a pre-built binary version of the Firestore Pod to reduce build times.
- This option can be enabled by specifying the
IOS_USE_PRECOMPILED_FIRESTORE_POD
plugin variable at plugin installation time (see plugin variables).- e.g.
cordova plugin add cordova-plugin-firebasex --variable IOS_USE_PRECOMPILED_FIRESTORE_POD=true
- This is a post-install plugin variable so has some additional requirements.
- e.g.
- If you enable this option, you MUST also ensure the environment variable
SKIP_FIREBASE_FIRESTORE_SWIFT
is set globally to a truthy value- Otherwise the build will fail (see e.g. #782)
- e.g. If using zsh:
echo 'export SKIP_FIREBASE_FIRESTORE_SWIFT=1' >> ~/.zshrc && source ~/.zshrc
- This ensures the pre-built pod is compatible with the Cordova project environment
If you encounter build failures or run-time crashes immediately after starting the app after enabling or changing the pre-build Pod setting try the following:
- Remove and re-add both the plugin and iOS plaform:
cordova platform rm ios --nosave
cordova plugin rm cordova-plugin-firebasex --nosave
cordova plugin add cordova-plugin-firebasex --nosave
cordova platform add ios --nosave
cordova prepare ios
- Resolve Cocopods issues
cd platforms/ios/
pod repo update
pod deintegrate
pod setup
pod install
- Open the Xcode project in
platforms/ios/
and clean the build folder:
Click on the Product menu while holding down the Option (Alt) key and choose Clean build folder
- Clear derived data
rm -Rf ~/Library/Developer/Xcode/DerivedData/