当我在iOS设备中部署应用时。我收到了以下错误,我使用的是最新版本的JDeveloper 11.1.2.4
[02:39:06 PM] error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign iPhone Developer: Vijay Rathi (EM62NKCF2U) --resource-rules=/var/folders/43/m8_qrfn964dfhw_y5p96kww00000gn/T/AdEyHsV13M/Payload/myapp.app/ResourceRules.plist /var/folders/43/m8_qrfn964dfhw_y5p96kww00000gn/T/AdEyHsV13M/Payload/myapp.app failed with error 1. Output: /var/folders/43/m8_qrfn964dfhw_y5p96kww00000gn/T/AdEyHsV13M/Payload/myapp.app: replacing existing signature
[02:39:06 PM] Program /usr/bin/codesign returned 1 : [/var/folders/43/m8_qrfn964dfhw_y5p96kww00000gn/T/AdEyHsV13M/Payload/myapp.app: replacing existing signature
[02:39:06 PM] Command-line execution failed (Return code: 1)
[02:39:06 PM] Deployment cancelled.
[02:39:06 PM] ---- Deployment incomplete ----.
[02:39:06 PM] Failed to package the XCode application.
[02:39:06 PM] Failed to build the iOS application bundle.
[02:39:06 PM] Deployment failed due to one or more errors returned by '/usr/bin/xcrun'.
The following is a summary of the returned error(s):
Command-line execution failed (Return code: 1)
error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign iPhone Developer: Vijay Rathi (EM62NKCF2U) --resource-rules=/var/folders/43/m8_qrfn964dfhw_y5p96kww00000gn/T/AdEyHsV13M/Payload/myapp.app/ResourceRules.plist /var/folders/43/m8_qrfn964dfhw_y5p96kww00000gn/T/AdEyHsV13M/Payload/myapp.app failed with error 1. Output: /var/folders/43/m8_qrfn964dfhw_y5p96kww00000gn/T/AdEyHsV13M/Payload/myapp.app: replacing existing signature
Program /usr/bin/codesign returned 1 : [/var/folders/43/m8_qrfn964dfhw_y5p96kww00000gn/T/AdEyHsV13M/Payload/myapp.app: replacing existing signature
请帮我解决这个问题。
提前致谢。
答案 0 :(得分:0)
最后,我得到了解决方案
有一个脚本可以生成在管理器验证期间运行的所有命令。我用grep做了一些挖掘并找到了。该脚本确实存在,它的名字是:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication
修复是在开始时将所需的环境变量添加到关联数组%ENV中,比如第72行:
$ENV{CODESIGN_ALLOCATE} = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate';
使用更新版本的Xcode(即Xcode 5)时,默认位置为:
$ENV{CODESIGN_ALLOCATE} = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate';