我正在尝试通过运行 shell 脚本来构建自己的 xcodeproject,并且在编译大多数文件后出现此错误。
CodeSign build/Release-iphoneos/moai.app
cd /Users/Shared/Jenkins/Home/jobs/moai-test/workspace/moai-dev/xcode/ios
setenv CODESIGN_ALLOCATE /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
/usr/bin/codesign --force --sign "iPhone Distribution: Vanilla Breeze Co., Ltd." --resource-rules=/Users/Shared/Jenkins/Home/jobs/moai-test/workspace/moai-dev/xcode/ios/build/Release-iphoneos/moai.app/ResourceRules.plist --entitlements /Users/Shared/Jenkins/Home/jobs/moai-test/workspace/moai-dev/xcode/ios/build/MoaiSample.build/Release-iphoneos/moai.build/moai.xcent /Users/Shared/Jenkins/Home/jobs/moai-test/workspace/moai-dev/xcode/ios/build/Release-iphoneos/moai.app
/Users/Shared/Jenkins/Home/jobs/moai-test/workspace/moai-dev/xcode/ios/build/Release-iphoneos/moai.app: User interaction is not allowed.
Command /usr/bin/codesign failed with exit code 1
似乎我的分发证书有问题,但我不知道该怎么办。
这是我的shell脚本
#!/bin/sh
ProjectName="MoaiSample"
TargetName="moai"
SchemeName="MoaiSample"
#SDKS="iphoneos5.0"
CONFIGURATIONS="Release"
ProvisionRelease=VBEnterpriseDistribution.mobileprovision
PASSWORD=password
IDENTITY="iPhone Distribution: Vanilla Breeze Co., Ltd."
KEYCHAIN="/Users/vb_admin/Library/Keychains/login.keychain"
PROJECT_PATH="/Users/Shared/Jenkins/Home/jobs/moai-test/workspace/moai-dev/xcode/ios "
# move to project folder
cd $PROJECT_PATH
# unlock security
security unlock-keychain -p $PASSWORD $KEYCHAIN
# clean previous build files
xcodebuild -project $ProjectName.xcodeproj -target $TargetName -configuration $CONFIGURATIONS clean
# build project xcodebuild -project $ProjectName.xcodeproj -target $TargetName -configuration $CONFIGURATIONS
# archive ipa file #cd build rm -Rf Payload $TargetName.ipa
mkdir Payload
cp -r build/Release-iphoneos/$TargetName.app Payload
zip -r $TargetName.ipa iTunesArtwork Payload
关于为什么我的构建失败的任何想法?
提前致谢