facebook-sdk-for-unity
facebook-sdk-for-unity copied to clipboard
Adding use_frameworks! to the Podfile is provoking a crash on app launch
Checklist
- [x] I've updated to the latest released version of the SDK
- [x] I've searched for existing GitHub issues
- [x] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [x] I've read the Code of Conduct
- [x] This issue is not security related and can safely be disclosed publicly on GitHub
Environment
Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:
- Unity Editor Version:
2019.4.13f1 - Unity SDK Version:
>= 8.0.0 - Installation Platform & Verison:
iOS
Goals
Build my app for iOS.
Expected Results
App builds and runs correctly.
Actual Results
Crashes on runtime:
Error loading [path]/Test2020.app/Frameworks/UnityFramework.framework/UnityFramework:
dlopen([path]/Test2020.app/Frameworks/UnityFramework.framework/UnityFramework, 265):
Library not loaded: @rpath/CASPromo.framework/CASPromo
Referenced from: [path]/Test2020.app/Frameworks/UnityFramework.framework/UnityFramework
Reason: image not found
Code Samples & Details
This is happening because of the use of use_frameworks! when creating the Podfile, added by Facebook in this post process.
Removing use_frameworks! from the Podfile fixes the issue, so I'm not really sure why it is being added by Facebook. At the very least, I think this should be optional and not mandatory. I think forcing the usage of use_frameworks! is a little invasive.
This has also affected other SDKs, like Firebase: https://github.com/firebase/quickstart-unity/issues/862
use_frameworks! conflicts with some other SDK such as MoPub.
Hey!
Any news on this?
The External Dependency Manager for Unity just added an option to add use_frameworks! in the Podfile, true by default, here:
https://github.com/googlesamples/unity-jar-resolver/commit/256994f1b51d5a8d7c7679a77926fdb9eb40e037
I really think Facebook should not be adding use_frameworks! in a post process, and should rely on this new configuration.
We are using use_frameworks! :linkage => :static in our project to statically link the pods, but this build step inserts use_frameworks! regardless and overrides the setting that we want. We end up having to go end edit the file to remove the statement in a post build step immediately after this runs.