一尘不染

PackageApplication今天停止与OS X 10.10(Yosemite)一起使用

jenkins

更新:正确的答案可能是这样的:

找到了解决办法!

单击项目>目标>选择目标>构建设置>

Code Signing Resource Rules Path

并添加:

$(SDKROOT)/ResourceRules.plist

几年来,使用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会单独使用此设置,即使它已弃用。

阅读 258

收藏
2020-07-25

共1个答案

一尘不染

找到了答案。

现在发生的问题是“ xcrun PackageApplication”问题。我必须删除“ -sign some profile”参数,然后事情再次开始工作。

就是说,我不知道为什么以前需要签名,为什么现在不需要签名,所以无法确定以后是否会引起一些问题。

2020-07-25