The Mobile & Digital Assistant Blog covers the latest in mobile and conversational AI development and engagement

Workaround for an Xcode/iOS SDK Issue...

Joe Huang
GTM and Outbound Product Management, Oracle Digital Assistant
Hi, everyone:

When you are doing ADF Mobile development, and you need to deploy the
application to an iOS device, you would need to compile/deploy the app
with iOS App Certificates and Provisioning Profile. This means you
would need to "Deploy to Package" or "Deploy to iTunes" during
deployment, and configure JDeveloper with the proper
certificates/profiles. In some instances (exact combination is still
not clear), deploy and signing the application to generate the ipa file
may fail with similar error message at the end of the deployment log:

[01:04:45 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 Distribution: Oracle Corporation
failed with error 1. Output:
replacing existing signature Program /usr/bin/codesign returned 1 :
replacing existing signature

This issue is a known issue and is not related to ADF Mobile. The
workaround is discussed in href="http://stackoverflow.com/questions/7425840/that-codesign-returned-1-object-ifile-format-invalid-or-unsuitable-problem-aga"
target="_blank">this article from StackOverflow.

This article refers to the old location of Xcode, so you would need to
adjust the paths accordingly. The path for Xcode 4.3 and above would be

to this script file.

To modify it, you probably can’t use Text Editor. I end up opening a
terminal session, changed the file permission, and used vi to update


Oracle ADF Mobile Product Management Team</a

Join the discussion

Comments ( 5 )
  • Vijaya Kumar Reddy Tuesday, December 4, 2012

    Edit "PackageApplication" file present in the below location


    I have set below code

    ### Step Two : recode sign it if necessary

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

  • guest Wednesday, April 10, 2013

    Thanks Joe !

    I had this issue when I updated Xcode to 4.61, and I didn't understand what went wrong.

    That post just saved me tons of hours !



  • Kyle T. Friday, May 10, 2013

    Excellent! Saved me hours as well Joe! Thanks!

  • guest Sunday, May 25, 2014

    Happened to me again when I switched to xcode 5.02. annoying...

  • guest Monday, July 21, 2014

    Hi All,

    This is in IOS, but what needs to be done when I face this issue in Windows. while deploying to Android .

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.

Recent Content