1

I have the latest Bolts, FBSDKCoreKit, FBSDKLoginKit and FBSDKShareKit as part of the Facebook SDK frameworks which I am using in Swift. In a Swift file, I imported FBSDKCoreKit and FBSDKShareKit. If I use FBSDKShareVideo in any way, I get a Linker command error that reads

".../Frameworks/FBSDKShareKit.framework/FBSDKShareKit(FBSDKShareVideo.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)"

-I've looked up solutions to this online, mostly which were to set Enable Bitcode in the project's settings, which was already set to YES. I also tried setting it to NO. I've tried various combinations of YES and NO with the project and target's settings.

-I then added the frameworks to the Copy Bundle Resources and rebuilt. I still get the error.

-I've cleaned, rebuilt

-I quit out of Xcode and reopened the project and rebuilt.

The line in which I try to use FBSDKShareVideo reads:

let video : FBSDKShareVideo = FBSDKShareVideo()

Without using that line and having the FBSDKCoreKit and FBSDKShareKit imported, I get no errors. So how can I possibly resolve this so I can use FBSDKShareVideo?

Chewie The Chorkie
  • 4,896
  • 9
  • 46
  • 90
  • 1
    Are you sure you're using the latest FB SDK? from 4.6 onwards it is supposed to be Bitcode compatible. – Andras M. Nov 22 '17 at 19:30
  • Yes, I have 4.28, which is a higher version than 4.6, correct? – Chewie The Chorkie Nov 27 '17 at 17:31
  • 1
    Ok so FB is not versioning the whole package so for sharekit 4.28 is the latest not 4.6. Anyway according to the git commit messages it was made bitcode compatible, so that should not be a problem. Have you tested an a physical device or simulator only ? You can turn off bitcode for your target and project to see if it makes a difference. You cannot turn it on for facebook if you are using the precompiled frameworks only if you compile it yourself. – Andras M. Nov 27 '17 at 20:57
  • I'm testing on an iPhone 6s plus. I turned off bitcode for the target and project, and no more error! Strange since I tried this just last Wednesday and it kept giving me this error. – Chewie The Chorkie Nov 27 '17 at 21:26

0 Answers0