gpt4 book ai didi

iphone - xcode构建错误

转载 作者:行者123 更新时间:2023-12-04 18:13:59 26 4
gpt4 key购买 nike

我正在尝试通过运行 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

关于为什么我的构建失败的任何想法?

提前致谢

最佳答案

你读过Running xcodebuild from a forked terminal ?

从命令行运行时,钥匙串(keychain)列表似乎会有所不同。

The difference that most people have also seen is that if you run security list-keychain you'd get:


$ security list-keychain
"/Library/Keychains/System.keychain"
"/Library/Keychains/System.keychain"

But when running in the ssh shell, I'd get:


$ security list-keychain
"/Users/<i>user_account_name</i>/Library/Keychains/login.keychain"
"/Library/Keychains/System.keychain"

建议创建一个不与用户帐户关联的钥匙串(keychain)。

关于iphone - xcode构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12066352/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com