Windows: 10
Bundle: 3.60.2
iOS: 13+
Having some trouble building with Firebase. Already looked through the forum and the readme to try to debug this, but seems nothing changed and I am missing something. Seems I am not loading in the frameworks correctly at all: I installed and inserted all of the Firebase related packages into the Frameworks folder. I then linked the packages necessary (Auth, Core, Storage, Database, Firestore) and added -ObjC as a linker flag. Most issues are undefined symbol from Firebase, likely issues that the framework is not imported properly via linker flags.
Thanks for any advice on this issue and thank you for the very helpful utility for Unity.
Linker Flags in UnityFramework:
-framework FirebaseAuth
-framework FirebaseCore
-framework FirebaseFirestore
-framework FirebaseDatabase
-framework FirebaseStorage
-ObjC
Build log:
+ Wiping output directory...
Building the dependency project GameAssembly...
+ Pruning compiler caches...
+ Preparing output directory...
+ XCFrameworks: 0 supplied
+ Libraries: 18 supplied, 0 built
+ Frameworks: 0 supplied, 0 built
+ Pruning compilation results...
+ Pre-parsing project files...
1 file(s) copied.
+ Building libGameAssembly.a for iphoneos (configuration: Release)
+ Located Unity il2cpp compiler: 2022.3.14f1
+ Calling the Unity il2cpp compiler to build the game assembly library...
PLEASE NOTE: this step MAY take time, and Unity doesn't always display
its progress. You can tell it's working by checking your CPU activity.
It should display 12 instances of clang.exe associated with il2cpp.exe.
======================= il2cpp output BEGIN =======================
Starting:
...
ExitCode: 0 Duration: 4m:34s
Build succeeded with 421 successful nodes and 0 failed ones
======================== il2cpp output END ========================
+ Creating universal library (arm64)...
+ Done.
Build time: 282 seconds (0 h 4 min 42 s)
Output directory: build\Release-iphoneos\GameAssembly\GameAssembly.lib
Building the dependency project UnityFramework...
+ Preparing output directory...
+ XCFrameworks: 0 supplied
+ Libraries: 18 supplied, 19 built
+ Frameworks: 0 supplied, 0 built
+ Pruning compilation results...
+ Pre-parsing project files...
1 file(s) copied.
+ Building UnityFramework for iphoneos (configuration: Release)
...
+ [arm64] Including $(BUILT_PRODUCTS_DIR)\libGameAssembly.a...
+ [arm64] Including Libraries\Plugins\iOS\Firebase\libFirebaseCppAuth.a...
+ [arm64] Including Libraries\Plugins\iOS\Firebase\libFirebaseCppFirestore.a...
+ [arm64] Including Libraries\Plugins\iOS\Firebase\libFirebaseCppStorage.a...
+ [arm64] Including Libraries\Plugins\iOS\Firebase\libFirebaseCppApp.a...
+ [arm64] Including Libraries\libil2cpp.a...
+ [arm64] Including Libraries\baselib.a...
+ [arm64] Linking UnityFramework...
ld64.lld: warning: directory not found for option -LC:/.../$(BUILT_PRODUCTS_DIR)
ld64.lld: error: C:/.../Libraries/Plugins/iOS/Firebase\libFirebaseCppAuth.a: unhandled file type
ld64.lld: error: C:/.../Libraries/Plugins/iOS/Firebase\libFirebaseCppFirestore.a: unhandled file type
ld64.lld: error: undefined symbol: OBJC_CLASS_$_FIRStorageMetadata
>>> referenced by C:/.../Libraries/Plugins/iOS/Firebase\libFirebaseCppStorage.a(metadata_ios.mm.o):(symbol ltmp6+0x0)
ld64.lld: error: undefined symbol: OBJC_CLASS_$_FIRStorage
>>> referenced by C:/.../Libraries/Plugins/iOS/Firebase\libFirebaseCppStorage.a(storage_ios.mm.o):(symbol ltmp5+0x0)
ld64.lld: error: undefined symbol: OBJC_CLASS_$_FIROptions
>>> referenced by C:/.../Libraries/Plugins/iOS/Firebase\libFirebaseCppApp.a(app_ios.mm.o):(symbol ltmp5+0x0)
ld64.lld: error: undefined symbol: OBJC_CLASS_$_FIRApp
>>> referenced by C:/.../Libraries/Plugins/iOS/Firebase\libFirebaseCppApp.a(app_ios.mm.o):(symbol OBJC_CLASSLIST_REFERENCES_$_.4+0x0)
>>> referenced by C:/iOS/builder/SDK/System/Library/Frameworks\FirebaseAuth.xcframework\ios-arm64\FirebaseAuth.framework\FirebaseAuth(FIRAuth.o):(symbol OBJC_CLASSLIST_REFERENCES_$_.107+0x0)
ld64.lld: error: undefined symbol: OBJC_CLASS_$_FIRConfiguration
>>> referenced by C:/.../Libraries/Plugins/iOS/Firebase\libFirebaseCppApp.a(app_ios.mm.o):(symbol OBJC_CLASSLIST_REFERENCES_$_.6+0x0)
ld64.lld: error: undefined symbol: Firebase_Firestore_CSharp_DocumentReferenceProxy_is_valid
>>> referenced by Firebase.Firestore.cpp:21145 (C:/.../Il2CppOutputProject/Source/il2cppOutput\Firebase.Firestore.cpp:21145)
>>> build/Release-iphoneos/BuiltLibraries\libGameAssembly.a(39uhm80jhqgj.o):(symbol DocumentReferenceProxy_is_valid_mE85E9F3E580E73407E20AF23CC853DE6FF89886C+0x60)
>>> referenced by Firebase.Firestore.cpp:21145 (C:/.../Il2CppOutputProject/Source/il2cppOutput\Firebase.Firestore.cpp:21145)
>>> build/Release-iphoneos/BuiltLibraries\libGameAssembly.a(39uhm80jhqgj.o):(symbol FirestoreCppPINVOKE_DocumentReferenceProxy_is_valid_m22E779CE5BB06519B7479E0B1A34FBDC728CBEF4+0xc)
...
ld64.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
Press any key to continue . . .