简体   繁体   中英

Code Sign error in xcodebuild archive

I am trying to generate a .ipa file only through command line,

xcodebuild archive -project someproject.xcodeproj -scheme somescheme -
archivePath /somepath/someproject.xcarchive

This command still depends on the provisioning profile I have selected in xcode, and fails if a wrong profile is chosen. The error generated is :

Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “some UUID”, however, no such provisioning profile was found.

Is there a way I can make archive command independent of provisioning profile chosen in Xcode ? Or can this be a configurable parameter in the command. Do we have a file where this value is mentioned, in that case I can overwrite it.

It looks like you should be able to use an additional parameter on the xcodebuild command you mentioned above.

There is an additional option called exportProvisioningProfile that allows you to specify the provisioning profile to use.

From Apple Docs:

-exportProvisioningProfile profilename Specifies the provisioning profile that should be used when exporting the archive.

Link to documentation: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM