'verification failed as the authority is invalid

I'm trying to resign an ipa which is already signed with the developer certificate. Now I'm resigning with the enterprise distribution certificate. I've got proper provisioning profile, ios_distribution certificate to sign the app. I'm following this answer Re-sign IPA (iPhone) for the resigning steps. With this I'm successfully able to resign the ipa but when I try to install this via itools, I'm getting this error: verification failed as the authority is invalid.

Another thing is I'm resigning with the enterprise distribution certificate but still when i try to install the resigned ipa directly (keeping resigned ipa on dropbox) getting this error "safari can't download this file" which I believe should come when the app is not signed with the enterprise distribution certificate and someone try to download that file directly on iphone (not via appstore or itunes).This certificate says I can distribute this app outside the appstore, so I'm confused what I'm really missing.



Solution 1:[1]

I don't know about itools and the error message doesn't sound right, but it could be that

  1. xcrun PackageApplication is copying your dev app's entitlements across to the distribution app and they don't match what's in your distribution profile. e.g get-task-allow may still be true.

If you use a distribution signing identity PackageApplication actually tries to fix this, but it just failed for me now and I get an unusable IPA. Ah, looks like it detects the "distribution-ness" of your signing identity with regular expressions. I was using the abbreviated form "My Company (ID)" form instead of "iPhone Distribution: Company Name (ID)".

If I use the longer form, the resulting binary installs fine. The more you know.

  1. You can't install IPA files directly from Safari, you need to set up an itms anchor tag and a plist, and a bunch of absolute URLs as described here.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rhythmic Fistman