title: Cordova build iOS release on the CLI failing codesign check
body: <p>I am trying to generate a release .ipa file from a Cordova built .app file for iOS using the xcodebuild tools.</p>
  
  <p>I am on OSX v10.9.5, Xcode 6.0.1, Cordova 3.5.0-0.2.7.</p>
  
  <p>When I change directory to my Cordova project I run the following command:</p>
  
  <pre><code>cordova build ios --release
  </code></pre>
  
  <p>This generates the .app file in <code>platforms/ios/build/emulators</code> folder as expected.</p>
  
  <p>I then run the following command to sign the .app:</p>
  
  <pre><code>codesign -s "code sign certificate" path-to/my.app
  </code></pre>
  
  <p>Which i then verify with:</p>
  
  <pre><code>codesign -dv path-to/my.app
  </code></pre>
  
  <p>This returns something like this to show that the .app is signed:</p>
  
  <pre><code>Identifier=com.myapp.name
  Format=bundle with Mach-O thin (i386)
  CodeDirectory v=20200 size=3942 flags=0x0(none) hashes=190+3 location=embedded
  Signature size=4359
  Signed Time=3 Oct, 2014 10:55:16 am
  Info.plist entries=21
  TeamIdentifier=TQY89NPL4X
  Sealed Resources=none
  Internal requirements count=2 size=1004
  </code></pre>
  
  <p>Which seems correct.</p>
  
  <p>I then generate an archive from which to create an .ipa file:</p>
  
  <pre><code>xcodebuild clean archive -scheme myApp -target myApp -sdk iphoneos -configuration AdHoc CODE_SIGN_IDENTITY="the code sign identity" PROVISIONING_PROFILE="UDID of provisioning profile"
  </code></pre>
  
  <p>This works fine and succeeds.</p>
  
  <p>Using the generated archive I use this command to try to generate an .ipa file:</p>
  
  <pre><code>xcodebuild -project myApp.xcodeproj -exportArchive -exportFormat ipa -archivePath /path-to/myApp.xcarchive  -exportPath $(pwd)/myApp.ipa CODE_SIGN_IDENTITY="code sign identity" -alltargets -configuration Release
  </code></pre>
  
  <p>This does generate the .ipa in the correct place but I get a worrying notification/error that the codesign verification has failed:</p>
  
  <pre><code>Codesign check fails : /myApp.app: resource envelope is obsolete
  </code></pre>
  
  <p>I am concerned that the .ipa that is generated will be rejected by the app store upon submission due to the codesign failure.</p>
  
  <p>Is there anything that I am doing incorrectly in the process?</p>
  
  <p>How do I make the .app pass the codesign verification step?</p>
  
  <p>Does it actually matter to pass codesign verification?</p>
  
  <p>Is there a way to test the <code>.ipa</code> file prior to submission to guarantee that it will not be rejected?</p>