Issues signing PhoneGap IPA for distribution - ios

I've run into an issue signing an update on my PhoneGap generated IPA for distribution.
I have been following the same steps I typically use by clearing the PhoneGap signing, resigning using a distribution profile, attaching Entitlements.plist, then signing using my enterprise certificate but when I use the Application Uploader I get the following error.
ERROR ITMS-9000: "Invalid Code Signing Entitlements. Your application's signature
contains code signing entitlements that are not supported on iOS. Specifically,
value "[TEAMID]. [Bundle Identifier]" for key "application-identifier" in
"Payload/Application.app/Application" is not supported. This value should
be string starting with your TEAMID, followed by a dot '.', followed by
the bundle identifier"
at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)
Now the Bundle ID is identical to that of the App's distribution provisioning profile and the one on iTunes Connect. My TEAMID totally matches the one provided in the provisioning profile.
This app is already in the store, I am trying to release an update.
I have installed the new profile to Xcode 4.6.3 and my certificate is also installed there.
I am using Terminal on Mavericks to unsign->resign->zip the IPA for distribution.
I have looked around for a while and have found some other issues and after following their resolutions I am still stuck on this error, which it turn generates a couple other generic errors.
Thanks in advance for any pointers/reference!
I have spent all day fussing about with this issue :(

I've resolved this issue by reissuing my certs/profiles, reinstalling them, clearing my derived data, restarting my computer, and finally completing the resigning process.

Related

Adobe AIR AppStore upload error: Invalid Code Signing Entitlements... 'get-task-allow' (

I've been trying to upload a version of my game to the AppStore for the past two days.
I keep getting the following errors:
ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: 'true' for the key 'get-task-allow' in 'Payload/Game.app/Game'"
ERROR ITMS-90179: "Invalid Code Signing. The executable 'Payload/Game.app/Game' must be signed with the certificate that is contained in the provisioning profile."
Using FlashDevelop, Air 19.0 (since the latest problems in AIR 20.0 - 21.0).
I haven't included the get-task-allow tag in my application.xml, I've doubled checked my certificates, provisioning profiles etc., and even recreated them - but nothing seems to make it work...
Feels like a certificates issue to me, but I can't find the problem.
I had the error ERROR ITMS-90164: "Invalid Code Signing Entitlements" with key get-task-allow and I simply did both a Clean and Clean Build Folder, and I was able to upload to the App Store with no problems. Interestingly enough, I had done a validation on the problematic ipa before and it passed App Store validation, but failed on the actual upload after the file was uploaded.
I had the same problem and solved with a simple Product -> Clean.
In your app descriptor xml try adding the entitlement for get-task-allow.
<iPhone>
<Entitlements><![CDATA[
<key>get-task-allow</key><false/>
]]></Entitlements>
<!--
<Entitlements>
</iPhone>
And yes it does sound like you are mixing up certificates and profiles somewhere along the line.
Are you sure you are using an AppStore profile? (i.e. not AdHoc or development).
Yes - I'm using an AppStore profile.
After some trials, I've deleted all certificates, mobile provisions etc. and re-created them. I've followed this advice as well:
ITMS - 90179 Invalid Code Signing / ITMS - 90209 Invalid Segment Alignment
And it's working now. Apple voodoo...

Visual Studio Cordova error 'No matching provisioning profiles found: No provisioning profiles matching the bundle identifier were found.'

I am trying yo run my app on ios cordova app in Distribution mode using visual studio.
Build fails with following error.
No matching provisioning profiles found: No provisioning profiles matching the bundle identifier ΓÇxxxx.yyy.appΓÇ¥ were found.
This is telling you that you have not setup a valid distribution certificate for your app on your Mac. iOS, Android, and Windows all require you to generate a certificate before you can sign and package your app for distribution to the appropriate app store.
See...
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
...and...
https://msdn.microsoft.com/en-us/library/dn757048.aspx#iOS
By default, Visual Studio will auto-match the distribution certificate. If you need to override to use a different signing identity, you can place a custom build-debug.xcconfig or build-release.xcconfig file in res/native/ios/cordova.
Samples:
https://github.com/apache/cordova-ios/blob/master/bin/templates/scripts/cordova/build-release.xcconfig
https://github.com/apache/cordova-ios/blob/master/bin/templates/scripts/cordova/build-debug.xcconfig
Docs on iOS Build settings:
https://developer.apple.com/library/ios/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/0-Introduction/introduction.html#//apple_ref/doc/uid/TP40003931-CH1-SW1
I came accross the same issue, but with me it was a stupid error on my side.
My App Id in the config.xml was different from the Id in my provisioning profile due to case sensitivity.
e.g. Id in config.xml was com.company.MyAppName but the bundle id in the provisioning profile was com.company.myappname.
So changing the config id to all lowercase helped me. Hope this helps someone else too. :)

ITMS - 90179 Invalid Code Signing / ITMS - 90209 Invalid Segment Alignment

ERROR ITMS - 90179 Invalid Code Signing. The Executable 'Payload/UFO.app/UFO' must be signed with a certificate that is contained in the provisioning profile.
ERROR ITMS - 90209 Invalid Segment Alignment. The app binary at 'UFO.app/UFO' does not have a proper segment alignment. Try rebuilding the app with the latest Xcode version.
I've been getting these two errors no matter what I try. I've deleted all my profiles and certificates, remade them and even remade the App ID multiple times and nothing happened and still the same error. I've updated XCode too and still the same errors.
I used a Wildcard App to create my .ipa file in Flash Pro CC selecting the Apple App Store and tried to publish it through application loader.
Is there any solution to these two problems? Thanks.
There seem to be a conflict with both dev and prod certificates.
I was finally able to submit following these steps:
(1) go in keychain and delete both certificates (dev & distribution)
(2) go to apple site and download distribution certificate only
(3) install distribution cert only!
(4) export p12 from private key
(5) go to apple and regenerate/download distribution provisioning profile.
From there it worked fine, don't ask why...
Restart the Xcode, it should resolve before trying above suggestions. Its a classic trick which seem to work even today :P
my english is not so good but i will try to explain my self the best i can...
y just solve this error that i was also having "ERROR ITMS - 90179 Invalid Code Signing. The Executable 'Payload/UFO.app/UFO' must be signed with a certificate that is contained in the provisioning profile".....
First of all my app is using push notifications so i created a push notification certificate and install it on my Keychain (aps_production), along with my app distribution certificate (ios_production.cer ), and i was exporting my app distribution certificate(ios_production.cer ) using the keychain to export it to the .p12 file....this way i was getting that error...what i did is that i erased everything on my keychain and just install the ios_distribution.cer without the aps_production.cer , this way i fix this issue.....it seems that if you export to the .p21 with others files on your keychain related to your same app. your certificate gets and error...hope this helps you...
I had ITMS-90179 uploading an iPhone App made with Marmalade SDK. Solved it this way:
1.- Deleted all my distribution certificates at Apple dev portal
2.- Created a new Distribution certificate
3.- Deleted all my distribution provisioning profiles
4.- Created a new distribution provisioning profile
5.- Generated a new .ipa using the .mobileprovision from step 4
6.- Attempted to upload this one to App Store, this time it worked.
Hope it helps!
I was also faced with the "ERROR ITMS - 90179 Invalid Code Signing" issue. What I ended up doing, was:
Created a new macOS account with a completely empty Keychain
Imported our iOS Distribution Certificate and Private Key
Regenerated and downloaded Provisioning Profile from Apple Developer Portal
Resigned MyApp.ipa
Validated MyResignedApp.ipa using Appl. Loader (see below)
Uploaded to iTunes Connect
This worked, which tells me that resigning using my usual account probably messed up some of the certificates in my Keychain!?
/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool --validate-app -f MyResignedApp.ipa -t ios -u my_itunes_connect_account#mac.com

The signature was invalid, contains disallowed entitlements

This is specific to Trigger.io.
When trying to upload my application through Application Loader, I am getting the error: "Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate."
I'm very certain, I'm using the correct certificate (i.e. the distribution one, and not the development one). Actually, I'm 100% sure I'm using the right certificate.
That leaves me with signature was invalid or contains disallowed entitlements.
Has anyone encountered this while trying to upload an IPA created through Trigger.io?
I have the latest Xcode & Xcode command line tools on my machine. I am getting this error when I create builds on both Windows and Mac OS.
Any help would be appreciated.
NOTE: While I love Trigger.io, I'm about ready to abandon it due to the hassles I'm running into trying to upload my app.
I think the root cause here was that I was using an incorrect version of XCode (and Application Loader), that had me trashing with provisioning profiles, App Ids, and certificates.
Via the iOS Provisioning Portal, I ensured that the distribution provisioning profile was active, I was using a non-wildcard App ID, and that the distribution certificate was active. Once I cleaned house, and recreated everything, it finally worked.
I do think that I only saw this problem because I was using the wrong version of XCode and Application Loader.
I got this issue when accidentally archiving using an iPhone Developer code signing identity, instead of using iPhone Distribution.
I.e. exactly as the message says, I did not use a distrib cert.

Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate

So I'm not new to codesigning with Apple. I understand this is a novice part of app development, but I'm getting this error and I can't solve it. I understand that I create a private key through keychain access, use that private key to generate a certificate, use that certificate and an appID to generate a provisioning profile, and use an "App Store" profile to codesign for distribution. But I think I'm running into this error because of xcode 4.2. But this is what I've done to try and resolve this issue:
Uninstalled xcode using uinstall-devtools --mode=all, then rebooted and reinstalled xcode 4.0.2.
Removed and re-downloaded the certificate from the provision portal. (No invalid errors)
Removed all profiles associated with the appID I'm working with and only re-downloaded the App Store Distribution profile.
I made sure the I'm explicitly selecting the correct provisioning profile in the project and the target settings for release.
I'm making sure that the release setting is selected for "Archiving" in the Scheme.
One thing that I can think of that might be the issue is I'm targeting iOS version 4.2, and the base sdk is 4.3.
But I've been through Apple's doc: https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933
My issues started to happen after I installed xcode 4.2, and then went back to 4.0.2.
One other weird thing, is when I build for ad hoc I get the same warning, but the ad hoc build works. It just seems that I can't submit to the app store while ignoring the warning.
So after a long pain staking process I finally got xcode to code sign with out the warning. But before I tell you how I solved it, I'm going to tell you what I've done.
I cleared out all my public/private keys, cleared all certificates, uninstalled xcode 4.0.2, reinstalled xcode 4.2 (tried redoing certificates), uninstalled xcode 4.2, installed xcode 4.0.2 (tried redoing certificates), and after all that, still no luck.
Finally I deleted the WWDR certificate from my local machine and downloaded a new certificate from the provisioning portal, and YATZEE! After I redid the certificates and provisioning profile, it finally built without a warning!
So just so anyone has to go through this I've decided to post my answer. I hope I help someone...
You can not run build on your device with "app Store" Provisioning profile. to run on your device you need to have "ad hoc" provisioning profile.
To test or debug your build you need development provisioning profile.That also "ad hoc". for this also you need to create development certificate with same private key.
If you want to do the submission build you need to use "app store" distribution provisioning profile. do not try to install that build in your device it will not work. with "App store" distribution provisioning profile you can install only if its in itunes store or app store.
Hope this will help you.

Resources