I'm using Jenkins to build .ipa but there are errors when codesigning. why archive command unsupported?
The error I'm getting is:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Users/Shared/Jenkins/Home/workspace/ginav-mobile/build/Distribution-iphoneos/ginav-mobile.app
** BUILD SUCCEEDED **
=== BUILD TARGET ginav-mobile OF PROJECT ginav-mobile WITH CONFIGURATION Distribution ===
Check dependencies
unsupported build action 'archive'
Code sign error: No command to generate product wrapper at '/Users/Shared/Jenkins/Home/workspace/ginav-mobile/build/Distribution-iphoneos/ginav-mobile.app'.
** ARCHIVE FAILED **
I got the same error. I managed to solve it after reading this thread.
The Xcode plugin seems to be using "-target" on the archive command, which not sure why doesn't work (anymore?)
What worked for me was: Instead of letting the plugin do the archive, I added an additional build step "Execute shell"
with this command:
"xcodebuild -project "TestApp.xcodeproj" -scheme "TestApp" -configuration Debug archive"
In Jenkins:
In your project configuration under "Build" in step "Xcode" under "General build settings" uncheck "Generate Archive?"
On "Add build step" drop-down select "Execute Shell"
Write this command with your respective App name and the Configuration (Debug) you need.
xcodebuild -project "TestApp.xcodeproj" -scheme "TestApp" -configuration Debug archive
Now in Xcode, make sure your the Scheme is set to Shared and the Scheme Data is commited and pushed as well.
Done in "Manage Scheme"
Otherwise Jenkins won't find your Scheme and will show an error similar to:
The project 'TestApp' does not contain a scheme named 'TestApp2'
This should make your app archive, hopefully it helps! This should create your archive.
PS: To make the Jenkins with Xcode setup I used this nice guide
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With