简体   繁体   中英

Code Sign Error in xcodebuild on simple Single-View Application

xcodebuild fails when I build from the command line. This is the error I'm always getting:

Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX”, however, no such provisioning profile was found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'

However, when I build it from Xcode, it builds fine and runs smoothly on the device. The Fix Issue button doesn't appear in the General Tab in Xcode, which explains why it works on Xcode. I've been researching since yesterday why I can't build it through xcodebuild. Help anyone? :(

The xcodebuild command I've been using (Straight from Frank's website):

xcodebuild \
-target <app_target (optional, if you have only one)> \
-xcconfig ./Frank/frankify.xcconfig \
-arch armv7 \
-configuration Debug \
-sdk iphoneos \
DEPLOYMENT_LOCATION=YES \
DSTROOT="<full_path_to_your_xcode_project_directory>/Frank/frankified_build" \
FRANK_LIBRARY_SEARCH_PATHS="<full_path_to_your_xcode_project_directory>/Frank" \
clean build

I'm testing this with a Single View Application Project so I could rule out factors from the real project I'm working on. Any ideas? :(

使用Release配置作为构建配置。

证书存在问题,因为它们没有正确安装在您的计算机上,是否在计算机上生成了证书,或者是否在其他任何计算机上安装过,那么首先需要在该计算机上安装证书,以便可以使用使用私钥,然后尝试将证书及其私钥一起导出。

You need to unlock your keychain before running xcodebuild :

$ security unlock-keychain
(enter keychain password)
$ xcodebuild

I have the following at the end of my ~/.bashrc because I'm always forgetting:

echo =====================================================================
echo You might want to unlock the keychain using:
echo \$ security unlock-keychain
echo =====================================================================

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