iPhone app code-signing error - "...the signature was invalid..." - iphone

I am trying to upload my first iOS app to iTunes Connect, but I am unable to do this because every time I try to upload it, I receive the following error from Application Loader:
The binary you uploaded was invalid.
The signature was invalid, or it was
not signed with an Apple submission
certificate
I have followed the instructions on the Apple website to the best of my ability. I have noticed that the .mobileprovision file that should be in my built .app file is missing - does anyone know what would cause this particular part of the problem to happen? I suspect it could be the root cause.
Moreover, does anyone have any other suggestions as to how I might correct this issue?

on the agent account in developer.apple.com
You must create a distribution certificate
You must also create a Distribution Provisioning Profile.
Download both of these and drag them onto xcode.
In the target info for your project you need to go to the code signing section and make sure you have selected your distribution profile.
Another thing you may need to do is create an entitlements file, declare this under 'code signing entitlements' as described on the apple page here
http://developer.apple.com/iphone/manage/distribution/index.action

Related

Ios Distribution and validation

I get this error when trying to validate, now theres tons of these questions, the problem is, none of their solutions have worked.
The top highlighted one is my distribution provisioning file thats associated with the project in question.
you can even see it's online.
so I have the profile, I have the app ready for uploading (how do you change the date for when it can be available on the app store AFTER you have said "yes these details are right, now lets get ready to upload?").
But I can't validate. every time I log in to "validate" I get that error. I have all the profiles required I have tripple checked every thing, but being VERY NEW to IOS dev, I am sure I missed some crucial step.
Please help.
1) Have you created a Distribution Certificate and downloaded it?
2) Have you created App Store provisioning profile?
3) Are the code signing identities have been properly setup in your project?
If yes to the above then try manually downloading the provisioning profile from the developer portal and restarting XCode.

The executable was signed with invalid entitlements

This is the first time trying to test an app I created with LiveCode on an iPad.
I made sure that the IOS Provisioning Portal had the following set up as ad hoc:
certificates in Development and Distribution.
Ipad is registered
Apple ID is set up
provisioning in Development and Distribution.
When I try to get the app into Xcode the following error is displayed:
The executable was signed with invalid entitlements.
How do I get all of this into xCode so my LiveCode app can be tested in the iPad?
Probably, you used a distribution profile instead of a developer's profile.
The creation of the developer certificate and provision profiles are described step by step on Apple's website. I strongly recommend that you take your time to read these steps and to make sure that you follow each step correctly.
Apple's provision portal also has an assistant that helps you to create a developer's provision profile. You need to use this developer's provision profile instead of an ad-hoc prodile if you want to install your app through XCode on your own device(s).
You can use the devloper's profile in LiveCode's Standalone Application Settings window.
This is a ENTITLEMENTS error, not a code sign issue. Entitlements have to do with iCloud. In Xcode 4 this was done on the Summary page at the bottom. In Xcode 5 it is on a new page called capabilities at the top. It will be lit up with a FIX this Issue Flag. Simply select your Devel profile and you're good to go. It does require an AppID set-up with iCloud Checked. If you're not using iCloud simple delete whatever is in the Entitlements field in the build Settings.
Although I see the "read the doc" answers often. a.) Most of us do try to read the doc and b.) It rarely contains and useful granular detail needed to code or troubleshoot anything. Cheers
Entitlements are also used with the Game Center, Passbook, In-App Purchases and Maps. All are setup in the Target Tab called Capabilities.

Error When Uploading IPA to TestFlight Using New Target

I recently created a new target in my project for the Lite version of my app. Now when I go to upload the .ipa to TestFlight so I can distribute it to my designer, I'm getting:
Invalid IPA: The keychain-access-group in the embedded.mobileprovision
and your binary don't match.
Seems clear to me the reason this is happening is because of the new target. Does anyone know what exactly do I need to change to get this to work?
I had this same problem. It was caused by having the wrong release code signing identity in the target's build settings. You won't need an entitlements file.
Check you are code signing with the correct Distribution profile.
Under Xcode project select > Build Settings > Code Signing
Code Signing Identity:
- Debug > iPhone Developer
- Release > iPhone Distribution
Provisioning Profile:
- Be sure to select a Distribution profile here!
When you created a new bundle you probably didn't change the entitlements and access groups. Make sure you change these in the entitlements file. Have a look at http://www.karlmonaghan.com/2012/08/09/invalid-ipa-the-keychain-access-group-in-the-embedded-mobileprovision-and-your-binary-dont-match/ on how to do this.
Should look like this
If you don't use an entitlements file...
Double check that your developer certificate and provisioning profile used are up-to-date (even if you have the confidence inspiring green tick in the organiser.) Refresh the profile by visiting the Apple Provisioning Portal and edit / modify the provisioning profile, you're using to sign the app.
Un-click and click the signing identity, so that you can submit the form, and the profile will be regenerated.
Wait a minute (really), Go back to XCode and remove the profile from the organiser, next refresh the profiles, and it should re-appear, as the regenerated version.
Once that's done, try archiving / signing the ipa, and upload to TestFlight.
(use the TestFlight app, to speed up this process.)
Here's what worked for me:
Using Automatic (Enterprise Distribution) Profile Selection for all Code Signing Identities I've Established.
Selecting "Refresh Certificates" when going through the Enterprise/Ad Hoc distribution workflow
I have such kind of problem, I am not sure you have the same one or not.
If I have a installed app with the same app id that I am going to install but with a different target, it creates problem. Seems apps are unique with app id and target. So I had to delete the app to install another app with the same app id but different target.
You have good other answers here, but just to stress something out.
If you worked for more than 1 client, and you actually used more than 1 developer account, then the automatic selection of Code Signing Identity on Archive wizard could be different than the one you need, and you might need to select it each time you create the AdHoc version.
Here is a picture, to show you where your error might be (thats where mine was):

Xcode says: "Identity ___ is not trusted." and won't allow me to submit my app

I've been living the nightmare of trying to submit an app to the iTunes store... The newest massive waste of time is an error message that I get when I try to validate or distribute my archive from the "organizer".
The exact message is:
My Xcode is version 4.3.2. I'm pretty sure my WWDR is installed, because this has never been an issue before. I also tried to re-install it just to be safe.
The most frustrating/confusing part is that I JUST submitted my app successfully two weeks ago and nothing was changed. My app was rejected for meta-data reasons. I fixed those issues, re-installed one of my plugins, and now this.
Any suggestions? Even a link to some helpful documentation would be great. I've found the Apple developer docs extremely confusing and UN-helpful.
EDIT1:
I think I may have gotten closer to the problem. I changed some of the build settings and now my build fails with this error:
Code Sign error: Certificate identity 'iPhone Distribution: [my name]' appears more than once in the keychain. The codesign tool requires there only be one. I want to fix this but I'm not clear on which code signing profile should be set where. There are different settings depending on whether I click the "project" icon or the "target" icon and each of those has four different choices. Do all of these require code signing? Can anyone give me an example of a working configuration?
EDIT2:
I think I maybe found the problem. There is a small note that says my Distribution profile has no provisioning portal. I've been downloading and installing new .mobileprovision files but they all say "Developer". I think just need to figure out to download a new distribution profile.
SOLUTION:
Thanks to some pointers from Saad (see below), I figured out what was wrong. I was using the auto-select option for code signing, and the only distribution profile had an invalid provisioning profile. This happened very quietly, and I'm not sure why. I only noticed it when I went back into the provisioning portal to create a new distribution profile. After installing this, everything works.
your provisioning profile is not properly set
Code Sign error: Certificate identity 'iPhone Distribution: [my
name]' appears more than once in the keychain. The codesign tool
requires there only be one.
Open Applications > Utilities > Keychain Access and search for your Distribution certificate. Sometimes the Xcode Organizer decides to generate a new certificate for you and invalidates your old one, but does not remove it from your keychain. Remove the expired/older certificate and quit/re-launch Xcode (make a backup first, in case, by dragging to Desktop or Exporting). That should at least clear up part of your problem.
As for the provisioning profile, if that still is a problem, I'd manually go into the iOS development center and download the App Store Distribution Provision Profile for your app, removing all other provisioning profiles, until you figure this out. Quitting and relaunching Xcode when dealing with certs/provisioning profiles is something I've always had to do.
project identifier and your profile identifier must match

Submitting application to Apple store - application failed codesign verification

I tried to upload my iPhone application to the App store, but received the following error: The binary you uploaded was invalid. The icon file must be in .png format.
The icon file IS in .png format, size 57x57, so assumed it is a bug and tried to upload with Application Uploader, when I got another error:
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate.
I followed every single step, and it is not working... it is driving me crazy! Please advise what should I do!
First, check that the icon file is in .png format, rather than .PNG format.
Second, take some deep breaths, look out a window for a few minutes, and then go back over the steps to upload your iPhone application.
Many people were confusing (like me) modifying the code signing property of XCode.
You must ensure that your code signing identity property start with
iPhone Distribution : Developer Name
instead of
iPhone Developer : Developer Name
PS : If you have no option start with iPhone distribution, you didn't get production certificate yet.
Since you haven't mentioned anything regarding the fact that you did sign the code, I'm going to assume you didn't.
You'll need to get your application code signed in order for it to be accepted, so that the phone knows it's from a trusted developer, and not just a virus someone has uploaded.
Do you have a code signing certificate?