- Unity Version: 2020.3.25f1
- XCode Version: 13.2.1
- Unity FB SDK: Migrating from 11. to 14.0.0
After resisting updating the Facebook Unity SDK due to editor/ide related issues introduced in 13.2, was working to update to Unity Facebook SDK version 14.0.0. After resolving the standard issues to be in compliance with FB's updates (including client token in the FB Settings specifically and setting the DLLs to the correct build architecture), I had been able to build webgl and android without issue, but have encountered an iOS build fail.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ACAccountStore", referenced from:
objc-class-ref in Util.o
"_ACFacebookAppIdKey", referenced from:
_Util_getNativeFBPermissionStatus in Util.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Reading through the various other issues hitting a similar Undefined symbols for architecture blah makes me think I might either be missing something in my linker settings, or potentially missing a framework I need to reference. Originally I had assumed it was something happening during archiving, but the same error shows when just trying to build the xcode project. The pod file builds successfully and resolves without issue, so the xcode workspace is being built.
CodePudding user response:
This is solved by: https://github.com/facebook/facebook-sdk-for-unity/wiki/FAQ---Troubleshooting-Unity-SDK-14.0.0
Your issue is "Issue 2: dlls misconfiguration"--for completion's sake, below is the solution in its entirety. I'm leaving the misspellings and bad grammar below just to emphasize how sloppy these guys are.
"Solution:
This is an indication of mis-configuration of dlls in Unity. When Unity SDK is imported into Unity, unfortunately Unity reconfigures all dlls to 'All Platforms' and this causes an issue when building on a particular platform. The way to resolve this, is to reconfigure the dlls. You will find them in Unity under FacebookSDK -> Plugins and all the dlls are under their various platform folders such as Android / Canvas / Editor / iOS etc. Click on them and an inspector will appear (attached screenshot). The example attached shows the configuration for an Android dll. Uncheck All Platforms (if needed) and select Android. Do the same for the rest:
Android.DLL to Android platform IOS Dll to iOS platform Canavs to webgl"
CodePudding user response:
I have encountered the same problem before, if you have SDK in your project, try to update the SDK you are using, if not, I suggest you to use Facebook SDK version 11.0, this will solve your problem.