Xcode 8.2.1 - Error: Invalid bitcode version (Producer: '802.0.41.0_0' Reader: '800.0.42.1_0')
Asked Answered
E

2

7

I'm trying to implement the new Facebook Audience Network iOS SDK v4.22.0, but when I compile the project I get the following error:

error: Invalid bitcode version (Producer: '802.0.41.0_0' Reader: '800.0.42.1_0')
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I also got this error with the iOS SDK v4.21.1, but not with the v4.20.0. I'm using Xcode 8.2.1 and Objective-C, and the bitcode option in Build Settings is set to No.

enter image description here

Here is the Facebook Audience Network changelog, but there is nothing related with this issue: https://developers.facebook.com/docs/ios/change-log-4x

Is there anyone else getting this error? Have you found a solution?

Thanks in advance! πŸ‘

Excited answered 18/4, 2017 at 19:22 Comment(2)
Update your Xcode, latest version is 8.3.1(8E1000a). – Ruel
You're right, the iOS SDK needs Xcode 8.3+ πŸ˜“ thanks! – Excited
C
10

Upgrading XCode to 8.3+ will resolve this issue. Seems like framework was built with higher version XCode i.e. above 8.2.1.

Disabling bitcode will also fix this issue. But, While uploading your app to AppStore, you may get into problem as the build is not optimized due to Bitcode Disable in your project

(Refer Bitcode section in App Thining https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html)

So, better to upgrade your XCode, rather than getting into such issues.

Caroche answered 4/5, 2017 at 7:2 Comment(1)
I was able to compile after disabling the Bitcode. Also, did you mean upgrading XCode is the only option in this case? – Caroche
H
5

We had/have the same issue with Xcode 8.2.1 and it turned out that for us it was caused by version 5.12.3 of the NewRelic pod. So we pinned it to version 5.12.2 instead, which doesn't seem to need Xcode 8.3+, but happily builds with 8.2.1 (as we can not upgrade Xcode yet).

Hemihydrate answered 24/4, 2017 at 16:12 Comment(1)
Funny how this was exactly my issue. – Folly

© 2022 - 2024 β€” McMap. All rights reserved.