Cordova builds iOS release with CLI code validation error

I am trying to create a release .ipa file from a Cordova generated iOS .app file using the xcodebuild tools.

I am on OSX v10.9.5, Xcode 6.0.1, Cordova 3.5.0-0.2.7.

When I change the directory to a project in Cordova, I run the following command:

cordova build ios --release

      

This creates the .app file in the folder platforms/ios/build/emulators

as expected.

Then I run the following command to sign the .app file:

codesign -s "code sign certificate" path-to/my.app

      

Which I then check with:

codesign -dv path-to/my.app

      

This returns something like this to show that the .app is signed:

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

      

Which seems right.

Then I create an archive from which the .ipa file can be generated:

xcodebuild clean archive -scheme myApp -target myApp -sdk iphoneos -configuration AdHoc CODE_SIGN_IDENTITY="the code sign identity" PROVISIONING_PROFILE="UDID of provisioning profile"

      

This works great and does well.

Using the generated archive, I use this command to try and generate the .ipa file:

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

      

This generates the .ipa in the right place, but I get an alert / error that the code validation failed:

Codesign check fails : /myApp.app: resource envelope is obsolete

      

I am concerned that the generated .ipa will be rejected by the app store after submission due to a code failure.

Is there something I am doing wrong in the process?

How do I make .app go through the code review step?

Does it really matter to pass code validation?

Is there a way to validate the file .ipa

before submitting to ensure it doesn't get rejected?

+3


source to share


1 answer


Try using the xcrun command to package the app and create the ipa xcrun man page

Example:



xcrun -sdk iphoneos PackageApplication -v "${PRODUCTDIR}/${TARGET}.app" -o "${OUTDIR}/${TARGET}.ipa" --sign "${IDENTITY}" --embed "${PROVISONING_PROFILE}"

      

I am using this to create a .ipa that I can upload to TestFlight.

+3


source







All Articles