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.56k forks source link

App build failed due to FBSDKCoreKit.framework/FBSDKCoreKit(Permission.o) was built without full bitcode #1474

Closed joelrb closed 4 years ago

joelrb commented 4 years ago

Checklist

Environment

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

Goals

What do you want to achieve? Include Facebook SDK in mobile app.

Expected Results

What do you expect to happen? Successful app build with Bitcode turned on.

Actual Results

What actually happened? Can you provide a stack trace?

bitcode bundle could not be generated because '.../Classes/Facebook/FBSDKCoreKit.framework/FBSDKCoreKit(Permission.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build file '.../Classes/Facebook/FBSDKCoreKit.framework/FBSDKCoreKit' for architecture arm64

Steps to Reproduce

What are the steps necessary to reproduce this issue?

  1. Download latest SDK.
  2. Open in XCode FacebookSDK.xcworkspace
  3. Build the code
  4. Copy FBSDKCoreKit.framework, FBSDKLoginKit.framework, FBSDKShareKit.framework to iOS mobile app
  5. Build the app with Bitcode = yes set

Code Samples & Details

Please provide a code sample, as well as any additional details, to help us track down the issue. If you can provide a link to a test project that allows us to reproduce the issue, this helps us immensely in both the speed and quality of the fix.

Note: Remember to format your code for readability:

// INSERT YOUR CODE HERE

//No relevant code as error is on Bitcode support. Screen Shot 2020-08-22 at 3 07 44 AM

joesus commented 4 years ago

Build the code

How did you build the code? The error message says that libraries for bitcode must be generated from Xcode Archive.

Copy FBSDKCoreKit.framework, FBSDKLoginKit.framework, FBSDKShareKit.framework to iOS mobile app

Why not use the binaries provided in the latest release?

joelrb commented 4 years ago

Hmm aren't those binaries come from the same latest source code? I just built in XCode the latest source that I downloaded from here without changing anything. So, it should have the same binaries that you mentioned right?

joesus commented 4 years ago

Hmm aren't those binaries come from the same latest source code? I just built in XCode the latest source that I downloaded from here without changing anything. So, it should have the same binaries that you mentioned right?

Not necessarily, source code can be built in all sorts of ways - this is how the release is built https://github.com/facebook/facebook-ios-sdk/blob/master/scripts/run.sh#L429

I would highly recommend using Swift Package Manager, CocoaPods, Carthage, or the prebuilt-binaries in the latest release since these are tested and built with the correct compiler flags.

iago849 commented 3 years ago

The same issue with xCode 12.4 - suddenly started saying exactly the same error message. Please, reopen the issue

joesus commented 3 years ago

The same issue with xCode 12.4 - suddenly started saying exactly the same error message. Please, reopen the issue

The original issue didn't have enough information to help debug. Open a new issue with the template filled out and we can use that as a starting point.