Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins unsupported build action 'archive'

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 **
like image 230
breaklee Avatar asked Feb 12 '23 23:02

breaklee


1 Answers

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"

More in depth

In Jenkins:

In your project configuration under "Build" in step "Xcode" under "General build settings" uncheck "Generate Archive?"

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


archive-command



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"

enter image description here


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

like image 146
Tamara Bernad Avatar answered Feb 15 '23 14:02

Tamara Bernad