facebook / facebook-ios-sdk

Used to integrate the Facebook Platform with your iOS & tvOS apps.
https://developers.facebook.com/docs/ios
Other
7.8k stars 3.55k forks source link

FB SDK 17.0.1+ crashes on iOS 13.1.3: relative file paths not allowed '@rpath/libswiftXPC.dylib' #2430

Open Wnntyl opened 5 months ago

Wnntyl commented 5 months ago

Checklist before submitting a bug report

Xcode version

15.0.1

Facebook iOS SDK version

17.0.2

Dependency Manager

CocoaPods

SDK Framework

Other / I don't know

Goals

I want my app to be able to start

Expected results

I expect not to have a crash

Actual results

Hi!

Short: Our game crashes on launch on iOS 13.1.3 with FB SDK 17.0.1 and 17.0.2.

Log:

May 22 16:38:45 iPhone-XS-QA MyApp(CoreFoundation)[387] : Error loading /var/containers/Bundle/Application/99834DD0-4983-46BC-A990-0725895ABFC2/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework: dlopen(/var/containers/Bundle/Application/99834DD0-4983-46BC-A990-0725895ABFC2/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework, 0x0109): relative file paths not allowed '@rpath/libswiftXPC.dylib'

More info:

Our game supports iOS 12+. Since the v17.0.1+ is mandatory because of the Apple Privacy Manifest support, we are going to ship an update soon knowing some of our users, including payers, won't be able to launch the game which is unfortunate.

Steps to reproduce

Code samples & details

// A podfile from the empty test project:

source 'https://cdn.cocoapods.org/'

platform :ios, '12.0'

target 'UnityFramework' do
  pod 'FBSDKCoreKit', '17.0.2'
  pod 'FBSDKCoreKit_Basics', '17.0.2'
  pod 'FBSDKGamingServicesKit', '17.0.2'
  pod 'FBSDKLoginKit', '17.0.2'
  pod 'FBSDKShareKit', '17.0.2'
end
target 'Unity-iPhone' do
end
jksmx commented 4 months ago

swiftXPC require iOS17.4+, iOS17.4+ require XCode15.3 So, you need upgrade XCode version to 15.3 to resolve this problem.

Info from follow links:

You can follow my step to find why it happen :

  1. download & unzip firebase ios sdk
  2. Go to folder where contain FBAEMKit
  3. ar -x FBAEMKit non-fat file, you can get many .o file
  4. use nm -u *.o to check link symbol .

follow log is some of my result , you can find __swift_FORCE_LOAD_$_swiftXPC

SKAdNetworkReporting.o:
__swift_FORCE_LOAD_$_swiftCompatibility50
__swift_FORCE_LOAD_$_swiftCompatibility51
__swift_FORCE_LOAD_$_swiftCompatibility56
__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency
__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements
__swift_FORCE_LOAD_$_swiftCoreFoundation
__swift_FORCE_LOAD_$_swiftDarwin
__swift_FORCE_LOAD_$_swiftDispatch
__swift_FORCE_LOAD_$_swiftFoundation
__swift_FORCE_LOAD_$_swiftObjectiveC
__swift_FORCE_LOAD_$_swiftXPC
guojunliu commented 2 months ago

swiftXPC require iOS17.4+, iOS17.4+ require XCode15.3 So, you need upgrade XCode version to 15.3 to resolve this problem.

Info from follow links:

You can follow my step to find why it happen :

  1. download & unzip firebase ios sdk
  2. Go to folder where contain FBAEMKit
  3. ar -x FBAEMKit non-fat file, you can get many .o file
  4. use nm -u *.o to check link symbol .

follow log is some of my result , you can find __swift_FORCE_LOAD_$_swiftXPC

SKAdNetworkReporting.o:
__swift_FORCE_LOAD_$_swiftCompatibility50
__swift_FORCE_LOAD_$_swiftCompatibility51
__swift_FORCE_LOAD_$_swiftCompatibility56
__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency
__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements
__swift_FORCE_LOAD_$_swiftCoreFoundation
__swift_FORCE_LOAD_$_swiftDarwin
__swift_FORCE_LOAD_$_swiftDispatch
__swift_FORCE_LOAD_$_swiftFoundation
__swift_FORCE_LOAD_$_swiftObjectiveC
__swift_FORCE_LOAD_$_swiftXPC

I am using Xcode15.3 and Xcode15.4 and this crash still occurs on iOS13.1.2 devices