facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
488 stars 257 forks source link

Xcode: Archiving problems due to Bitcode after adding Facebook SDK #494

Open derwaldgeist opened 3 years ago

derwaldgeist commented 3 years ago

We wanted to integrate the official Facebook Unity SDK into our app. However, if we want to "archive" the app now, we get this Bitcode-related error:

bitcode bundle could not be generated because '/Users/tom/Desktop/Marble Builds/marble.stage.ios.1.17/Libraries/Plugins/iOS/libBackgroundLocationPlugin.a(Pods-BackgroundLocationPlugin-dummy.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build file '/Users/tom/Desktop/Marble Builds/marble.stage.ios.1.17/Libraries/Plugins/iOS/libBackgroundLocationPlugin.a' for architecture arm64​

The strange thing is: the library mentioned in the error message (libBackgroundLocationPlugin.a) has been built with Bitcode support. We developed this plugin ourselves. And the app builds fine - including Bitcode information - without the Facebook SDK.

I can only guess that the error is caused by the way the Facebook SDK modifies the Xcode project, as I can now see two different project (the main project and a Pod project) in Xcode. I am also wondering where this dummy.o file comes from.

Has anyone encountered and resolved this problem already?

(The problem only applies to archiving. It does not appear if you just "build" it.)

derwaldgeist commented 3 years ago

Facebook SDK: 8.1.0.2 (latest from website) Unity: 2019.4.12f2 (latest LTS) Xcode: 14.1 (12A7403, latest)