I trying to sign my app command line using Xcode.
Running xcodebuild
command-line on MyApp.xcodeproj
like so:
xcodebuild -project "MyApp.xcodeproj" -target "MyApp" -sdk "iphoneos" -configuration *Release* PROVISIONING_PROFILE="xxxx-xxxx-xxxx-xxxx" CODE_SIGN_IDENTITY="iPhone Developer: something.com (SOMEVALUE)"
Gives following error:
Check dependencies
Provisioning profile "iOS Team Provisioning Profile: *" doesn't include signing certificate "iPhone Developer: something.com (SOMEVALUE)".
Provisioning profile "iOS Team Provisioning Profile: *" is Xcode managed, but signing settings require a manually managed profile.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'
** BUILD FAILED **
What is wrong ? What is missing in my xcodebuild
command ?
How can I include the signing certificate that its asking about ?
What I tried from answer & comments below
As I understand, a dedicated distribution profile
should be used with Release build. That is present in the system. I just need to know how to use it with xcodebuild
command for manual signing if I can.
Executing security find-identity -p codesigning -v | grep "$CODE_SIGN_IDENTITY"
gives a list of 5 signing identities ones of them clearly states as iPhone Distribution: My Company (SOME123ID)
.
*So, can I use the distribution profile with xcodebuild manual signing? If yes, How can I get the actual ID of a distribution profile to use with xcodebuild command?
答案 0 :(得分:9)
自Xcode8以来,不推荐使用PROVISIONING_PROFILE
。请尝试使用PROVISIONING_PROFILE_SPECIFIER
。 PROVISIONING_PROFILE_SPECIFIER="Human Readable Prov Profile Name"
可能还需要关闭Xcode的自动签名:
Xcode9:只需将CODE_SIGN_STYLE="Manual"
附加到xcodebuild命令
Xcode8:sed -i '' 's/ProvisioningStyle = Automatic;/ProvisioningStyle = Manual;/' TestApp/TestApp.xcodeproj/project.pbxproj && xcodebuild ...
您可以使用xcodebuild -version