0

I created a NuGet package Xamarin.Facebook.LoginKit.iOS which is built as a native binding library and has dependencies on Xamarin.Facebook.CoreKit.iOS.

When I am trying to run it on real device it crushes with:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FBSDKAccessToken", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKAppEvents", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKAppLink", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKAppLinkNavigation", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKAppLinkResolver", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKAppLinkTarget", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKAppLinkUtility", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKAuthenticationToken", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKGraphErrorRecoveryProcessor", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKGraphRequest", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKGraphRequestConnection", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKGraphRequestConnectionFactory", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKGraphRequestDataAttachment", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKProfile", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKSettings", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKURL", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKUtility", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_FBSDKWebViewAppLinkResolver", referenced from:
      objc-class-ref in registrar.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

As far as I understood i need to add FBSDKCoreKit.xcframework,

my .nuspec file has such dependencies on it, but it throws the error above

<dependencies>
            <group targetFramework="Xamarin.iOS1.0" >
                <dependency id="Facebook.CoreKit.iOS" version="$version$" include="All"/>
            </group>
            <group targetFramework="net8.0-ios17.2" >
                <dependency id="Facebook.CoreKit.iOS" version="$version$" include="All"/>
            </group>
        </dependencies>

I tried adding dependencies to FBSDKCoreKit.xcframework directly and it works, but I'm not sure if it's the right way.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.