Question

I had a IPA which generate by a plugin for discuz forum, the ipa was signed with enterprise developers certificate, I want to resign with my developers certificate & submit to apple by application loader

I use iresign to resign the ipa then send to apple by application loader, but it appear

Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate.

Unable to extract entitlements from application: /var/folders/cv/pksp8dfs71x74zt9st8y01xm0000gn/T/AppByMe32484-resigned.zip/Payload/Donkey.app/Donkey

How ever I was sign the app with iPhone Distribution: my name as well as a mobile provision profile create

can't figure out what happen.. :( Please help Thank you

Was it helpful?

Solution

This should be possible, I think you could do it like this.

First extract some likely entitlements from the App Store provisioning profile. This may need further editing.

/usr/libexec/PlistBuddy -x -c "print :Entitlements " /dev/stdin <<< $(security cms -D -i AppStore.mobileprovision) > entitlements.plist

Then resign the binary using the

codesign -f -s YourDistributionSigningIdentity --entitlements entitlements.plist --resource-rules your.app/ResourceRules.plist your.app 

And package it as an IPA

xcrun -sdk iphoneos PackageApplication -v -o `pwd`/out.ipa your.app

If the app wasn't code signed, then your ResourceRules.plist may be missing. These are generic, just copy something like this into place.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top