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?
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
Related
im using xcode 13.2.1, MacOs Monterey version 12.2 (M1).
Im trying to compile my app with bitcode using xcode.
I have Bitcode-Enable = yes in both project and target.
I checked the build log and I have no warning stating I am using a framework/library that isn't compiled with bitcode so that's not the issue.
I archived the app and I also made sure to check the rebuild with bitcode option.
When I run the command otool -l my-cool-app } | grep LLVM it shows nothing (No bitcode section). What am I possibly doing wrong?
forgot to update, apparently Bitcode-Enable = yes is not enough.
you need to specify the correct flag to compile the bitcode.
this is the command line I used:
xcodebuild BITCODE_GENERATION_MODE=bitcode OTHER_CFLAGS="-fembed-bitcode" -target "${PROJECT_NAME}"
I am migrating a "NetworkFoundation" Framework, which is based on Alamofire, to Swift 5. Carthage is being used as the dependency manager,
The cartfile looks the following:
github "Alamofire/Alamofire" "5.0.0-beta.5"
The command carthage update is executed with success. In Xcode the project builds, but when I run the command carthage build --no-skip-current in the root directory of my framework it fails:
xcodebuild output can be found in /var/folders/1m/qjb4gks13d54rqmn9ptwjmmw0000gp/T/carthage-xcodebuild.bg5VCR.log
Building scheme "Alamofire macOS" in Alamofire.xcworkspace
Building scheme "Alamofire tvOS" in Alamofire.xcworkspace
Building scheme "Alamofire watchOS" in Alamofire.xcworkspace
Building scheme "Alamofire iOS" in Alamofire.xcworkspace
Building scheme "MyNetworkFoundation" in MyNetworkFoundation.xcodeproj
Building scheme "Alamofire iOS" in Alamofire.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/MyUser/Documents/Projects/MyNetworkFoundation/MyNetworkFoundation/Carthage/Checkouts/Alamofire/Alamofire.xcworkspace -scheme Alamofire\ iOS -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/1m/qjb4gks13d54rqmn9ptwjmmw0000gp/T/MyNetworkFoundation SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/MyUser/Documents/Projects/MyNetworkFoundation)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/1m/qjb4gks13d54rqmn9ptwjmmw0000gp/T/carthage-xcodebuild.bg5VCR.log
As recommended, I checked the logfile of the failed build. In there it says:
error: SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0. (in target 'Alamofire iOS') ** ARCHIVE FAILED **
So I checked the Swift Version of my Project which seems to be correct.
Because the logfile states that the Swift Version 3.0 is used in target 'Alamofire iOS', I checked the targets in
/MyNetworkFoundation/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj
but all of them have Swift Version 5.
I have no idea what why that error is appearing when I want to build my project. I even tried re-installing Xcode but that did not work either. Anybody got an idea what I am missing?
Xcode Version: 10.2.1 (10E1001)
MacOS Version: 10.14.5 (18F132)
Not sure if this will solve the issue for you but I was experiencing something similar. For me, since I just copied the repo of a project I was onboarding to, I was running carthage bootstrap and it always failed for Alamofire with Swift 3 errors like yours.
My Cartfile file has github "Alamofire/Alamofire" ~> 4.7.2, and my project is using Swift 4.2 (so again, not exactly the same as your setup).
I finally got it to work running the following command:
carthage bootstrap --platform iOS --no-use-binaries --toolchain com.apple.dt.toolchain.Swift_4_2
I believe the trick was to specify the toolchain use Swift 4.2, so I would suggest you try with Swift_5_0. Hope this helps!
Archive was getting created with Xcode 9.1 but it is now failing with below error after updating Xcode to 10.1.
**ARCHIVE FAILED**
The following build commands failed:
SymLink /Users/rsKRISH/dir/build/Release-iphoneos/Output.app /Users/rsKRISH/Library/Developer/Xcode/DerivedData/Output-fdnrztthdyjgzvfkiyrgfpahdjxd/Build/Intermediates.noindex/ArchiveIntermediates/Output/InstallationBuildProductsLocation/Applications/Output.app
(1 failure)
The command I am using is :
xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Debug clean build VALID_ARCHS="armv7 arm64" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/Release-iphoneos" -scheme "$PROJECT_NAME" archive -archivePath build/Release-iphoneos/Output.xcarchive
I am able to create the archive from Xcode but it is failing while using command line.
And there is no other information about error (error number etc.) in the build log.
Does anybody has any idea, what might be the issue ?
OS: MacOS 10.13.6
After making some changes to the build command. I found out that the issue was caused due to build parameter:
CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/Release-iphoneos"
So, I've removed this parameter for now. But the root cause of the error is still unknown since I haven't received any permission error (or any other error), which can explain the reason why SymLink cannot be created at the given build directory.
We are using HERE iOS SDK Premium Edition with Swift in Xcode 7.3 but when we try to exportArchive with the command:
xcodebuild -exportArchive -exportOptionsPlist exportOptions.plist -archivePath build/App.xcarchive -exportPath build
The exportArchive fails and we run into the error:
ld: bitcode bundle could not be generated because '<path to workspace>/HEREMaps/NMAKit.framework/NMAKit(NMAApplicationContext.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does Here maps support Swift with Xcode 7.3? Is there a project setting we need to set to get it to work?
We are able to run the app in simulator without issue.
Bitcode is a new feature introduces with Xcode 7.
Bitcode is an intermediate representation of a compiled program. Apps
you upload to iTunes Connect that contain bitcode will be compiled and
linked on the store. Including bitcode will allow Apple to re-optimize
your app binary in the future without the need to submit a new version
of your app to the store.
Reference AppThinning Documentation
From the error it seems that the HERE SDK is not bitcode enabled and in your project settings bitcode is enabled. For fixing the issue, there are two possible options:
Use bitcode enabled version of Here SDK (If the vendor provided a bitcode enabled version)
Disable the bitcode in your Build Settings
I'm trying to build and archive (in Release and Debug mode) an ios project generated with apache cordova 4.0.0, via command line tool xcodebuild
These commands work ok:
cordova platform add ios
cordova prepare ios
cordova build ios
The ios project generated by cordova has a scheme called iHogar. After that, when I try to launch this command on the console:
xcodebuild -scheme iHogar -sdk iphoneos -configuration Debug
CODE_SIGN_IDENTITY="iPhone Distribution: S-N-A L-C-A, S- CO-P-Ñ-A DE
SE-U-O- Y R--A-E-U-OS (xxxxxxx)"
It stops at the beginning of the execution, and does not continue. The value of param CODE_SIGN_IDENTITY is modified due to privacy reasons.
Here is the output of the command, through console:
Build settings from command line:
CODE_SIGN_IDENTITY = iPhone Distribution: S-N-A L-C-A, S- CO-P-Ñ-A DE SE-U-O- Y R--A-E-U-OS (xxxxxxx)
SDKROOT = iphoneos8.1
And stops there without finishing the command (it hangs) , only stops with crtl+C
The certificate is ok, and also the provisioning profile. If I open the project with Xcode (version 6.1) everything goes ok, I can build and archive it without problems, with the same certificate and provisioning profile.
Has anyone experienced this behavior?
Thanks in advance
I have resolved this issue. The problem was that the cordova generated ios project hasn't got schemas. Those are created the first time you open the project with XCode. When the app has been created by cordova, is only created with targets.
In this scenario, that the generated app cannot be opened with XCode with human interaction, is better to build the app with the target option, like this:
xcodebuild -xcconfig "cordova/build.xcconfig" -project "iHogar.xcodeproj" ARCHS="armv7 armv7" -target "iHogar" -configuration Debug -sdk iphoneos build VALID_ARCHS="armv7 armv7s" CONFIGURATION_BUILD_DIR="build/device"
It's important to have the certificate to sign the app installed in the keychain, and the related provisioning profile downloaded.
I know you got around your issue, but as this is quite recent, have you considered upgrading to Cordova 5.1.1. This will build and code sign the app without the need to go into XCode.