Apple's Problematic Provisioning Portal - iphone

I have restarted this process about 4 times over the past 3 weeks. I have not succeeded in submitting my app to the store. Please help me! I just started over again tonight, I did it in this order:
Deleted everything referring to the IPhone in my Keychain,
Redownloaded the Distribution Certificate
Created a new app id called: com.myapp
Downloaded the Provision Profile and installed it into XCode.
Please note: I did not install an Entitlements.plist because I was told I didn't need one. Everything is looking good at this point.
Duplicated my "Release" Configuration and renamed "Distribution"
Under the Configuration of "Distribution", Code Signing Identity, I can see my Provision Profile it actually says: IPhone Distribution: My Name (for Application Identifiers: com.myapp)
So at this point at the bottom of the Project Info Window I see this:
The name (“common name”) of a valid code-signing certificate in a keychain within your keychain path. A missing or invalid certificate will cause a build error. [CODE_SIGN_IDENTITY]
So I realize I haven't altered my bundle name for my app, I change it to com.myapp, warning still doesn't go away. I tried adding in my prefix into the Bundle Identifier like this:
5JSF8843kJJ.com.myapp (for example)
But the error still doesn't go away!
After all this I try to Build and Run on my device anyway thinking it may go away. But I get this error:
The iPod “myIpod” doesn’t have the provisioning profile with which the application was signed.
Click “Install and Run” to install the provisioning profile “myprofile” on “myIpod” and continue running “myappname.app”.
Please Help! I need to get this to work!
Thank you for your time.
UPDATE: I have fully tested the app and I am ready to distribute, I am trying to get a successful Build so that I can zip up my .app file and submit it using Application Loader.

You can't run an app using the Distribution certificate or Distribution Build.
You shouldn't duplicate your Release Build until after you get it running and configured exactly as needed, except for the choice of code signing certificate.

Related

Invalid signature when submitting on Mac App Store

I'm developing a game for Mac App Store from Unity in which I have a plugin created in Xcode as .bundle file. I am able to codesign and package my game via terminal but problem appears when I try to submit package via Application Loader. I will try to explain everything thoroughly:
Package gets uploaded on iTunes Connect but at the end I get following warning:
WARNING ITMS-90239: "Invalid
Signature. A sealed resource is
missing or invalid. The binary at path
[Panda Commander Air
Combat.app/Contents/Plugins/InAppPurchase.bundle/Contents/MacOS/InAppPurchase]
contains an invalid signature. Make
sure you have signed your application
with a distribution certificate, not
an ad hoc certificate or a development
certificate. Verify that the code
signing settings in Xcode are correct
at the target level (which override
any values at the project level). If
you are certain your code signing
settings are correct, choose "Clean
All" in Xcode, delete the "build"
directory in the Finder, and rebuild
your release target."
I can click on "Next" and finish my submit, but this warning must be resolved because I get mail from iTunes Connect with issues that must be corrected:
UNABLE TO SIGN - This package doesn't
meet the current code signing
requirements. For more information,
see the Code Signing and Application
Sandboxing Guide [1] and Technical
Note 2206 [2].
Specifically, codesign generated the
following error:
webelinx.appstore.panda.pkg/Payload/Panda
Commander Air
Combat.app/Contents/Plugins/InAppPurchase.bundle:
unsealed contents present in the
bundle root
Once these issues have been
corrected, you can then redeliver the
corrected binary.
[1]
http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.html
[2]
https://developer.apple.com/library/mac/technotes/tn2206/_index.html
My plugin actually IS signed in Xcode, I've created new bundle ID and distribution provisioning profile for Mac App Store specifically for this plugin and setup everything in Code Signing tab. Code signing identity is 3rd Party Mac Developer Application and appropriate provisioning profile is selected. When I build this bundle it asks me to allow codesigning, and afterwards when I check it with "codesign -dvvv" command in terminal I can see codesign details. If I don't codesign it, I get another warning when I upload my package which says that bundle is not signed at all. I even tried to do a "Clean all", delete "build" directory and rebuild bundle as suggested in warning, but it has no effect, warning appears again.
How can resolve this warning? Am I missing something important or trying to fix things in wrong way?
Any help will be appreciated because I am out of options at the moment.
Thanks in advance!
OK, I solved my problem. I was missing few things and I found solution here: http://forum.unity3d.com/threads/signing-mac-app-on-os-x-mavericks.206762/.
The thing I still had to do was to manually codesign every file in Contents/Frameworks and Contents/Plugins directories inside .app file and to delete all .meta files inside my plugin. After I did these steps, I codesigned once more whole .app file and created a package which I uploaded on iTunes Connect without warning mentioned above.

Iphone Distribution error

I am new in iPhone Distribution . I created Apple ID U765UXW88D.com.edwincs.*. and
provisioning profile name is MobileHealthGuide. I made these in Distribution tab.
My xcode version is 3.2.4 While uploading application with application loader , I got this error
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate.
My project name is MobileHealthGuide too. I have tried revoking the certificate and provisioning profile, but the error persists.
How can I solve this problem?
I've encountered the same problem too. It showed that I had a duplicate certificate registration in my keychains. Removing one of them (I removed the one from my system keychain) fixed the problem.
Steps that helped me to resolve my problem:
Open KeyChain Access application
Select the 'login' keychain, and select in the bottom pane
'Certificates'
Switch to the 'system' keychain and see if there are certificates
registered in both chains.
Remove one of them
Rebuild the application
You probably need to check what code signing profile is selected in
your distribution build properties.
Alright, then make sure to clean the build & delete the Build folder from the app.
If this doesn't work for you, there is one more alternative :
Verify below steps to create distribution certificate and perform that if you miss anyone.
Generate a certificate signing request in keychain.
Using that create or revoke a DISTRIBUTION certificate in the
portal. after that download and install it and verify key under the
name.
Register the device in the provisioning portal.
Then create or modify a DISTRIBUTION profile in the portal. after
that download and install it and verify it appears to be valid in
Organiser as there are no warnings.
Make sure to select proper build setting in xcode.
Now this will definitely, solve your problem.
Make sure you added right code sign in project target.
Ok so here are detailed steps on how to distribute:
You want to request a development and distribution certificate in Keychain Access and upload it to developer.apple.com (you are part of the developer member program right?)
Create an app ID (in provisioning profiles)
Create a distribution certificate - make sure this and step 2 follow your bundle ID
Download the profile and drag to Xcode
Go to your Xcode project, in the target or project build settings set your code signing option to the Distribution certificate (which must match your Bundle ID and of course your distribution and development certificate) - there might be a recommended or automatic profile, just choose the one that matches your identity and app provisioning profile and Bundle ID
Now go to edit scheme -> then change from debug to release
Then go to project than target than build settings and type in 'Code Signing', change the options to your distribution profile
Set to build for an iOS device (or none at all)
Go to product -> Build For -> Build For Archive
Scroll down on the side (your classes tab etc.) to the product which should be named (AppName.app) and show it in finder.
Create an application on iTunes Connect
Compress the .app and load it to Application Loader
Send it off!
Tips:
Make sure you are using the correct Bundle ID
Try cleaning
Make sure you're certificate is not expired
Here is an expanded list of reasons why this may occur:
Upgrade your xCode! you are using a really old one.
Probably you tried it but go to https://developer.apple.com/ then iOS provisional portal there are lots of tools can help you.
If you are not using inApp purchase, push notification, iCloud etc. you can skip the App ID and just set a general certificate one that would be like U765UXW88D.* so that you don't need to do this process every time for new apps.
Make sure you created distribution certificate and sign with that on xCode for release/distribution.
On xCode itself make sure you defined the bundle ID same as on iTunes connect.
Good luck.
I've got a similar problem as well. In one project, using my dist profile, it works perfectly and I can build to a device.
In another project, when using the same dist profile, the app launches, loads the splash screen, processes the first page and then exits without throwing an error in Xcode or in its own log.
When I change the code signing to a generic dev profile, the app launches without a problem on the desired device.
I've redownloaded the certs, the dist profiles, deleted the old ones.
How is this even remotely possible? And how can this be fixed?
Failed signature verification can happen for many different reasons. See Apple's list of common causes in TN2250.
The most common reason for failing distribution signature validation is because the app was signed with a developer profile instead of a distribution profile, or the app was built with the wrong build configuration. To consider this potential cause check your settings against the recommendations that follow:
The Release build configuration must be assigned to your Archive task. To ensure this, select the "Scheme" pop-up menu in the upper-left corner of the Xcode Toolbar, and choose "Edit Scheme". Select the "Archive" task and make sure the Build Configuration is "Release".
To check that your app is signed with the correct distribution profile, use the steps in section How do I check which certificate was used to sign my app? and ensure the Authority is "iPhone Distribution". If it is not, continue to next bulleted items to correct the responsible configuration.
Ensure that the appropriate distribution provisioning profile that you created for this application on the iOS Portal site is assigned to the Release build configuration. To ensure that use the steps in section Assigning Provisioning Profiles to Build Configurations.
Next, ensure that you are choosing the correct distribution provisioning profile when distributing your app on the Xcode Organizer > Archives tab. To do that, use the sections linked below depending on your distribution method and take special note you're selecting the correct profile on the "Identity" field (Xcode 4-4.2) or "Code Signing Identity" field (Xcode 4.3+) after clicking Submit/Share/Validate or Distribute on the Xcode Organizer > Archives tab.
https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933-CH1-TNTAG32

Provisioning, certificate, error from debugger

EDIT: After trying many, many things over and over again I've decided to upgrade to xCode 4 and problems stopped. I don't know what was wrong so unfortunately this is my advice to the rest of you who are lost with the problem I had.
PS thank you all for your suggestions :)
Hi everyone,
I don't know why, but my app stopped compiling on my device after trying to enable push notifications. In debug mode with developer certificate it was running ok, but I was getting push notification related error in the console. After reading about this problem I realized I'll have to sign the code with Distribution certificate in order to really test the push notification. After "playing" with these things my app could not be deployed on the testing device anymore…
I am getting 2 errors over and over again:
1. The executable was signed with invalid entitlements
and when I solve this problem by changing the "code signing identity" to another developer certificate (admin) I get another one:
2. A valid provisioning profile for this executable was not found.
I tried all of the following:
- I logged with my team admin's pass and deleted /revoked certificates and profiles, recreated them and installed them on my computer. In keychain everything seems ok (certificates with keys) and in xCode Organiser (new profiles) also.
I cleaned targets several times
created Entitlements.plist with custom value "get-task-allow" unchecked
In Entitlements.plist I put my bundle identifier
I removed profiles from iphone device and tried again. It installs right provisioning profile
I restarted computer/xcode, iPhone several times
Then, when I saw that I'm going crazy I've decided to try to start another application just to see if this one can be run.
Guess what… It can't. I get the same two errors as above.
I'll explain how I recreated things in developer portal step by step so that you can see If I'm missing something. Just have in mind that we are using 2 developer tools accounts (team admin (A), team member (B)). I'm saying this because I might have done something wrong while recreating certificates and profiles…
REMOVING OLD SETTINGS
1 deleted certificates (dev and distribution) and private keys from keychain.
2 removed all provisioning profiles from xCode Organiser.
3 In developer portal (as Admin) I revoked its Development certificate and then removed Distribution certificate
4 In devices I removed my iPhone device
5 I removed all Development provisioning profiles. The Distribution ones cannot be removed???
6 Then I logged into Team Member's account and revoked development Certificate
CREATING NEW CERTIFICATE; PROFILE...
1 In keychain assistant I created new CSR and uploaded it, admin approved it and I downloaded it along with WWDR intermediate certificate. Drag and dropped them into keychain - login / category - certificates
2 I added my device name/identifier
3 In PROVISIONING/DEVELOPMENT I created new provisioning profile. I added my developer, all devices, and app ID.
4 Then from my team member account I downloaded it, double clicked it and that was it.
5 In xCode Project info I set code sign to developer certificate, and I ran and built with Device / Debug. I get build succeeded and error: The executable was signed with invalid entitlements
TAPPING IN THE DARK:
//I create enitlements.plist and run and I get: Error from debugger: The program being debugged is not being run.
//Then I add get-task-allow = false and I get the: The executable was signed with invalid entitlements.
//If I change it to true then I get: Error from debugger
//Then I add my app Id to Entitlements as a pure string. Nothing changes here :( - either
Thank you very, very much for even reading my post.
Hope I'll solve this before going nuts…
Best regards,
Luka
For that you have import private key(.p12) of mac of your team leader then it will work.I face the same problem it works then only if you will have private of that mac from where the certificate made.Hope so that it will help.
I just spent a few hours with this exact error, the steps i took to resolve it were:
check that app ID has push enabled
create a new provisioning profile
delete all other profiles in xcode and on the device and use new profile
(building and installing on device without error)
create entitlements.plist and add in get-task-allow, change type to boolean, set to true
(now getting entitlement error)
So after much googling i found a blog post about how images can affect this so i checked and noticed we were in the middle of changing the app icon and currently didn't have one set. So I threw in a older app icon and it just started building like magic and giving me the device token.

Irritating - The executable was signed with invalid entitlements

I've been trying from last 2 days,tried every solution available online,but all of them failed..
The executable was signed with invalid entitlements.
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.
(0xE8008016).
I'm fed up guyz..i've to deploy my App on Ipad(ver3.2). please note that i dun't want to distribute it,so i think i dun need any entitlements.plist files.
Secondly, i've tried deleting all the profiles from my xcode as well as device, download the new provision profile and then tried,still getting the same error.
i've even tried deploying an empty project on Ipad,but still getting the error.
its making me insane.. :#, please help me out, I've to complete my project... :((
Delete all the provisioning profile from system as well device, also delete from the download folder delete the development certificate from the key chain. Start again from the scratch. I had also faced the same problem. May be this can help

Application failed codesign verification. What do I do?

Xcode gives me this warning when I build the app for release.
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
Do I need to delete all entries from my keychain and redo getting a certificate, provisioning profile, etc?
I can build and debug on the iPhone and iPad without a problem.
If you know how I can solve this dilemma, please provide exact steps or a way for me to contact you about this.
Thanks
----UPDATE -----
Build Log
Validate build/Release-iphoneos/iApp.app
cd "/Users/iosdeveloper/Documents/Programming/iPad/iApp HD"
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv PRODUCT_TYPE com.apple.product-type.application
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation "/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app"
warning: Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
Executable=/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app/iApp
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app: valid on disk
/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app: satisfies its Designated Requirement
test-requirement: failed to satisfy code requirement(s)
codesign_wrapper-0.7.10: failed to execute codesign(1)
- (null)
Here's the checklist I go through when I've hit this:
Clean all targets, exit Xcode, then go drag the build folder from your project to the trash.
Do the Get Info on your project, make sure the Code Signing Entitlements and Code Signing Identity are selected correctly. Do the same for your Targets.
Login to the iOS Provisioning Portal and make sure the Distribution certificate has not expired. Also check the Distribution Provisioning Profile and make sure it is Active. Make sure the Certificate is properly in your Keychain and the Distribution profile is in Xcode Organizer (if you have multiple of the same one, delete all but the correct one and redo step #2).
Look at your Build Results on the failure and identify which profile it is actually using and make sure it is the right one.
You probably need to check what code signing profile is selected in your distribution build properties.
It looks like your target is "Development" but Xcode applied some of distribution settings to it, so the warning simply means your ad-hoc build has no valid AppStore submission certificate. Go to your target settings, choose the Release configuration and uncheck "Validate Built Product" option.
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
i am got the Same Warning Message...
I just Changed to iOs Deployment target 4.3 to 3.2.2 its works perfectly .....
Note: you may have to go to XCode's "Project" and select "Edit Active Target (appname)",
which is near the bottom of the list ... in the new pane that opens, select "Build", then
under "Code Signing Identity" select your distribution provision. Note that this seems
to be editing a different thing than "Project" / "Edit Project" (editing "target" instead
of "project"). I found I had to edit both project and target's code signing identities.
I had exactly the same problem. It was due to installing Xcode 4.0.2 and 4.2 preview 3 at the same time. Removed both (through the provided uninstall scripts):
<Xcodedir>/Library/uninstall-devtools --mode=all
Then rebooted and installed 4.0.2 and it works :/
I have found the codesign process a headache - I always shudder when I get am ready to use Ad Hoc distribution to beta test. After the usual round of errors and failed fix attempts I ignored the "application failed codesign" error and sent the build to a beta tester. It worked without issue.
Very frustrating.
In the build log provided in the -UPDATE- section of the original post the root cause of the failed signature verification is expressed with the text:
"test-requirement: code failed to satisfy specified code requirement(s)". That particular flavor of failed signature verification is almost always caused by mistakenly signing your app with an iPhone Developer profile instead of an iPhone Distribution profile.
It can be confirmed with the steps in "How do I verify the certificate that was used to sign my app?". If the certificate "Identity" is "iPhone Developer: YOUR_NAME" instead of "iPhone Distribution: ..." that is the reason for the "Application failed codesign verification" error, and you can resolve it by performing the following steps:
1a). if you have not yet created an App Store Distribution Provisioning Profile yet, that is done on the "Distribution" tab of the "Provisioning" Section of the iOS Portal site.
Note, the "Distribution" tab is only available to Team Members whose role is either "Agent" (the one who signed up for the iOS Developer Program), or "Admin" (those that the Agent grant access to app-distribution capabilities).
1b). if you're fairly certain you have an App Store Distribution Provisioning Profile installed in your Xcode profile library, you can verify it is an App Store profile as well as the App ID associated to it by using the steps in section How do I confirm my Provisioning Profile is for App Store distribution?
2). verify that your Scheme 'Archive' task is mapped to "Release" using the steps in section:
"Creating an Application Archive"
3). check that you have an your App Store provisioning profile assigned to your "Release" Code Signing Identity using the steps in section
"Assigning Provisioning Profiles to Build Configurations".
Note: it's important to make these changes at the Target level Build Settings, versus the Project level ones, as Target settings override Project ones...you can think of the Project level build settings as 'defaults' to populate target settings (and any future targets) with. Also, Ensure the "All" button is depressed in the upper-left corner of Target Build Settings to reveal the "Code Signing Identity" section.
4). retry your Product > Archive.
If the issue persists after the above, I recommend continuing onto Apple's complete list of potential causes of this error at the following URL "How do I resolve the error: Application failed codesign verification?"
My problem was solved when I noticed that I only had a "team" provisioning profile, and the details in iOS Dev Center told me that it was not a profile fit for development because it had no device attached. So I created a second provisioning profile, which let me check the box for my device so that it had a device attached.
Then when validating or submitting the app from the Organizer window (after pressing 'Build and archive'), I first made the mistake of selecting this new profile as the code signing profile. That was wrong. The profile that worked was iPhone Developer.
Good luck!
PS: This whole submission process is a heap of abacadabra. Do you really have to create a zillion distribution profiles, provisioning profiles, etc.? It hasn't encouraged me in any way to better test my app. I already did that before I chose to upload, and clicking a hundred buttons labeled 'Create','Download' and 'Submit' isn't really a quality control process that added anything (well except being forced to buy an iPad and test on that). Who ever said iOS was developer friendly?
My problem was that the Archive scheme did not have Build Configuration of App Store, but of Release. To change this, go to Product -> Edit scheme, select Archive on left side and change Build Configuration to App Store. I am assuming the code signing is configured properly (with distribution certificate).
You probably created a new certificate without refreshing the provisioning profiles
Create your iOS Distribution Provisioning Profile for App Store Distribution
I solved this by deleting the Archive that's not validating from the Organizer, closed and reopened Xcode and built for Archiving again.
I then chose Archive from the drop down menu. After doing that my app passed validation.
Hope that helps.