facebook / facebook-ios-sdk

Used to integrate the Facebook Platform with your iOS & tvOS apps.

Home Page:https://developers.facebook.com/docs/ios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App crashes when FacebookLogin is linked to non application target

MartinStrambach opened this issue · comments

Checklist before submitting a bug report

Xcode version

15.4

Facebook iOS SDK version

17.0.2

Dependency Manager

SPM

SDK Framework

Login

Goals

Use Facebook login to a dynamic library (non-application target).

Expected results

App doesn't crash like in pre v17 SDK version.

Actual results

App crashes on launch.

dyld[41633]: Library not loaded: @rpath/FBAEMKit.framework/FBAEMKit Referenced from: <E2362606-5D3C-3F7B-8F4F-375DCF5FAF15> /private/var/containers/Bundle/Application/E33B2F85-1591-4224-9482-81D7FDEC6EC5/FacebookTest.app/Frameworks/Framework1.framework/Framework1 Reason: tried: '/Users/martin.strambach/Library/Developer/Xcode/DerivedData/FacebookTest-gvmojovtkpwmysapcajwigjdrtox/Build/Products/Debug-iphoneos/PackageFrameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/private/preboot/Cryptexes/OS/Users/martin.strambach/Library/Developer/Xcode/DerivedData/FacebookTest-gvmojovtkpwmysapcajwigjdrtox/Build/Products/Debug-iphoneos/PackageFrameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/private/var/containers/Bundle/Application/E33B2F85-1591-4224-9482-81D7FDEC6EC5/FacebookTest.app/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/private/var/containers/Bundle/Application/E33B2F85-1591-4224-9482-81D7FDEC6EC5/FacebookTest.app/Frameworks/Framework1.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/Users/martin.strambach/Library/Developer/Xcode/DerivedData/FacebookTest-gvmojovtkpwmysapcajwigjdrtox/Build/Products/Debug-iphoneos/PackageFrameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/private/preboot/Cryptexes/OS/Users/martin.strambach/Library/Developer/Xcode/DerivedData/FacebookTest-gvmojovtkpwmysapcajwigjdrtox/Build/Products/Debug-iphoneos/PackageFrameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/private/var/containers/Bundle/Application/E33B2F85-1591-4224-9482-81D7FDEC6EC5/FacebookTest.app/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/Users/martin.strambach/Library/Developer/Xcode/DerivedData/FacebookTest-gvmojovtkpwmysapcajwigjdrtox/Build/Products/Debug-iphoneos/PackageFrameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/private/preboot/Cryptexes/OS/Users/martin.strambach/Library/Developer/Xcode/DerivedData/FacebookTest-gvmojovtkpwmysapcajwigjdrtox/Build/Products/Debug-iphoneos/PackageFrameworks/FBAEMKit.framework/FBAEMKit' (no such file), '/private/var/containers/Bundle/Application/E33B2F85-1591-4224-9482-81D7FDEC6EC5/FacebookTest.app/Frameworks/FBAEMKit.framework/FBAEMKit' (no such file)

Steps to reproduce

FacebookTest.zip

Example project in the attachment. Run the project on a physical device and the app crashes on launch. Switch Facebook SDK to version 16.3.1 and launch again. It then runs just fine.
When I link the SDK to the application target it works but it's not what I'm trying to achieve.

Code samples & details

No response