问题描述
更新:正确答案可能是这个:构建 IPA 时出现 Xcode 6.1 错误
几年前就开始使用 Jenkins 从存储库构建 iOS 项目.今天突然发生了一个新错误,停止了构建.
Using Jenkins to build iOS projects from repositories since a few years. Suddenly today a new error occurs, stopping builds.
我想我大部分的设置都是基于本教程的:
I think I based most of this setup on this tutorial way back:
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}"
查看发生错误的日志有点棘手,但这里是:
It's a bit tricky to look at the logs where the error occurs, but here it is:
### 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
我会尝试自己解决这个问题,稍后在此处添加解决方案,但如果有人比我快,请继续.
I'll try to fix this myself and later add the solution here, but in case anyone is faster than me please go ahead.
- 我没有在任何设置中指定--resource-rules.我猜 xcrun 自己使用这个设置,即使它已被弃用.
推荐答案
找到答案了.
现在发生的问题是xcrun PackageApplication"某事.我不得不删除-sign some profile"参数,然后事情又开始工作了.
The problem that occurred now was the "xcrun PackageApplication" something something line. I had to remove the "-sign some profile" parameter, then things started working again.
也就是说我不知道为什么以前需要签名,为什么现在不需要,所以不知道这是否会在以后引起一些问题.
That said I don't know why signing was necessary before, and why it isn't now so can't tell if this is going to cause some problem later.
这篇关于PackageApplication 今天停止使用 OS X 10.10 (Yosemite)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!