firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
220 stars 35 forks source link

[Bug] Firebase SDK 12.2.1 for Unity #1115

Closed mls-icaro closed 1 week ago

mls-icaro commented 2 weeks ago

Description

When I try to build my game to IOS using the Firebase SDK for Unity v 12.2.1 I get the following errors in XCode Build

Undefined symbol: _Firebase_App_CSharp_AppEnableLogCallback Undefined symbol: _Firebase_App_CSharp_CharVector_Add Undefined symbol: _Firebase_App_CSharp_CharVector_Clear Undefined symbol: _Firebase_App_CSharp_CharVector_Contains Undefined symbol: _Firebase_App_CSharp_CharVector_IndexOf Undefined symbol: _Firebase_App_CSharp_CharVector_Insert Undefined symbol: _Firebase_App_CSharp_CharVector_Remove Undefined symbol: _Firebase_App_CSharp_CharVector_RemoveAt Undefined symbol: _Firebase_App_CSharp_CharVector_getitem Undefined symbol: _Firebase_App_CSharp_CharVector_getitemcopy Undefined symbol: _Firebase_App_CSharp_CharVector_setitem Undefined symbol: _Firebase_App_CSharp_CharVector_size Undefined symbol: _Firebase_App_CSharp_FirebaseApp_AppSetDefaultConfigPath Undefined symbol: _Firebase_App_CSharp_FirebaseApp_CreateInternal__SWIG_0 Undefined symbol: _Firebase_App_CSharp_FirebaseApp_DefaultName_get Undefined symbol: _Firebase_App_CSharp_FirebaseApp_GetLogLevelInternal Undefined symbol: _Firebase_App_CSharp_FirebaseApp_LogHeartbeatInternal Undefined symbol: _Firebase_App_CSharp_FirebaseApp_NameInternal_get Undefined symbol: _Firebase_App_CSharp_FirebaseApp_RegisterLibrariesInternal Undefined symbol: _Firebase_App_CSharp_FirebaseApp_ReleaseReferenceInternal Undefined symbol: _Firebase_App_CSharp_FutureBase_error Undefined symbol: _Firebase_App_CSharp_FutureBase_error_message Undefined symbol: _Firebase_App_CSharp_FutureBase_status Undefined symbol: _Firebase_App_CSharp_FutureString_GetResult Undefined symbol: _Firebase_App_CSharp_FutureString_SWIGUpcast Undefined symbol: _Firebase_App_CSharp_FutureString_SWIG_FreeCompletionData Undefined symbol: _Firebase_App_CSharp_FutureString_SWIG_OnCompletion Undefined symbol: _Firebase_App_CSharp_FutureVoid_SWIGUpcast Undefined symbol: _Firebase_App_CSharp_FutureVoid_SWIG_FreeCompletionData Undefined symbol: _Firebase_App_CSharp_FutureVoid_SWIG_OnCompletion Undefined symbol: _Firebase_App_CSharp_GetEnabledAppCallbackByName Undefined symbol: _Firebase_App_CSharp_PollCallbacks Undefined symbol: _Firebase_App_CSharp_SetEnabledAllAppCallbacks Undefined symbol: _Firebase_App_CSharp_SetEnabledAppCallbackByName Undefined symbol: _Firebase_App_CSharp_SetLogFunction Undefined symbol: _Firebase_App_CSharp_StringList_Add Undefined symbol: _Firebase_App_CSharp_StringList_Clear Undefined symbol: _Firebase_App_CSharp_StringList_Contains Undefined symbol: _Firebase_App_CSharp_StringList_IndexOf Undefined symbol: _Firebase_App_CSharp_StringList_Insert Undefined symbol: _Firebase_App_CSharp_StringList_Remove Undefined symbol: _Firebase_App_CSharp_StringList_RemoveAt Undefined symbol: _Firebase_App_CSharp_StringList_getitem Undefined symbol: _Firebase_App_CSharp_StringList_getitemcopy Undefined symbol: _Firebase_App_CSharp_StringList_setitem Undefined symbol: _Firebase_App_CSharp_StringList_size Undefined symbol: _Firebase_App_CSharp_StringStringMap_Add Undefined symbol: _Firebase_App_CSharp_StringStringMap_Clear Undefined symbol: _Firebase_App_CSharp_StringStringMap_ContainsKey Undefined symbol: _Firebase_App_CSharp_StringStringMap_Remove Undefined symbol: _Firebase_App_CSharp_StringStringMap_create_iterator_begin Undefined symbol: _Firebase_App_CSharp_StringStringMap_destroy_iterator Undefined symbol: _Firebase_App_CSharp_StringStringMap_get_next_key Undefined symbol: _Firebase_App_CSharp_StringStringMap_getitem Undefined symbol: _Firebase_App_CSharp_StringStringMap_setitem Undefined symbol: _Firebase_App_CSharp_StringStringMap_size Undefined symbol: _Firebase_App_CSharp_delete_CharVector Undefined symbol: _Firebase_App_CSharp_delete_FutureBase Undefined symbol: _Firebase_App_CSharp_delete_FutureString Undefined symbol: _Firebase_App_CSharp_delete_FutureVoid Undefined symbol: _Firebase_App_CSharp_delete_StringList Undefined symbol: _Firebase_App_CSharp_delete_StringStringMap Undefined symbol: _Firebase_App_CSharp_new_StringStringMap__SWIG_0 Undefined symbol: _OBJC_CLASS_$_FIRSAMAppDelegate Undefined symbol: _SWIGRegisterExceptionArgumentCallbacks_AppUtil Undefined symbol: _SWIGRegisterExceptionCallbacks_AppUtil Undefined symbol: _SWIGRegisterStringCallback_AppUtil Undefined symbol: firebase::LogWarning(char const*, ...) Undefined symbol: firebase::AppCallback::AddCallback(firebase::AppCallback*) Undefined symbol: firebase::AppCallback::GetEnabledByName(char const*) Undefined symbol: firebase::FutureHandle::Detach() Undefined symbol: firebase::FutureHandle::FutureHandle(firebase::FutureHandle const&) Undefined symbol: firebase::FutureHandle::FutureHandle(unsigned long, firebase::detail::FutureApiInterface*) Undefined symbol: firebase::FutureHandle::FutureHandle() Undefined symbol: firebase::FutureHandle::~FutureHandle() Undefined symbol: firebase::FutureHandle::operator=(firebase::FutureHandle&&) Undefined symbol: firebase::FutureHandle::operator=(firebase::FutureHandle const&) Undefined symbol: firebase::CleanupNotifier::FindByOwner(void*) Undefined symbol: firebase::CleanupNotifier::RegisterObject(void*, void (*)(void*)) Undefined symbol: firebase::CleanupNotifier::UnregisterObject(void*) Undefined symbol: firebase::CleanupNotifier::CleanupNotifier() Undefined symbol: firebase::CleanupNotifier::~CleanupNotifier() Undefined symbol: firebase::ReferenceCountedFutureImpl::BackingData(firebase::FutureBackingData*) Undefined symbol: firebase::ReferenceCountedFutureImpl::AllocInternal(int, void*, void (*)(void*)) Undefined symbol: firebase::ReferenceCountedFutureImpl::CompleteProxy(firebase::FutureBackingData*) Undefined symbol: firebase::ReferenceCountedFutureImpl::CompleteHandle(firebase::FutureHandle const&) Undefined symbol: firebase::ReferenceCountedFutureImpl::SetBackingError(firebase::FutureBackingData*, int, char const*) Undefined symbol: firebase::ReferenceCountedFutureImpl::BackingFromHandle(unsigned long) Undefined symbol: firebase::ReferenceCountedFutureImpl::ReleaseMutexAndRunCallbacks(firebase::FutureHandle const&) Undefined symbol: firebase::ReferenceCountedFutureImpl::~ReferenceCountedFutureImpl() Undefined symbol: firebase::App::GetInstance() Undefined symbol: firebase::util::NSStringToString(NSString*) Linker command failed with exit code 1 (use -v to see invocation)

Reproducing the issue

No response

Firebase Unity SDK Version

12.2.1

Unity editor version

2022.3.28f1

Installation Method

.unitypackage

Problematic Firebase Component(s)

Messaging

Other Firebase Component(s) in use

No response

Additional SDKs you are using

No response

Targeted Platform(s)

Apple Platforms

Unity editor platform

Mac

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

Only in IOS build I get these errors

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
```yml PODS: - Firebase/Core (11.0.0): - Firebase/CoreOnly - FirebaseAnalytics (~> 11.0.0) - Firebase/CoreOnly (11.0.0): - FirebaseCore (= 11.0.0) - Firebase/Messaging (11.0.0): - Firebase/CoreOnly - FirebaseMessaging (~> 11.0.0) - FirebaseAnalytics (11.0.0): - FirebaseAnalytics/AdIdSupport (= 11.0.0) - FirebaseCore (~> 11.0) - FirebaseInstallations (~> 11.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/MethodSwizzler (~> 8.0) - GoogleUtilities/Network (~> 8.0) - "GoogleUtilities/NSData+zlib (~> 8.0)" - nanopb (~> 3.30910.0) - FirebaseAnalytics/AdIdSupport (11.0.0): - FirebaseCore (~> 11.0) - FirebaseInstallations (~> 11.0) - GoogleAppMeasurement (= 11.0.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/MethodSwizzler (~> 8.0) - GoogleUtilities/Network (~> 8.0) - "GoogleUtilities/NSData+zlib (~> 8.0)" - nanopb (~> 3.30910.0) - FirebaseCore (11.0.0): - FirebaseCoreInternal (~> 11.0) - GoogleUtilities/Environment (~> 8.0) - GoogleUtilities/Logger (~> 8.0) - FirebaseCoreInternal (11.2.0): - "GoogleUtilities/NSData+zlib (~> 8.0)" - FirebaseInstallations (11.2.0): - FirebaseCore (~> 11.0) - GoogleUtilities/Environment (~> 8.0) - GoogleUtilities/UserDefaults (~> 8.0) - PromisesObjC (~> 2.4) - FirebaseMessaging (11.0.0): - FirebaseCore (~> 11.0) - FirebaseInstallations (~> 11.0) - GoogleDataTransport (~> 10.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/Environment (~> 8.0) - GoogleUtilities/Reachability (~> 8.0) - GoogleUtilities/UserDefaults (~> 8.0) - nanopb (~> 3.30910.0) - GoogleAppMeasurement (11.0.0): - GoogleAppMeasurement/AdIdSupport (= 11.0.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/MethodSwizzler (~> 8.0) - GoogleUtilities/Network (~> 8.0) - "GoogleUtilities/NSData+zlib (~> 8.0)" - nanopb (~> 3.30910.0) - GoogleAppMeasurement/AdIdSupport (11.0.0): - GoogleAppMeasurement/WithoutAdIdSupport (= 11.0.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/MethodSwizzler (~> 8.0) - GoogleUtilities/Network (~> 8.0) - "GoogleUtilities/NSData+zlib (~> 8.0)" - nanopb (~> 3.30910.0) - GoogleAppMeasurement/WithoutAdIdSupport (11.0.0): - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/MethodSwizzler (~> 8.0) - GoogleUtilities/Network (~> 8.0) - "GoogleUtilities/NSData+zlib (~> 8.0)" - nanopb (~> 3.30910.0) - GoogleDataTransport (10.1.0): - nanopb (~> 3.30910.0) - PromisesObjC (~> 2.4) - GoogleUtilities/AppDelegateSwizzler (8.0.2): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - GoogleUtilities/Privacy - GoogleUtilities/Environment (8.0.2): - GoogleUtilities/Privacy - GoogleUtilities/Logger (8.0.2): - GoogleUtilities/Environment - GoogleUtilities/Privacy - GoogleUtilities/MethodSwizzler (8.0.2): - GoogleUtilities/Logger - GoogleUtilities/Privacy - GoogleUtilities/Network (8.0.2): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Privacy - GoogleUtilities/Reachability - "GoogleUtilities/NSData+zlib (8.0.2)": - GoogleUtilities/Privacy - GoogleUtilities/Privacy (8.0.2) - GoogleUtilities/Reachability (8.0.2): - GoogleUtilities/Logger - GoogleUtilities/Privacy - GoogleUtilities/UserDefaults (8.0.2): - GoogleUtilities/Logger - GoogleUtilities/Privacy - nanopb (3.30910.0): - nanopb/decode (= 3.30910.0) - nanopb/encode (= 3.30910.0) - nanopb/decode (3.30910.0) - nanopb/encode (3.30910.0) - PromisesObjC (2.4.0) DEPENDENCIES: - Firebase/Core (= 11.0.0) - Firebase/Messaging (= 11.0.0) SPEC REPOS: trunk: - Firebase - FirebaseAnalytics - FirebaseCore - FirebaseCoreInternal - FirebaseInstallations - FirebaseMessaging - GoogleAppMeasurement - GoogleDataTransport - GoogleUtilities - nanopb - PromisesObjC SPEC CHECKSUMS: Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9 FirebaseAnalytics: 27eb78b97880ea4a004839b9bac0b58880f5a92a FirebaseCore: 3cf438f431f18c12cdf2aaf64434648b63f7e383 FirebaseCoreInternal: 0c569513412da9f3b31bd0b340013bbee8f295c5 FirebaseInstallations: 771177d89d6c451dc6e50085ec82e2fc77ed0a4a FirebaseMessaging: d2d1d9c62c46dd2db49a952f7deb5b16ad2c9742 GoogleAppMeasurement: 6e49ffac7d3f2c3ded9cc663f912a13b67bbd0de GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PODFILE CHECKSUM: 18f7e8dbdd75b8182fc4dbd21a74124c5c5d4b7d COCOAPODS: 1.15.2 ```
google-oss-bot commented 2 weeks ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

mls-icaro commented 2 weeks ago

Now, even going back to firebase 12.1, I still have the same errors.

a-maurice commented 2 weeks ago

This would indicate that the C++ libraries are missing. For iOS, they should be in Assets/Plugins/iOS/Firebase/libFirebaseAppCpp.a Can you verify that file is there, and is enabled for iOS. If it is, check the XCode project, to make sure it was included correctly. It would likely be in Unity-iPhone/Libraries/Plugins/iOS/Firebase

mls-icaro commented 2 weeks ago

checkings: Assets/Plugins/iOS/Firebase/ in this folder there are :

They are enable for iOS image

I also check in the XCode project the Unity-iPhone/Libraries/Plugins/iOS/Firebase. The files are in this folder.

mls-icaro commented 1 week ago

Solution: I set the old version again of the firebase sdk 12.1.

PS: I put also in Other Linker Flags of Unity Framework target: -ld_classic. In Unity-IPhone target I put in Build Phases tab -> Add a New Run Script Phase

cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Frameworks/UnityFramework.framework/"

if [[ -d "Frameworks" ]]; then

 rm -fr Frameworks

fi
mls-icaro commented 1 week ago

Solved