I'm currently developing a React Native Firebase project and recently installed @react-native-firebase/firestore
. However, I'm encountering several build errors.
Framework 'FirebaseFirestoreInternal' not found
Linker command failed with exit code 1 (use -v to see invocation)
...
warning: Run script build phase '[CP-User] [RN]Check rncore' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Fabric' from project 'Pods')
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyProject' from project 'MyProject')
warning: Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyProject' from project 'MyProject')
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:8048419F-71CF-4667-84A5-E9AD68D06A56, OS:17.5, name:iPhone 15 Pro }
{ platform:iOS Simulator, id:8048419F-71CF-4667-84A5-E9AD68D06A56, OS:17.5, name:iPhone 15 Pro }
** BUILD FAILED **
The following build commands failed:
Ld /Users/alexbalinski/Library/Developer/Xcode/DerivedData/MyProject-fvojrknysdvjhsgiaiyvidihehoq/Build/Products/Debug-iphonesimulator/MyProject.app/MyProject normal (in target 'MyProject' from project 'MyProject')
(1 failure)
It's saying FirebaseFirestoreInternal
doesn't exist, even though it does.
target 'TheLifeyApp' do
config = use_native_modules!
$RNFirebaseAsStaticFramework = true
# Firebase modules
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseFirestore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseFirestoreInternal', :modular_headers => true
# ...
Deleting DerivedData
and cleaning Xcode build caches
Running pod update
Running pod deintegrate && pod install
Changing the iOS Deployment Target
Deleting all :modular_headers => true
Adding $(inherited)
to Framework Search Paths
Unfortunately, nothing has resolved the issue. I would greatly appreciate any assistance.
I fixed the error by making sure use_frameworks! :linkage => :static
was being used, and deleted all :modular_headers => true
:
Replace this:
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => :static
end
With this
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => :static