Issue
I'm trying to update the FBAudienceNetwork lib on my app to 5.7.0. This specifies that the app must be built with Xcode 11. On my local environment it builds perfectly, but when I send it to build on my Jenkins environment, it fails with this error message
ld: in /Users/admin/jenkins-home/workspace//Pods/FBAudienceNetwork/Static/FBAudienceNetwork.framework/FBAudienceNetwork(FBANInterstitialAdAdapter.m.o), could not parse object file /Users/admin/jenkins-home/workspace/topcraft-ios/proj.ios_mac/Pods/FBAudienceNetwork/Static/FBAudienceNetwork.framework/FBAudienceNetwork(FBANInterstitialAdAdapter.m.o):
'Invalid bitcode version (Producer: '1103.0.32.59.0_0' Reader: '1100.0.33.17_0')', using libLTO version 'LLVM version 11.0.0, (clang-1100.0.33.17)'
file '/Users/admin/jenkins-home/workspace//Pods/FBAudienceNetwork/Static/FBAudienceNetwork.framework/FBAudienceNetwork' for architecture arm64
I've been trying to tweak all possible Jenkins configurations to no avail, I've made sure that Jenkins is using Xcode 11 to build. Modules are enabled and bitcode is disabled for all build types. This is the build command being run
/Applications/Xcode-11.3.app/Contents/Developer" xcodebuild -scheme "CocoCraft-mobile" -configuration "Release"
-workspace ***.xcworkspace -archivePath "/Users/admin/jenkins-home/workspace/***/build/***.xcarchive" archive
Where else should I tweak so I can build successfully?
Solution
For anyone who happens across this to, FBAudienceNetwork now requires Xcode 11.6 to compile, and it will fail with that error for Xcode 11.3. So you need to update the Xcode version on your Jenkins
Answered By - Koitt
Answer Checked By - Mary Flores (JavaFixing Volunteer)