Question

When i deploy an app in iOS device. I got following error and i am using latest version of 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

Please help me out on this issue.

Thanks in advance.

Was it helpful?

Solution

Finally, I got the solution

There is a script someplace which generates all the commands run during an Organizer Validate. I did some digging with grep and find. The script indeed exists and it's name is:

/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication

The fix is to add the required environment var to the associative array %ENV right at the start, say at line 72:

$ENV{CODESIGN_ALLOCATE} = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate';

When using a more recent version of Xcode (i.e. Xcode 5) , the default location is:

$ENV{CODESIGN_ALLOCATE} = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate';
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top