skip to Main Content
  • 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.

EDIT: Adding a little more info, I had already done the dll import settings solution suggested.

2

Answers


  1. Chosen as BEST ANSWER

    After getting some input from an engineer that had worked on this project in the past, managed to find that the missing symbol was related to some old FB Code no longer supported, and it was not in use by our app anymore. Because of this, was able to cleanly remove the old code and resolve the build issue. Things appeared to be working as intended. For visibility, we had an internal class using some extern methods to bridge between our app code and the native code pertaining to platform. iOS had a method getNativeFBPermissionStatus that was part of a Util.m class.


  2. 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"

    Edit: As noted additionally below if you aren’t building for Windows (or any of the other platforms), just delete those folders. Regardless you will HAVE to delete the Windows x86 folder if you want your build to work on mobile.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search