Xcode - 共享应用程序 - PackageApplication失败,退出代码为1

时间:2011-08-21 13:23:43

标签: ios

我使用Xcode 4.1为我的iPhone应用程序创建了一个临时分发版本。目标成功构建并生成我可以在管理器中看到的存档文件。然后我点击“分享”,这样我就可以选择.ipa和我的分发资料。但是,在我点击“下一步”后,管理器崩溃并出现以下错误。错误日志似乎表明该错误与'ResourceRules.plist'有关?我正在使用CorePlot进行绘图,可能与此有关吗?

有关信息,我有一个有效的分发证书并导入了分发配置文件。对于临时分发,不再需要权利文件,因此我在项目中没有。我的所有其他应用程序都没有在“共享”阶段崩溃,所以它似乎不是Xcode的问题,只是这个特定的应用程序。

任何帮助都非常感激。

捐赠。

PackageApplication failed with exit code 1.

Packaging application: '/Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp   20-08-2011 14.11.xcarchive/Products/Applications/myApp.app'

Arguments: embed=/Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision  verbose=1  output=/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/670E174E-0BCA-4F18-AB8D-5ACF3D7E569A-8458-000005FCA81C6AE5/app.ipa  sign=iPhone Distribution: Grant Abt  

Environment variables:

HOME = /Users/gabt

LOGNAME = gabt

__CF_USER_TEXT_ENCODING = 0x1F5:0:0

DISPLAY = /tmp/launch-WoNf6c/org.x:0

COMMAND_MODE = unix2003

VERSIONER_PERL_PREFER_32_BIT = no

PATH = /Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin

SHELL = /bin/bash

SSH_AUTH_SOCK = /tmp/launch-hHkBrJ/Listeners

Apple_PubSub_Socket_Render = /tmp/launch-P0dtgN/Render

TMPDIR = /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/

USER = gabt

VERSIONER_PERL_VERSION = 5.12

Output directory: '/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/670E174E-0BCA-4F18-AB8D-5ACF3D7E569A-8458-000005FCA81C6AE5/app.ipa'

Temporary Directory: '/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS'  (will NOT be deleted on exit when verbose set)

+ /bin/cp -Rp /Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload

Program /bin/cp returned 0 : []

### Checking original app

+ /usr/bin/codesign --verify -vvvv /Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app

Program /usr/bin/codesign returned 0 : [/Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app: valid on disk

/Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app: satisfies its Designated Requirement

]

Done checking the original app

### Embedding '/Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision'

+ /bin/rm -rf /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/embedded.mobileprovision

Program /bin/rm returned 0 : []

+ /bin/cp -rp /Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/embedded.mobileprovision

Program /bin/cp returned 0 : []

+ /usr/bin/codesign -d --entitlements /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_rawMkZVbU5I /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app

Program /usr/bin/codesign returned 0 : [Executable=/private/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/myApp

]

+ /usr/libexec/PlistBuddy -c Set :get-task-allow NO /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_

Program /usr/libexec/PlistBuddy returned 0 : []

+ /usr/bin/plutil -lint /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_

Program /usr/bin/plutil returned 0 : [/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_: OK

]

### Codesigning '/Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision' with 'iPhone Distribution: Grant Abt'

+ /usr/bin/codesign --force --preserve-metadata --sign iPhone Distribution: Grant Abt --resource-rules=/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/ResourceRules.plist --entitlements /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_ /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app

Program /usr/bin/codesign returned 1 : [/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/ResourceRules.plist: cannot read resources

]

error: codesign failed with error 1

4 个答案:

答案 0 :(得分:47)

今天遇到同样的问题.. PROJECT - Build Settings

中缺少“代码签名资源规则路径”

... 打开项目的“构建设置”选项卡。 搜索“代码签名资源规则路径”,它对我来说是空的 并补充说 $(SDKROOT)/ResourceRules.plist

对于使用SDK2.2

描述此问题的Adams Blair来说,这是个好消息

答案 1 :(得分:11)

是的,我认为这是xcode6.1问题(或bug?)

你可以

1.add $(SDKROOT)/ResourceRules.plist"Code Signing Resource Rules Path"

2.使用xcode-select回到6.01版本

3.sign argument without" sign = iPhone Distribution:Grant Abt"

工作

答案 2 :(得分:0)

再次检查您的代码签名配置文件。您的开发人员配置文件应设置为调试,对于版本,您必须设置您的分发配置文件。确保在每个类别下选择任何iOS SDK,并为它们设置相应的配置文件。

答案 3 :(得分:0)

使用Xcode 6.1 beta版进行测试时遇到此问题。回到Xcode 6.0.1可以工作。