facebook-sdk-for-unity icon indicating copy to clipboard operation
facebook-sdk-for-unity copied to clipboard

Adding use_frameworks! to the Podfile is provoking a crash on app launch

Open polmum opened this issue 4 years ago • 3 comments

Checklist

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

polmum avatar Jan 27 '21 18:01 polmum

use_frameworks! conflicts with some other SDK such as MoPub.

CodeMasterYi avatar Feb 01 '21 13:02 CodeMasterYi

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.

polmum avatar Feb 10 '21 17:02 polmum

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.

jjfmarket avatar Jun 16 '22 17:06 jjfmarket