Reputation: 301
I have added Firebase to my Unity project, using the FirebaseMessaging.unitypackage.
It works when I am building and running for Android, but when I am trying to build for iOS, I get the following error in XCode:
Ld /Users/one4freedk/Library/Developer/Xcode/DerivedData/Unity-iPhone-eijzxgpugrgbhsfkgmdnrbljevok/Build/Products/Debug-iphoneos/one4freeapp.app/one4freeapp normal armv7
cd /Users/one4freedk/Desktop/One4Free/One4Free/iosbuild
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -L/Users/one4freedk/Library/Developer/Xcode/DerivedData/Unity-iPhone-eijzxgpugrgbhsfkgmdnrbljevok/Build/Products/Debug-iphoneos -L/Users/one4freedk/Desktop/One4Free/One4Free/iosbuild -L/Users/one4freedk/Desktop/One4Free/One4Free/iosbuild/Libraries -F/Users/one4freedk/Library/Developer/Xcode/DerivedData/Unity-iPhone-eijzxgpugrgbhsfkgmdnrbljevok/Build/Products/Debug-iphoneos -F/Users/one4freedk/Desktop/One4Free/One4Free/iosbuild/Frameworks/FacebookSDK/Plugins/iOS -F/Users/one4freedk/Desktop/One4Free/One4Free/iosbuild/Frameworks -filelist /Users/one4freedk/Library/Developer/Xcode/DerivedData/Unity-iPhone-eijzxgpugrgbhsfkgmdnrbljevok/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/one4freeapp.LinkFileList -Xlinker -map -Xlinker /Users/one4freedk/Library/Developer/Xcode/DerivedData/Unity-iPhone-eijzxgpugrgbhsfkgmdnrbljevok/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/one4freeapp-LinkMap-normal-armv7.txt -miphoneos-version-min=7.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/one4freedk/Library/Developer/Xcode/DerivedData/Unity-iPhone-eijzxgpugrgbhsfkgmdnrbljevok/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/one4freeapp_lto.o -Xlinker -no_deduplicate -fembed-bitcode-marker -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -weak_framework CoreMotion -weak-lSystem -ObjC -lc++ -lsqlite3 -lz -licucore -lc++ -liPhone-lib -framework CoreText -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreMedia -weak_framework CoreMotion -framework CoreVideo -framework Foundation -framework MediaPlayer -framework OpenAL -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -liconv.2 -framework Bolts -framework FBSDKShareKit -framework FBSDKCoreKit -framework FBSDKLoginKit -weak_framework Metal -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseInstanceID -framework FirebaseMessaging -framework GoogleInterchangeUtilities -framework GoogleSymbolUtilities -framework StoreKit -framework AddressBook -Xlinker -dependency_info -Xlinker /Users/one4freedk/Library/Developer/Xcode/DerivedData/Unity-iPhone-eijzxgpugrgbhsfkgmdnrbljevok/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/one4freeapp_dependency_info.dat -o /Users/one4freedk/Library/Developer/Xcode/DerivedData/Unity-iPhone-eijzxgpugrgbhsfkgmdnrbljevok/Build/Products/Debug-iphoneos/one4freeapp.app/one4freeapp
Undefined symbols for architecture armv7:
"_SWIGRegisterExceptionCallbacksArgument_FirebaseMessaging", referenced from:
_SWIGExceptionHelper_SWIGRegisterExceptionCallbacksArgument_FirebaseMessaging_m2946342211 in Bulk_Firebase.Messaging_0.o
(maybe you meant: _SWIGExceptionHelper_SWIGRegisterExceptionCallbacksArgument_FirebaseMessaging_m2946342211)
"_SWIGRegisterStringCallback_FirebaseMessaging", referenced from:
_SWIGStringHelper_SWIGRegisterStringCallback_FirebaseMessaging_m1829604336 in Bulk_Firebase.Messaging_0.o
(maybe you meant: _SWIGStringHelper_SWIGRegisterStringCallback_FirebaseMessaging_m1829604336)
"_Firebase_Messaging_SendPendingEvents", referenced from:
_FirebaseMessagingPINVOKE_Firebase_Messaging_SendPendingEvents_m696476573 in Bulk_Firebase.Messaging_0.o
(maybe you meant: _FirebaseMessagingPINVOKE_Firebase_Messaging_SendPendingEvents_m696476573)
"_Firebase_Messaging_SetListenerCallbacksEnabled", referenced from:
_FirebaseMessagingPINVOKE_Firebase_Messaging_SetListenerCallbacksEnabled_m633290538 in Bulk_Firebase.Messaging_0.o
(maybe you meant: _FirebaseMessagingPINVOKE_Firebase_Messaging_SetListenerCallbacksEnabled_m633290538)
"_Firebase_Messaging_SetListenerCallbacks", referenced from:
_FirebaseMessagingPINVOKE_Firebase_Messaging_SetListenerCallbacks_m2687428259 in Bulk_Firebase.Messaging_0.o
(maybe you meant: _FirebaseMessagingPINVOKE_Firebase_Messaging_SetListenerCallbacks_m2687428259, _FirebaseMessagingPINVOKE_Firebase_Messaging_SetListenerCallbacksEnabled_m633290538 )
"_Firebase_Messaging_FirebaseMessage_From_get", referenced from:
_FirebaseMessagingPINVOKE_Firebase_Messaging_FirebaseMessage_From_get_m3347431359 in Bulk_Firebase.Messaging_0.o
(maybe you meant: _FirebaseMessagingPINVOKE_Firebase_Messaging_FirebaseMessage_From_get_m3347431359)
"_Firebase_Messaging_delete_FirebaseMessage", referenced from:
_FirebaseMessagingPINVOKE_Firebase_Messaging_delete_FirebaseMessage_m1658331736 in Bulk_Firebase.Messaging_0.o
(maybe you meant: _FirebaseMessagingPINVOKE_Firebase_Messaging_delete_FirebaseMessage_m1658331736)
"_SWIGRegisterExceptionCallbacks_FirebaseMessaging", referenced from:
_SWIGExceptionHelper_SWIGRegisterExceptionCallbacks_FirebaseMessaging_m2350026019 in Bulk_Firebase.Messaging_0.o
(maybe you meant: _SWIGExceptionHelper_SWIGRegisterExceptionCallbacks_FirebaseMessaging_m2350026019)
"_Firebase_App_FirebaseApp_CreateInternal__SWIG_0", referenced from:
_AppUtilPINVOKE_Firebase_App_FirebaseApp_CreateInternal__SWIG_0_m2787922779 in Bulk_Firebase.App_0.o
(maybe you meant: _AppUtilPINVOKE_Firebase_App_FirebaseApp_CreateInternal__SWIG_0_m2787922779)
"_SWIGRegisterExceptionCallbacksArgument_AppUtil", referenced from:
_SWIGExceptionHelper_SWIGRegisterExceptionCallbacksArgument_AppUtil_m386473544 in Bulk_Firebase.App_0.o
(maybe you meant: _SWIGExceptionHelper_SWIGRegisterExceptionCallbacksArgument_AppUtil_m386473544)
"_Firebase_App_FirebaseApp_Name_get", referenced from:
_AppUtilPINVOKE_Firebase_App_FirebaseApp_Name_get_m2545680430 in Bulk_Firebase.App_0.o
(maybe you meant: _AppUtilPINVOKE_Firebase_App_FirebaseApp_Name_get_m2545680430)
"_Firebase_App_SetLogFunction", referenced from:
_AppUtilPINVOKE_Firebase_App_SetLogFunction_m3733654825 in Bulk_Firebase.App_0.o
(maybe you meant: _AppUtilPINVOKE_Firebase_App_SetLogFunction_m3733654825)
"_SWIGRegisterStringCallback_AppUtil", referenced from:
_SWIGStringHelper_SWIGRegisterStringCallback_AppUtil_m4196108411 in Bulk_Firebase.App_0.o
(maybe you meant: _SWIGStringHelper_SWIGRegisterStringCallback_AppUtil_m4196108411)
"_Firebase_App_SetEnabledAllAppCallbacks", referenced from:
_AppUtilPINVOKE_Firebase_App_SetEnabledAllAppCallbacks_m3339389901 in Bulk_Firebase.App_0.o
(maybe you meant: _AppUtilPINVOKE_Firebase_App_SetEnabledAllAppCallbacks_m3339389901)
"_Firebase_App_delete_FirebaseApp", referenced from:
_AppUtilPINVOKE_Firebase_App_delete_FirebaseApp_m1137114670 in Bulk_Firebase.App_0.o
(maybe you meant: _AppUtilPINVOKE_Firebase_App_delete_FirebaseApp_m1137114670)
"_Firebase_App_FirebaseApp_DefaultName_get", referenced from:
_AppUtilPINVOKE_Firebase_App_FirebaseApp_DefaultName_get_m4097276820 in Bulk_Firebase.App_0.o
(maybe you meant: _AppUtilPINVOKE_Firebase_App_FirebaseApp_DefaultName_get_m4097276820)
"_Firebase_App_AppEnableLogCallback", referenced from:
_AppUtilPINVOKE_Firebase_App_AppEnableLogCallback_m3057939313 in Bulk_Firebase.App_0.o
(maybe you meant: _AppUtilPINVOKE_Firebase_App_AppEnableLogCallback_m3057939313)
"_SWIGRegisterExceptionCallbacks_AppUtil", referenced from:
_SWIGExceptionHelper_SWIGRegisterExceptionCallbacks_AppUtil_m1809271624 in Bulk_Firebase.App_0.o
(maybe you meant: _SWIGExceptionHelper_SWIGRegisterExceptionCallbacks_AppUtil_m1809271624)
"_Firebase_App_PollCallbacks", referenced from:
_AppUtilPINVOKE_Firebase_App_PollCallbacks_m784944262 in Bulk_Firebase.App_0.o
(maybe you meant: _AppUtilPINVOKE_Firebase_App_PollCallbacks_m784944262)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have looked for solutions, but haven't found any so far. I have tried disabling BitCode, only building for one architecture, edited the Linker Flags, checked the Library Search Paths, but haven't had any luck.
Currently, this error makes me unable to build my project for iOS.
I am running Unity 5.5.0f3, XCode 8.2 and Firebase 1.1.0
Upvotes: 1
Views: 3003
Reputation: 96
I had this issue and seemed to have gotten through it.
I did not have CocoaPods installed when I first ran the build. Which quietly results in an unbuildable xcode project.
Install CocoaPods, delete the xcode project and build again.
Good luck!
Upvotes: 0
Reputation: 301
I've just figured out what the issue for the problem was. My current setup consists of working on the project on my Windows machine, and then using a Mac for building. I found out that the version control software I use (TortoiseSVN), does not automatically include ".a" files, and that resulted in the libApp.a and libMessaging.a not getting transferred to the Mac.
Upvotes: 1
Reputation: 1
I think the problem might be the deployment target. Try set it to ios 9.0 in unity before trying to build ios.
It should probably work with 8.0 also, but not before that i think.
Upvotes: 0
Reputation: 111
Apparently, you are missing Firebase library. It's not get exported for xcode project from unity. Please check if you have set the plugin import settings for it and select ios platform as well. Please find more information about settings here https://docs.unity3d.com/Manual/PluginInspector.html
Otherwise, I would search on the plugin developer site or write their support.
Upvotes: 0