PackageApplication今天停止使用OS X 10.10(优胜美地)

时间:2014-10-22 04:55:57

标签: ios jenkins continuous-integration osx-yosemite

更新: 正确的答案可能是这一个:Xcode 6.1 error while building IPA

几年后,使用Jenkins从存储库构建iOS项目。突然今天发生了一个新的错误,停止构建。

我认为我在本教程的基础上完成了大部分设置:

http://www.raywenderlich.com/22816/beginning-automated-testing-with-xcode-part-22

此步骤导致错误:

# 4
echo "*** Post build step 4"
/usr/bin/xcrun -sdk iphoneos PackageApplication \
-o "${IPA_DIR}/${PROJECT}.ipa" \
-verbose "${APP}" \
-sign "${SIGNING_IDENTITY}" \
--embed "${PROVISIONING_PROFILE}"

查看发生错误的日​​志有点棘手,但这里是:

### Codesigning '/Users/Shared/Jenkins/Home/jobs/myapp/workspace/myapp_adhoc_7.mobileprovision' with 'iPhone Distribution: mycompany Inc.'
+ /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign iPhone Distribution: mycompany Inc. --resource-rules=/var/folders/y1/4hrpc2851b7dxn9bhlkhbrnr00007q/T/ipIxOjxE2z/Payload/myapp.app/ResourceRules.plist --entitlements /var/folders/y1/4hrpc2851b7dxn9bhlkhbrnr00007q/T/ipIxOjxE2z/entitlements_plistYdluSmqT /var/folders/y1/4hrpc2851b7dxn9bhlkhbrnr00007q/T/ipIxOjxE2z/Payload/myapp.app
Program /usr/bin/codesign returned 1 : [Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!
/var/folders/y1/4hrpc2851b7dxn9bhlkhbrnr00007q/T/ipIxOjxE2z/Payload/myapp.app/ResourceRules.plist: cannot read resources
]
error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign iPhone Distribution: mycompany Inc. --resource-rules=/var/folders/y1/4hrpc2851b7dxn9bhlkhbrnr00007q/T/ipIxOjxE2z/Payload/myapp.app/ResourceRules.plist --entitlements /var/folders/y1/4hrpc2851b7dxn9bhlkhbrnr00007q/T/ipIxOjxE2z/entitlements_plistYdluSmqT /var/folders/y1/4hrpc2851b7dxn9bhlkhbrnr00007q/T/ipIxOjxE2z/Payload/myapp.app failed with error 1. Output: Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!
/var/folders/y1/4hrpc2851b7dxn9bhlkhbrnr00007q/T/ipIxOjxE2z/Payload/myapp.app/ResourceRules.plist: cannot read resources

我会尝试自己修复此问题,然后在此处添加解决方案,但如果有人比我快,请继续。

  • 我没有在任何设置中指定--resource-rules。我猜xcrun自己使用这个设置,即使它已被弃用。

2 个答案:

答案 0 :(得分:11)

您可以使用xcrun创建存档,然后再次运行xcodebuild来创建IPA文件,而不是使用xcodebuild

# Create an archive
xcodebuild -alltargets -configuration "${CONFIGURATION}" -scheme "${SCHEME}" -archivePath "${APP_PATH}/${PROJECT}.xcarchive" archive

# Create the IPA file from the archive
xcodebuild -exportProvisioningProfile "${PROVISIONING_PROFILE_NAME}" -exportArchive -exportFormat IPA -archivePath "${APP_PATH}/${PROJECT}.xcarchive" -exportPath "${IPA_DIR}/${PROJECT}.ipa" CODE_SIGN_IDENTITY="${SIGNING_IDENTITY}"

请注意,${PROVISIONING_PROFILE_NAME}应包含临时配置文件的名称,而不是文件本身的路径。

答案 1 :(得分:8)

找到答案。

现在出现的问题是" xcrun PackageApplication"什么东西线。我不得不删除" -sign some profile"事情,然后事情又开始了。

这就是说我不知道​​为什么以前需要签名,以及为什么现在还不能告诉我这是否会导致以后出现问题。