I'm using Cordova 11.0.0 (cordova-ios 6.2.0) on a brand new Mac mini with an M1 chip, using Xcode 13.2.1, and I can't build my app for the iOS simulator. I'm trying to use cordova-plugin-firebasex
14.0.0 , but I can't build the app either with or without this plugin. With the plugin, I get Module 'FirebaseFirestore' not found
, while without it I get framework not found AppAuth
. I've searched on both of those errors, as well as on many others I've seen, for the past 3 days; the many solutions I've found and tried either don't work or are not applicable to an M1 machine. I've reinstalled almost everything, including Xcode, and many things multiple times. I've tried pod repo update
, pod install
, and pod update
many times.
Other tool versions:
- ruby 3.1.0p0 (installed via homebrew)
- CocoaPods 1.11.2 (installed with above, new version of ruby)
- MacOS 12.2.1
Installing the new ruby and CocoaPods, rather than using MacOS's default versions, did remove a few error messages, and lets me run the pod
commands without arch -x86_64
before them.
Interestingly, when the cordova-plugin-firebasex
plugin is installed, then every time I run pod update
, there are two extra messages in its output:
Pre-downloading: `FirebaseFirestore` from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `8.11.0`
and
Installing FirebaseFirestore 8.11.0
This hints that there's something wrong with the FirebaseFirestore part of Firebase, as if it gets installed incompletely, or as if the plugin is missing some flag in the installation of its FirebaseFirestore component (?). Note that the line for FirebaseFirestore is different from the others in the Podfile:
# DO NOT MODIFY -- auto-generated by Apache Cordova
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
use_frameworks!
target 'my_app' do
project 'my_app.xcodeproj'
pod 'Firebase/Core', '8.11.0'
pod 'Firebase/Auth', '8.11.0'
pod 'Firebase/Messaging', '8.11.0'
pod 'Firebase/Performance', '8.11.0'
pod 'Firebase/RemoteConfig', '8.11.0'
pod 'Firebase/InAppMessaging', '8.11.0'
pod 'FirebaseFirestore', :tag => '8.11.0', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git'
pod 'Firebase/Crashlytics', '8.11.0'
pod 'Firebase/Functions', '8.11.0'
pod 'Firebase/Installations', '8.11.0'
pod 'GoogleSignIn', '6.1.0'
pod 'GoogleTagManager', '7.3.1'
end
Do I understand correctly that cordova-plugin-firebasex
can be used either from the command line (with the -cli
packages), or from Xcode, but not both at the same time? In any case, I've tried building from the command line too, and that fails when compiling cordova-plugin-firebasex/FirebasePlugin.m
.
I'm completely new to Firebase and pretty much everything in the Apple world, so all advice is very welcome. Thanks!
EDIT: A few more things, possible clues:
Under platforms/iOS/my_app/CordovaLib/
, there is no Cordova/
, which is apparently supposed to contain Cordova.h
and Info.list
. What could cause this?
Now, after setting Architectures / Exclude Architectures
to x86_64
, I get the error message:
in /Users/me/dev/my_app/platforms/ios/Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/me/dev/my_app/platforms/ios/Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities' for architecture arm64
.
I've also searched on this error message over the past 4 days, but found nothing that has worked.
In platforms/iOS/Pods/Pods.xcodeproj/project.pbxproj
, IPHONEOS_DEPLOYMENT_TARGET
is set to 8.0
for these modules (?): AppAuth.debug.xcconfig
, GoogleSymbolUtilities.release.xcconfig
, GoogleSymbolUtilities.debug.xcconfig
, AppAuth.release.xcconfig
, GoogleUtilitiesLegacy.debug.xcconfig
, and GoogleUtilitiesLegacy.release.xcconfig
. When building from the command line, a warning says those should be at least 9.0
. I've tried changing those lines to 9.0
in that file, but the error message is unchanged. pod install
plus pod update
sets those back to 8.0
.
Under Build Settings / Linking
, I notice that the Path to Link Map File
is set to a file that doesn't exist: build/my_app.build/Debug-iphoneos/.build/-LinkMap--.txt
. In fact the directory build/my_app.build/
does not exist. The filename apparently shows that PRODUCT_NAME
, CURRENT_VARIANT
, and CURRENT_ARCH
are not set. Is this important?
Thanks for any help at all. I suspect multiple apps being used here have problems, and solving any one problem would make everything else much easier to diagnose.
I had the same problem, but i solve it in this way
cordova build ios
) in my case i get this errorFor solving this i launch this
(from this)
cordova build ios again
and this time all goes wellI hope this can be usefull
================================
At the end i've found another way, if the before steps does not works.
https://github.com/dpa99c/cordova-plugin-firebasex/issues/735#issuecomment-1140775999