7

I am developing mobile app with Ionic Framework and I just received very strange error that broke my whole build.

'myapp/Plugins/com.phonegap.plugins.facebookconnect/FacebookSDK.framework/FacebookSDK(FBLikeButtonBackgroundSelectedPNG.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)

That happen after . It worked perfectly before upgrading to the new Xcode version 7.0. I have tried to disable the BITCODE for the project but the Facebook functionality of the APP does not work as expected.

EDIT

If I disable BITCODE for the project the Facebook plugin opens the browser instead of the app therefore Disabling BITCODE is not a solution in that case.

radioaktiv
  • 2,437
  • 4
  • 27
  • 36

5 Answers5

17

From Xcode 7, BitCode in enable it by default. You will get this error until all apps and frameworks in your bundle doesn't include bitcode.

to remove this warning you can disable this in Build Settings

Build Settings>All>Build Options>Enable Bitcode = NO enter image description here

Gaurav Pandey
  • 1,953
  • 3
  • 23
  • 37
  • 1
    Does Apple reject app if we submit it with option Enable Bitcode = NO? – Ganesh G Oct 07 '15 at 06:52
  • If IOS app it should not be as Apple mention [here](https://developer.apple.com/library/prerelease/watchos/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html) For iOS apps, bitcode is the default, but optional. For watchOS and tvOS apps, bitcode is required – Gaurav Pandey Oct 07 '15 at 07:32
7

This is a known issue with the Facebook Plugin. There is an open ticket at https://github.com/Wizcorp/phonegap-facebook-plugin/issues/111614 - I'd suggest you keep an eye on.

As a work-around, you might try

Project > Build Settings > Build Options > Enable Bitcode = No

(found @ http://forum.ionicframework.com/t/error-after-updating-to-xcode-7/32641)

Paul Sturm
  • 2,118
  • 1
  • 18
  • 23
  • As I mentioned I have tried that but If I disable it my application doesnt open facebook app but instead it just loads it in the browser. – radioaktiv Sep 18 '15 at 07:17
4
I too face the same problem while updating the frameworks for giving iOS9 support.

1.To change In build settings:

Enable Bitcode = "NO"

Not only for your project targets, to set all of your targets including your pods(Project) targets.

2.Change the Build Architecure only:

Debug - YES

Relese - NO

That was fixed!

Surezz
  • 561
  • 4
  • 12
2

Here is what it worked for me:

I am stealing it from here : https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1116

  1. Update the plist with steps 2 and 3 from e Facebook's iOS 9 guide
  2. Turn off the bitcode setting (you already know how to do that :smile:)
radioaktiv
  • 2,437
  • 4
  • 27
  • 36
0

You should update your Facebook SDK. It did the trick for me as the latest Facebook SDK version supports bitcode. You don't have to upgrade to v4 as version 3.24 works perfectly.

There are a few other steps for iOS 9 compatibility like whitelisting FB domains and authorizing FB apps.

The following version support bitcode and can compile with the flag set to YES:

The relevant section of the FB documentation says:

Is bitcode supported?

v4.6 and v3.24 of the SDK supports bitcode. If you are using earlier versions, you must disable bitcode.

All steps required to upgrade to iOS 9 (transport security / app whitelisting) can be found here: https://developers.facebook.com/docs/ios/ios9

But I have to tell you that even though it compiles/link OK and uses an "integrated" Facebook login dialog, it still uses a browser as a modal view in your app. For me it is a regression from the previous Facebook app integration. I don't know whether there's a way to get the old "native" login dialog back.

double-beep
  • 5,031
  • 17
  • 33
  • 41