Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library not loaded: @rpath/FBAEMKit.framework/FBAEMKit #659

Open
5 tasks done
utkusaridede opened this issue Dec 12, 2022 · 67 comments
Open
5 tasks done

Library not loaded: @rpath/FBAEMKit.framework/FBAEMKit #659

utkusaridede opened this issue Dec 12, 2022 · 67 comments
Labels

Comments

@utkusaridede
Copy link

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

  • Unity Editor Version: 2020.3.42f1
  • Unity SDK Version: 15.1.0
  • Installation Platform & Verison: [iOS|Android] version 15.1.0

Goals

I want to upgrade the Facebook SDK from 11.0.0 to 15.1.0.

Expected Results

I expect the application to run without a crash.

Actual Results

2022-12-12 10:58:02.112200+0300 X[2885:960799] [general] Error loading /var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/UnityFramework (140): dlopen(/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/UnityFramework, 0x0109): Library not loaded: @rpath/FBAEMKit.framework/FBAEMKit Referenced from: <9BADC43E-9E20-3632-B97D-D01CF81F4F4D> /private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/UnityFramework Reason: tried: '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/preboot/Cryptexes/OS@rpath/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/System/Library/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache) 2022-12-12 10:58:02.144931+0300 X[2885:960799] [general] Error loading /var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/UnityFramework (140): dlopen(/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/UnityFramework, 0x0109): Library not loaded: @rpath/FBAEMKit.framework/FBAEMKit Referenced from: <9BADC43E-9E20-3632-B97D-D01CF81F4F4D> /private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/UnityFramework Reason: tried: '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/preboot/Cryptexes/OS@rpath/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/UnityFramework.framework/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/private/var/containers/Bundle/Application/69D00D39-D41D-4E4B-B51A-BD2E4D7F88DD/X.app/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2), '/System/Library/Frameworks/FBAEMKit.framework/FBAEMKit' (errno=2, not in dyld cache)

Steps to Reproduce

  • Add OneSignal SDK 3.0.7.
  • Add Firebase SDK 10.2.0 which requires enabling iOS Resolver Setting - "Add use_frameworks! to Podfile"
  • Add Facebook SDK 15.1.0 which states "Add use_frameworks! to Podfile" should not be added as far as I understand.
  • Build and run on the real device. An immediate crash will happen.

Code Samples & Details

A code sample isn't required to reproduce the issue.

It seems that the required Facebook and other frameworks are not included in the Unity-iPhone General "Frameworks, Libraries, and Embedded Content" section if the mentioned use_frameworks! is included in the podfile.

@go3k
Copy link

go3k commented Dec 12, 2022

I have the same issue, anyone resolved this?
---Edit
Fixed this issue by revert SDK version to 14.1.0

@utkusaridede
Copy link
Author

I have the same issue, anyone resolved this? ---Edit Fixed this issue by revert SDK version to 14.1.0

Reverting to the Facebook SDK 11.0.0 fixes, too. Using the most recent version has a problem.

@SilkageNet
Copy link

SilkageNet commented Dec 14, 2022

Don't you even test it on the real machine when the release comes out? Speechless FB

@unf0rgettable
Copy link

Same problem. Unity 2021.3.1f1. I just update facebook from 14.1 to 15.1

@plotlessplot
Copy link

Same issue here. Building with Unity 2021.3.16f1 and Facebook SDK 15.1.0. Immediate crash when attempting to run the application on an iOS device.

Rolling back to 14.1.0 which had no issues (apart from the need to manually specify the Android SDK path in the Unity editor).

Hoping for better-tested versions of the SDK down the line. 🤞

@cmcpasserby
Copy link

it seems to relate to this issue in the facebook-ios-sdk
facebook/facebook-ios-sdk#2128

i can make the latest version run fine if i make those suggested Podfile updates, then running pod install.

still wish they would properly test there stuff.

@plotlessplot
Copy link

plotlessplot commented Dec 20, 2022

I was not able to fix it by removing ":linkage => :static", because the Firebase SDK seems to rely on it.

However, I noticed that with FB Unity SDK 14.1.0, the generated Podfile had...

use_frameworks! :linkage => :static 
use_frameworks!

...at the end, whereas with 15.1.0 there was only...

use_frameworks! :linkage => :static

I changed my Podfile to the following and it worked correctly. The game loads and seems to be working with no issues. I'm unsure if this can create problems with other SDKs, though.

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

platform :ios, '12.0'

target 'UnityFramework' do
  pod 'AppLovinMediationByteDanceAdapter', '4.8.1.0.1'
  pod 'AppLovinMediationFacebookAdapter', '6.12.0.1'
  pod 'AppLovinMediationFyberAdapter', '8.1.7.1'
  pod 'AppLovinMediationGoogleAdapter', '9.14.0.1'
  pod 'AppLovinMediationGoogleAdManagerAdapter', '9.14.0.1'
  pod 'AppLovinMediationUnityAdsAdapter', '4.4.1.0'
  pod 'AppLovinSDK', '11.6.0'
  pod 'FBSDKCoreKit', '~> 15.1'
  pod 'FBSDKCoreKit_Basics', '~> 15.1'
  pod 'FBSDKGamingServicesKit', '~> 15.1'
  pod 'FBSDKLoginKit', '~> 15.1'
  pod 'FBSDKShareKit', '~> 15.1'
  pod 'Firebase/Analytics', '10.3.0'
  pod 'Firebase/Core', '10.3.0'
  pod 'Firebase/Crashlytics', '10.3.0'
  pod 'Firebase/DynamicLinks', '10.3.0'
  pod 'Firebase/Messaging', '10.3.0'
  pod 'Firebase/RemoteConfig', '10.3.0'
end
target 'Unity-iPhone' do
end
use_frameworks! :linkage => :static
use_frameworks!

@cmcpasserby
Copy link

cmcpasserby commented Dec 20, 2022

so for me i just had 1 use_frameworks! at the end of the file, and one after the
target 'UnityFramework' do line.


platform :ios, '12.0'

target 'UnityFramework' do
  use_frameworks!
  pod 'AppLovinMediationAdColonyAdapter', '4.9.0.0.2'
  pod 'AppLovinMediationChartboostAdapter', '9.1.0.0'
  pod 'AppLovinMediationFacebookAdapter', '6.12.0.1'
  pod 'AppLovinMediationFyberAdapter', '8.1.7.1'
  pod 'AppLovinMediationGoogleAdapter', '9.14.0.1'
  pod 'AppLovinMediationGoogleAdManagerAdapter', '9.14.0.1'
  pod 'AppLovinMediationHyprMXAdapter', '6.0.3.1'
  pod 'AppLovinMediationInMobiAdapter', '10.1.2.3'
  pod 'AppLovinMediationIronSourceAdapter', '7.2.6.0.1'
  pod 'AppLovinMediationMintegralAdapter', '7.2.8.0.1'
  pod 'AppLovinMediationUnityAdsAdapter', '4.4.1.0'
  pod 'AppLovinMediationVungleAdapter', '6.12.1.1'
  pod 'AppLovinSDK', '11.6.0'
  pod 'AppsFlyerFramework', '6.9.1'
  pod 'FBAudienceNetwork', '> 6.3.0'
  pod 'FBSDKCoreKit', '~> 15.1'
  pod 'FBSDKCoreKit_Basics', '~> 15.1'
  pod 'FBSDKGamingServicesKit', '~> 15.1'
  pod 'FBSDKLoginKit', '~> 15.1'
  pod 'FBSDKShareKit', '~> 15.1'
  pod 'Firebase/Analytics', '10.3.0'
  pod 'Firebase/Core', '10.3.0'
  pod 'Firebase/Crashlytics', '10.3.0'
  pod 'Firebase/Messaging', '10.3.0'
  pod 'Firebase/RemoteConfig', '10.3.0'
end
target 'Unity-iPhone' do
end
use_frameworks!

@unf0rgettable
Copy link

Мне не удалось исправить это, удалив ":linkage => :static", потому что Firebase SDK, похоже, полагается на это.

Однако я заметил, что с FB Unity SDK 14.1.0 сгенерированный подфайл...

use_frameworks! :linkage => :static 
use_frameworks!

... в конце, тогда как с 15.1.0 было только...

use_frameworks! :linkage => :static

Я изменил свой Podfile на следующий, и он работал правильно. Игра загружается и работает без проблем. Однако я не уверен, что это может создать проблемы с другими SDK.

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

platform :ios, '12.0'

target 'UnityFramework' do
  pod 'AppLovinMediationByteDanceAdapter', '4.8.1.0.1'
  pod 'AppLovinMediationFacebookAdapter', '6.12.0.1'
  pod 'AppLovinMediationFyberAdapter', '8.1.7.1'
  pod 'AppLovinMediationGoogleAdapter', '9.14.0.1'
  pod 'AppLovinMediationGoogleAdManagerAdapter', '9.14.0.1'
  pod 'AppLovinMediationUnityAdsAdapter', '4.4.1.0'
  pod 'AppLovinSDK', '11.6.0'
  pod 'FBSDKCoreKit', '~> 15.1'
  pod 'FBSDKCoreKit_Basics', '~> 15.1'
  pod 'FBSDKGamingServicesKit', '~> 15.1'
  pod 'FBSDKLoginKit', '~> 15.1'
  pod 'FBSDKShareKit', '~> 15.1'
  pod 'Firebase/Analytics', '10.3.0'
  pod 'Firebase/Core', '10.3.0'
  pod 'Firebase/Crashlytics', '10.3.0'
  pod 'Firebase/DynamicLinks', '10.3.0'
  pod 'Firebase/Messaging', '10.3.0'
  pod 'Firebase/RemoteConfig', '10.3.0'
end
target 'Unity-iPhone' do
end
use_frameworks! :linkage => :static
use_frameworks!

for me it didn't work

@unf0rgettable
Copy link

source 'https://cdn.cocoapods.org/'
platform :ios, '12.0'

target 'UnityFramework' do
  pod 'AppLovinMediationAdColonyAdapter', '4.9.0.0.2'
  pod 'AppLovinMediationByteDanceAdapter', '4.8.1.0.1'
  pod 'AppLovinMediationFacebookAdapter', '6.12.0.1'
  pod 'AppLovinMediationGoogleAdapter', '9.14.0.1'
  pod 'AppLovinMediationGoogleAdManagerAdapter', '9.14.0.1'
  pod 'AppLovinMediationIronSourceAdapter', '7.2.6.0.1'
  pod 'AppLovinMediationMintegralAdapter', '7.2.8.0.1'
  pod 'AppLovinMediationUnityAdsAdapter', '4.5.0.0'
  pod 'AppLovinMediationVungleAdapter', '6.12.1.1'
  pod 'AppLovinSDK', '11.6.0'
use_frameworks!
  pod 'FBSDKCoreKit', '~> 15.1'
  pod 'FBSDKCoreKit_Basics', '~> 15.1'
  pod 'FBSDKGamingServicesKit', '~> 15.1'
  pod 'FBSDKLoginKit', '~> 15.1'
  pod 'FBSDKShareKit', '~> 15.1'
  pod 'Firebase/Analytics', '10.1.0'
  pod 'Firebase/Auth', '10.1.0'
  pod 'Firebase/Core', '10.1.0'
  pod 'Firebase/Crashlytics', '10.1.0'
  pod 'Firebase/Storage', '10.1.0'
end
target 'Unity-iPhone' do
end
use_frameworks!

this podfile configuration and
pod install
WORKS!

@kritikosabzorba
Copy link

We had the same issue. Using XCode 14.1.0 seems to fix the problem.

@KiranJodhani
Copy link

I had same issue.. Had to revert FB SDK

@iremguner
Copy link

source 'https://cdn.cocoapods.org/'
platform :ios, '12.0'

target 'UnityFramework' do
  pod 'AppLovinMediationAdColonyAdapter', '4.9.0.0.2'
  pod 'AppLovinMediationByteDanceAdapter', '4.8.1.0.1'
  pod 'AppLovinMediationFacebookAdapter', '6.12.0.1'
  pod 'AppLovinMediationGoogleAdapter', '9.14.0.1'
  pod 'AppLovinMediationGoogleAdManagerAdapter', '9.14.0.1'
  pod 'AppLovinMediationIronSourceAdapter', '7.2.6.0.1'
  pod 'AppLovinMediationMintegralAdapter', '7.2.8.0.1'
  pod 'AppLovinMediationUnityAdsAdapter', '4.5.0.0'
  pod 'AppLovinMediationVungleAdapter', '6.12.1.1'
  pod 'AppLovinSDK', '11.6.0'
use_frameworks!
  pod 'FBSDKCoreKit', '~> 15.1'
  pod 'FBSDKCoreKit_Basics', '~> 15.1'
  pod 'FBSDKGamingServicesKit', '~> 15.1'
  pod 'FBSDKLoginKit', '~> 15.1'
  pod 'FBSDKShareKit', '~> 15.1'
  pod 'Firebase/Analytics', '10.1.0'
  pod 'Firebase/Auth', '10.1.0'
  pod 'Firebase/Core', '10.1.0'
  pod 'Firebase/Crashlytics', '10.1.0'
  pod 'Firebase/Storage', '10.1.0'
end
target 'Unity-iPhone' do
end
use_frameworks!

this podfile configuration and pod install WORKS!

these steps worked for me too. Using XCode 14.2 and Facebook SDK 15.1

@oliverebert
Copy link

oliverebert commented Jan 17, 2023

In order to modify the generated Podfile directly in Unity you can create a script like this:

using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;

public class PodFilePostProcess : MonoBehaviour
{
#if UNITY_IOS
    [PostProcessBuildAttribute(45)]//must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's added before "pod install" (50)
    private static void PostProcessBuild_iOS(BuildTarget target, string buildPath)
    {
        if (target == BuildTarget.iOS)
        {

            using (StreamWriter sw = File.AppendText(buildPath + "/Podfile"))
            {
                sw.WriteLine("use_frameworks!");
            }
        }
    }
#endif
}

@josealvarez97
Copy link

josealvarez97 commented Jan 22, 2023

In order to modify the generated Podfile directly in Unity you can create a script like this:

using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;

public class PodFilePostProcess : MonoBehaviour
{
#if UNITY_IOS
    [PostProcessBuildAttribute(45)]//must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's added before "pod install" (50)
    private static void PostProcessBuild_iOS(BuildTarget target, string buildPath)
    {
        if (target == BuildTarget.iOS)
        {

            using (StreamWriter sw = File.AppendText(buildPath + "/Podfile"))
            {
                sw.WriteLine("use_frameworks!");
            }
        }
    }
#endif
}

I am using version 15 and this script allowed my app to launch again on my device (was crashing at launch).

P.S. One issue though, I believe it shouldn't be a monobehaviour. This scripts generally go on the editor folder in Assets, and hence there's no need to inherit from monobehaviour. In fact, (I think) Unity cannot build the project if you attach it to a monobehaviour.

@josealvarez97
Copy link

In order to modify the generated Podfile directly in Unity you can create a script like this:

using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;

public class PodFilePostProcess : MonoBehaviour
{
#if UNITY_IOS
    [PostProcessBuildAttribute(45)]//must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's added before "pod install" (50)
    private static void PostProcessBuild_iOS(BuildTarget target, string buildPath)
    {
        if (target == BuildTarget.iOS)
        {

            using (StreamWriter sw = File.AppendText(buildPath + "/Podfile"))
            {
                sw.WriteLine("use_frameworks!");
            }
        }
    }
#endif
}

I am using version 15 and this script allowed my app to launch again on my device (was crashing at launch).

P.S. One issue though, I believe it shouldn't be a monobehaviour. This scripts generally go on the editor folder in Assets, and hence there's no need to inherit from monobehaviour. In fact, (I think) Unity cannot build the project if you attach it to a monobehaviour.

I had issues with my production version. It started crashing again. I am using Unity Cloud build, not sure if there is an issue with that. My development version was working fine on my Mac with my development certificate, but once I uploaded the production version to TestFlight (and App Store in fact), my app was crashing at launch. That was very unfortunate because it happened in production, of course.

Really bothered by this issue.

@alkanyunus
Copy link

Same here. Downgraded though

@JordiFB
Copy link
Contributor

JordiFB commented Feb 9, 2023

Hi, sorry to hear about this issue. We are looking into it to fix in the next version.

Just a couple of questions:

  • Which cocoapods version are you using?
  • Could you try to use cocoapods 1.11.3 ?

We recommended cocoapods 1.11.3 for UnitySDK 15.1.0 -> Upgrade guide: https://developers.facebook.com/docs/unity/upgrading-7.x

Thank you

@artMacBookPro
Copy link

artMacBookPro commented Feb 12, 2023

Hi! @JordiFB

pod --version
1.11.3
UnitySDK 15.1.0

Problem exist!
Dear FB Team, it seems that EVERY last versions of SDK i upgraded (..->14.0, 15.1) was not ready for production and crashed. You definetely should do something with QA process, kmon...

..sorry for bold - cant remove style(

@ahmetyazir22
Copy link

Same issue here, too. "use_frameworks!" is not a viable solution. Please fix.

@stzjunoh
Copy link

  1. Download the Facebook SDK.
  2. Delete the "Required device capabilities" entry in the info.plist file inside all Facebook Frameworks.

@Schrodinger123
Copy link

Revert Facebook SDK to 14.1.0 fix the problem.
FFS FB, hire some QA.

@JordiFB
Copy link
Contributor

JordiFB commented Mar 1, 2023

@artMacBookPro Could you try the latest version 16.0.0?
Check the upgrade guide before https://developers.facebook.com/docs/unity/upgrading-7.x

@Apoll0
Copy link

Apoll0 commented Mar 3, 2023

Could you try the latest version 16.0.0?

Tried today. The problem exists
FB SDK 16.0.0
Unity 2020.3.45
Xcode 14.2

@JordiFB
Copy link
Contributor

JordiFB commented Mar 3, 2023

Thanks @Apoll0 for testing it.
We will continue working on it.

@Apoll0
Copy link

Apoll0 commented Mar 3, 2023 via email

@HawkenKing
Copy link

HawkenKing commented Mar 4, 2023

I get this issue on Facebook SDKs 14
Unity 2021.3.16 LTS (iOS)
Xcode 13.4.1
Cocoapods 1.11.3
MacOS 12.6

(SDK 15 & 16 tell me I don't have cocoapods installed and crash the Unity build process)

When submitting to Appstore with SDK 14, the build is rejected with: contains disallowed file 'Frameworks'

try this:
https://forum.unity.com/threads/2019-3-validation-on-upload-to-store-gives-unityframework-framework-contains-disallowed-file.751112/#post-7698952

worked for me!

@gollobo
Copy link

gollobo commented Apr 4, 2023

Any news on this?

@snappedToGrid
Copy link

Thank you @reezoobose , your solution was the only thing that worked for me AND kept Firebase analytics still working.
In the other solutions, if I removed ":linkage => :static" the game did run, but the drawback was that Firebase Analytics stopped working, with your solution it keeps on working.

It's really unfortunate that we need to resort to these kind of workarounds and the SDK can't just work.

@AlexisFerrerYsocorp
Copy link

Still having the issue with the latest version 16.0.1
https://developers.facebook.com/docs/unity/change-log

@wristshot0
Copy link

It's frustrating to have to scroll to the bottom of every one of these threads through a bunch of thumbs ups from people who clearly haven't tested across situations, but @reezoobose 's solution works, and is clearly the answer to the problem described by Xcode (that the frameworks are simply not included). Other solutions interfere with other SDKs, including Google's SDK, which is a nonstarter for most projects.

This seems to have become an issue again after the latest Xcode update (14.3.1). Facebook, you need to come out with SDK updates in a timely fashion--as soon as Xcode updates you should be testing your SDK with the new version.

@grayby
Copy link

grayby commented Jul 9, 2023

Works fine on Facebook SDK 16.0.1 after updating CocoaPods to 1.12.1 and writing 'use_frameworks!' to the end of the Podfile via script
XCode 14.3.1
Unity 2021.3.18

To update pods run in the terminal next commands:

  • sudo gem install cocoapods
  • pod setup

Check CocoaPods version
pod --version

Hope you will save a few hours and drink some beer instead

@SaariTech
Copy link

Anyone know how to solve this in Unity Cloud Build? It seems like the issue is at Facebook's side as the other plugins using CocoPods works correctly.

@AvivWhalo
Copy link

@SaariTech having the same issue with UCB. any idea? should I just downgrade FB SDK?

@cmcpasserby
Copy link

So @reezoobose post got me onto the right track, since he was adding the xcframeworks to the main Unity-iPhone project and not just UnityFramework where things were already added properly.

Simply editing the Assets/FacebookSDK/Plugins/Editor/Dependencies.xml file to have addToAllTargets="true" added to each line fixes the issues for me, and does not require me manually fixing stuff in xcode after the unity generates the project and pod install is called.

After the modifications here is what my Dependencies.xml looks like

<?xml version="1.0" encoding="utf-8"?>
<dependencies>
    <androidPackages>
        <androidPackage spec="com.parse.bolts:bolts-android:1.4.0" />
        <androidPackage spec="com.facebook.android:facebook-core:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-applinks:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-login:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-share:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-gamingservices:[16.0,17)" />
    </androidPackages>
    <iosPods>
        <iosPod name="FBSDKCoreKit_Basics" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKCoreKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKLoginKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKShareKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKGamingServicesKit" version="~> 16.0" addToAllTargets="true" />
    </iosPods>
</dependencies>

@wristshot0
Copy link

So @reezoobose post got me onto the right track, since he was adding the xcframeworks to the main Unity-iPhone project and not just UnityFramework where things were already added properly.

Simply editing the Assets/FacebookSDK/Plugins/Editor/Dependencies.xml file to have addToAllTargets="true" added to each line fixes the issues for me, and does not require me manually fixing stuff in xcode after the unity generates the project and pod install is called.

After the modifications here is what my Dependencies.xml looks like

<?xml version="1.0" encoding="utf-8"?>
<dependencies>
    <androidPackages>
        <androidPackage spec="com.parse.bolts:bolts-android:1.4.0" />
        <androidPackage spec="com.facebook.android:facebook-core:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-applinks:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-login:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-share:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-gamingservices:[16.0,17)" />
    </androidPackages>
    <iosPods>
        <iosPod name="FBSDKCoreKit_Basics" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKCoreKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKLoginKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKShareKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKGamingServicesKit" version="~> 16.0" addToAllTargets="true" />
    </iosPods>
</dependencies>

This makes sense. I haven't tried this as @reezoobose 's solution worked for me, but if it just does what @reezoobose mentioned above then it should work.

I'm really struggling with why this wasn't picked up by Facebook QA--why is this flag false, and why do we have to do this manually?

@cmcpasserby
Copy link

cmcpasserby commented Jul 20, 2023

@wristshot0 well pretty big issues have made it in before, so not all that surprised. I am going to make a PR tonight or tomorrow for this change. But at least for now if people manually do this in their unity projects, its better then having to re do the changes every time you make a new ios build.

now these options were never needed in the past, so do get the feeling its a xcode behaviour change or how things are linked that changed.

@AvivWhalo
Copy link

So @reezoobose post got me onto the right track, since he was adding the xcframeworks to the main Unity-iPhone project and not just UnityFramework where things were already added properly.

Simply editing the Assets/FacebookSDK/Plugins/Editor/Dependencies.xml file to have addToAllTargets="true" added to each line fixes the issues for me, and does not require me manually fixing stuff in xcode after the unity generates the project and pod install is called.

After the modifications here is what my Dependencies.xml looks like

<?xml version="1.0" encoding="utf-8"?>
<dependencies>
    <androidPackages>
        <androidPackage spec="com.parse.bolts:bolts-android:1.4.0" />
        <androidPackage spec="com.facebook.android:facebook-core:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-applinks:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-login:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-share:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-gamingservices:[16.0,17)" />
    </androidPackages>
    <iosPods>
        <iosPod name="FBSDKCoreKit_Basics" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKCoreKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKLoginKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKShareKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKGamingServicesKit" version="~> 16.0" addToAllTargets="true" />
    </iosPods>
</dependencies>

Seems to have worked 👏

@utkusaridede
Copy link
Author

Environment Update

  • Unity Editor Version: 2022.3.6f1
  • Unity SDK Version: 16.1.0
  • Xcode Version: 14.3.1
  • Cocoapods Version: 1.12.1
  • Firebase SDK Version: 11.3.0 (Added to refer to the last paragraph)

None of the solutions worked for me. Therefore I downgraded the version to 14.1.0 only with the event system fix from 16.1.0. Additionally, adding missing frameworks to the .xcworkspace project can be automated but I do not want to interfere pre-build process that much while there is time until 14.1.0 reach the end of life.

Unchecking Link frameworks statically option in iOS Resolver Settings may fix some projects. On the other hand, Firebase and some other SDKs need frameworks to be statically linked.

I'm going to check the subsequent releases.

@tbiz5270
Copy link

I encountered this problem after integrating the Facebook SDK, which didn't seem to play nicely with the AppLovin MAX SDK settings.

A mixture of the above solutions worked for me. I'll list the details below.

Unity Editor: 2021.3.25f1
AppLovin MAX Plugin (Unity): 5.11.2
AppLovin MAX Plugin (iOS): 11.11.2
Facebook SDK: 16.0.1
Xcode Version: 14.2

First, I changed my iOS Resolver settings to the following:

iosResolver

These settings are different from what AppLovin's integration instructions recommend, but it was the only way I managed to get things working.

My FacebookSDK > Plugins > Editor > Dependencies.xml file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<dependencies>
    <androidPackages>
        <androidPackage spec="com.parse.bolts:bolts-android:1.4.0" />
        <androidPackage spec="com.facebook.android:facebook-core:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-applinks:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-login:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-share:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-gamingservices:[16.0,17)" />
    </androidPackages>
    <iosPods>
        <iosPod name="FBSDKCoreKit_Basics" version="~> 16.0" />
        <iosPod name="FBSDKCoreKit" version="~> 16.0" />
        <iosPod name="FBSDKLoginKit" version="~> 16.0" />
        <iosPod name="FBSDKShareKit" version="~> 16.0" />
        <iosPod name="FBSDKGamingServicesKit" version="~> 16.0" />
    </iosPods>
</dependencies>

After building the project to iOS, it generates a Podfile looking like this:

source 'https://cdn.cocoapods.org/'
platform :ios, '12.0'

target 'UnityFramework' do
  pod 'AppLovinMediationAdColonyAdapter', '4.9.0.0.4'
  pod 'AppLovinMediationByteDanceAdapter', '5.4.0.7.0'
  pod 'AppLovinMediationChartboostAdapter', '9.4.0.0'
  pod 'AppLovinMediationFacebookAdapter', '6.14.0.0'
  pod 'AppLovinMediationGoogleAdapter', '10.9.0.1'
  pod 'AppLovinMediationIronSourceAdapter', '7.4.0.0.1'
  pod 'AppLovinMediationUnityAdsAdapter', '4.8.0.1'
  pod 'AppLovinMediationVungleAdapter', '7.0.1.0'
  pod 'AppLovinSDK', '11.11.2'
  pod 'FBAudienceNetwork', '~> 6.4.1'
  pod 'FBSDKCoreKit', '~> 16.0'
  pod 'FBSDKCoreKit_Basics', '~> 16.0'
  pod 'FBSDKGamingServicesKit', '~> 16.0'
  pod 'FBSDKLoginKit', '~> 16.0'
  pod 'FBSDKShareKit', '~> 16.0'
end
target 'Unity-iPhone' do
end
use_frameworks! :linkage => :static

However, I had to manually remove the pod 'FBAudienceNetwork', '~> 6.4.1' line to make Xcode happy. So my final Podfile looks like this:

source 'https://cdn.cocoapods.org/'
platform :ios, '12.0'

target 'UnityFramework' do
  pod 'AppLovinMediationAdColonyAdapter', '4.9.0.0.4'
  pod 'AppLovinMediationByteDanceAdapter', '5.4.0.7.0'
  pod 'AppLovinMediationChartboostAdapter', '9.4.0.0'
  pod 'AppLovinMediationFacebookAdapter', '6.14.0.0'
  pod 'AppLovinMediationGoogleAdapter', '10.9.0.1'
  pod 'AppLovinMediationIronSourceAdapter', '7.4.0.0.1'
  pod 'AppLovinMediationUnityAdsAdapter', '4.8.0.1'
  pod 'AppLovinMediationVungleAdapter', '7.0.1.0'
  pod 'AppLovinSDK', '11.11.2'
  pod 'FBSDKCoreKit', '~> 16.0'
  pod 'FBSDKCoreKit_Basics', '~> 16.0'
  pod 'FBSDKGamingServicesKit', '~> 16.0'
  pod 'FBSDKLoginKit', '~> 16.0'
  pod 'FBSDKShareKit', '~> 16.0'
end
target 'Unity-iPhone' do
end
use_frameworks! :linkage => :static

Changing: 'FBAudienceNetwork', '~> 6.4.1' to 'FBAudienceNetwork', '~> 6.14.0' to match the AppLovin Facebook Adaptor version also worked. Either way, these changes seem to correctly generate the required pod.

After making these changes to the Podfile, I run pod update to install the pods and generate the workspace file.

Open the workspace file (Unity-iPhone.xcworkspace), not the Xcode file (Unity-iPhone.xcodeproj) to open the project in Xcode.

Next, I had to manually drag and drop the Facebook SDK pod frameworks into the Unity-iPhone project:

dragPods

Finally, after all of these steps, I was able to compile the build and run it on my iOS device without crashing on start.

Hope this helps!

@Schrodinger123
Copy link

OMFG, it's 16.0.1 and this still not fix yet?
Unbelievable META.

@dreamcodestudio
Copy link

dreamcodestudio commented Aug 28, 2023

attribute addToAllTargets="true" works fine, can you add it by default or present static libraries for working normal with other SDKs

<iosPods>
        <iosPod name="FBSDKCoreKit_Basics" version="~> 16.0" />
        <iosPod name="FBSDKCoreKit" version="~> 16.0" />
        <iosPod name="FBSDKLoginKit" version="~> 16.0" />
        <iosPod name="FBSDKShareKit" version="~> 16.0" />
        <iosPod name="FBSDKGamingServicesKit" version="~> 16.0" />
    </iosPods>

@AlexisFerrerYsocorp
Copy link

Still not working with version 16.0.2.
Sadly it's not even a joke...

@dreamcodestudio
Copy link

In our case updating to 16.0.2 works fine

@ValeriyBogorodskiy
Copy link

Came across this thread after updating Facebook SDK from 14.1.0 to 16.0.2. Updating pods to the latest version (1.13.0) fixed the issue

@ankit-infinitygames
Copy link

It's almost 1 year and this issue is still not fixed.

@mofish9
Copy link

mofish9 commented Oct 30, 2023

It's unbelievable and this issue still exists on the latest version in 2023.

FB SDK 16.0.2
Firebase SDK 11.6.0
Unity 2021.3.25
Xcode 15.0.1

Do you guys do any testing before the release? The SDKs and Xcode we use are all the latest version and before the FB sdk is introduced, everything works fine.

@st21a1
Copy link

st21a1 commented Nov 7, 2023

The problem still exists.
FB SDK 16.0.2
GoogleMobileAds SDK 8.5.2
Unity 2021.3.25
Xcode 14.3.1

@r0llac0de
Copy link

The problem still exists.
FB SDK 16.0.1
Unity 2022.3.19f1
Xcode 14.3.1

@crawfordbowl
Copy link

So @reezoobose post got me onto the right track, since he was adding the xcframeworks to the main Unity-iPhone project and not just UnityFramework where things were already added properly.

Simply editing the Assets/FacebookSDK/Plugins/Editor/Dependencies.xml file to have addToAllTargets="true" added to each line fixes the issues for me, and does not require me manually fixing stuff in xcode after the unity generates the project and pod install is called.

After the modifications here is what my Dependencies.xml looks like

<?xml version="1.0" encoding="utf-8"?>
<dependencies>
    <androidPackages>
        <androidPackage spec="com.parse.bolts:bolts-android:1.4.0" />
        <androidPackage spec="com.facebook.android:facebook-core:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-applinks:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-login:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-share:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-gamingservices:[16.0,17)" />
    </androidPackages>
    <iosPods>
        <iosPod name="FBSDKCoreKit_Basics" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKCoreKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKLoginKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKShareKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKGamingServicesKit" version="~> 16.0" addToAllTargets="true" />
    </iosPods>
</dependencies>

This is fixed the issue for us.

What our auto generated podfile looks like:

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

platform :ios, '12.0'

target 'UnityFramework' do
  pod 'AppsFlyerFramework', '6.9.1'
  pod 'FBSDKCoreKit', '~> 16.0.1'
  pod 'FBSDKCoreKit_Basics', '~> 16.0.1'
  pod 'FBSDKGamingServicesKit', '~> 16.0.1'
  pod 'FBSDKLoginKit', '~> 16.0.1'
  pod 'FBSDKShareKit', '~> 16.0.1'
  pod 'FCUUID'
  pod 'Firebase/Analytics', '10.13.0'
  pod 'Firebase/AppCheck', '10.13.0'
  pod 'Firebase/Auth', '10.13.0'
  pod 'Firebase/Core', '10.13.0'
  pod 'Firebase/Crashlytics', '10.13.0'
  pod 'Firebase/Firestore', '10.13.0'
  pod 'Firebase/Messaging', '10.13.0'
end
target 'Unity-iPhone' do
  pod 'FBSDKCoreKit', '~> 16.0.1'
  pod 'FBSDKCoreKit_Basics', '~> 16.0.1'
  pod 'FBSDKGamingServicesKit', '~> 16.0.1'
  pod 'FBSDKLoginKit', '~> 16.0.1'
  pod 'FBSDKShareKit', '~> 16.0.1'
end
use_frameworks! :linkage => :static
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
  end
end

@Duloinc
Copy link

Duloinc commented Mar 10, 2024

The game crashes with the same error, using FB 16.3.1 & cocoapods 1.15.2

This fixed it for me

target 'UnityFramework' do
use_frameworks!
pod 'AppsFlyerFramework', '6.13.0'
pod 'FBSDKCoreKit'
pod 'FBSDKCoreKit_Basics'
pod 'FBSDKGamingServicesKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'Firebase/Core', '10.20.0'
pod 'Firebase/Messaging', '10.20.0'
pod 'IronSourceAdMobAdapter', '4.3.52.0'
pod 'IronSourceSDK', '7.8.0.0'
pod 'IronSourceUnityAdsAdapter', '4.3.35.0'
end
target 'Unity-iPhone' do
end
use_frameworks!
+
** POD UPDATE**

@cosgunhalil
Copy link

The app crashed upon startup with the same error when using FBSDK 16.0.2 and CocoaPods 1.15.2. We downgraded FBSDK from 16.0.2 to 14.0.0, which resolved the issue. Now, the app is playable successfully.

@MuhammedResulBilkil
Copy link

MuhammedResulBilkil commented Mar 12, 2024

So @reezoobose post got me onto the right track, since he was adding the xcframeworks to the main Unity-iPhone project and not just UnityFramework where things were already added properly.

Simply editing the Assets/FacebookSDK/Plugins/Editor/Dependencies.xml file to have addToAllTargets="true" added to each line fixes the issues for me, and does not require me manually fixing stuff in xcode after the unity generates the project and pod install is called.

After the modifications here is what my Dependencies.xml looks like

<?xml version="1.0" encoding="utf-8"?>
<dependencies>
    <androidPackages>
        <androidPackage spec="com.parse.bolts:bolts-android:1.4.0" />
        <androidPackage spec="com.facebook.android:facebook-core:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-applinks:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-login:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-share:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-gamingservices:[16.0,17)" />
    </androidPackages>
    <iosPods>
        <iosPod name="FBSDKCoreKit_Basics" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKCoreKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKLoginKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKShareKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKGamingServicesKit" version="~> 16.0" addToAllTargets="true" />
    </iosPods>
</dependencies>

Somehow the app started to not work. Giving this upper error on the XCode. Then I add these to the Dependencies file. It worked.

Sometimes I just wonder if some fairies do something to my code and intentionally make it not work!

@xmx77
Copy link

xmx77 commented Mar 19, 2024

After like 3 years still facebook developer they don't test their tools and they always send for us email "threat" with new legal and rules and we must update our products immediately. where ever for me in my next projects i will remove Facebook SDKs completely , Then after few year there is some company make study why facebook disappeared and This is one of the reasons, And for my clients i will charge 5000 USD for any one ask me to add Facebook SDK , even if the game cost 1$, just to keep clients not use your services. "DON'T FORGET WE HELP FACEBOOK TO COLLECT THE DATA".

What we want : WE WANT Magic SDK one click and everything is add without spend days to solve your problems .

@MuhammedResulBilkil & @cmcpasserby : Thank you, your solution solved my issue , i just i add "addToAllTargets="true"

@kelvinthh
Copy link

So @reezoobose post got me onto the right track, since he was adding the xcframeworks to the main Unity-iPhone project and not just UnityFramework where things were already added properly.

Simply editing the Assets/FacebookSDK/Plugins/Editor/Dependencies.xml file to have addToAllTargets="true" added to each line fixes the issues for me, and does not require me manually fixing stuff in xcode after the unity generates the project and pod install is called.

After the modifications here is what my Dependencies.xml looks like

<?xml version="1.0" encoding="utf-8"?>
<dependencies>
    <androidPackages>
        <androidPackage spec="com.parse.bolts:bolts-android:1.4.0" />
        <androidPackage spec="com.facebook.android:facebook-core:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-applinks:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-login:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-share:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-gamingservices:[16.0,17)" />
    </androidPackages>
    <iosPods>
        <iosPod name="FBSDKCoreKit_Basics" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKCoreKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKLoginKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKShareKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKGamingServicesKit" version="~> 16.0" addToAllTargets="true" />
    </iosPods>
</dependencies>

This still works on SDK 17.0

@femoreti
Copy link

femoreti commented May 9, 2024

So @reezoobose post got me onto the right track, since he was adding the xcframeworks to the main Unity-iPhone project and not just UnityFramework where things were already added properly.

Simply editing the Assets/FacebookSDK/Plugins/Editor/Dependencies.xml file to have addToAllTargets="true" added to each line fixes the issues for me, and does not require me manually fixing stuff in xcode after the unity generates the project and pod install is called.

After the modifications here is what my Dependencies.xml looks like

<?xml version="1.0" encoding="utf-8"?>
<dependencies>
    <androidPackages>
        <androidPackage spec="com.parse.bolts:bolts-android:1.4.0" />
        <androidPackage spec="com.facebook.android:facebook-core:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-applinks:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-login:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-share:[16.0,17)" />
        <androidPackage spec="com.facebook.android:facebook-gamingservices:[16.0,17)" />
    </androidPackages>
    <iosPods>
        <iosPod name="FBSDKCoreKit_Basics" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKCoreKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKLoginKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKShareKit" version="~> 16.0" addToAllTargets="true" />
        <iosPod name="FBSDKGamingServicesKit" version="~> 16.0" addToAllTargets="true" />
    </iosPods>
</dependencies>

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests