Error 0xE8008016 - iphone

I ran into another iPhone problem again. I finished my app, and I need to test it on my phone before I submit it to the app store. But, whenever I press Run, I get an error message like this.
"The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.
(0xE8008016)"
I have a Provisioning profile for development and distribution, and certificate with keys for develoment and distribution as wells as my device is listed in the portal.
I'm not really an expert at Xcode, so if you do answer, can you please explain a fix detailing every step. I know lots of other people have asked this problem, but I can't follow there answers.
Thanks in advance,
Will

Having the provisioning profile isn't the same as setting it in your build settings to run with the project. Click your Target on the left sidebar and then click the Project. Click the Build Settings tab. Under code signing, select the proper provisioning profile in each of the drop down boxes. It should build properly after that, assuming you do have the proper provisioning profile and certificate.
If you're just now testing on your phone right before you submit to the store that's a whole other problem, but I suppose you'll figure that out yourself.

Check that the build configuration you use is not pointing to some Entitlements.plist file, which in its turn might be non-existent or containing wrong data about certificate/profile pair. If that the case, the settings in latter will override anything you set in the build settings resulting in having wrong actual certificate used.
To double-check this find your configuration in the "Code Signing Entitlements" section in the Target/Project Build Settings.
In my case I had exactly the same alert when it was pointing to an "entitlements.plist", which could not be found anywhere in the project. Clearing any mentioning of this file for the target build configuration fixed the problem for me.

Related

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):

Error Validating and uploading App to iTunes Connect

This is driving me crazy. I've tried searching for answers and nothing quite matches my problem.
I've successfully archived my app and need to upload it to iTunes Connect. Apple recommends Application Loader but first needs to be done in Xcode. When I attempt to validate or Distribute the app in Xcode, I get an error saying "No Identities are available for signing"
I'm confused because I've wiped my certificates and profiles clean but I continue to get this message. Any ideas what I'm missing?
"No identities available for signing" can get frustrating. What you should do is regenerate your distribution certificate and profile, that should fix the issue.
If you need help regenerating: Download and open the new distribution certificate, which will store it in your keychain. Then, drag-and-drop the profile into your Xcode organizer. Next, your going to click on the project in the upper left (it has a blue icon next to it), that will bring up the projects info. There should be 2 tabs at the top of the screen, "Info" and "Build Settings". When you click on Build Settings, the option to change the code signing is about halfway down the screen. When I ran into this issue, I had to change every single one of the code signing options to iPhone Distribution. (It might not be necessary to change every field, but I did). You should be good to go after this, let me know if you have anymore issues.
I solved the problem by deleting ALL dev profiles and recreating a single provisional profile for Distribution and Developing each. Xcode then selected the profiles automatically without me having to import them into Xcode.

The executable was signed with invalid entitlements

So here we are yet again. I already have an app on the app store, that took me 2 days to get past all the errors and just get the thing on there.
Right now, I'm trying to put the 1.1 update on my brother's iPod Touch for testing. I pressed 'Use for development'. That's fine, works. Then i build and go, and it says 'The iPod “Dans Ipod touch” doesn’t have the provisioning profile with which the application was signed.' so i press Install And Run to install the provisioning profile, and then get 'The executable was signed with invalid entitlements'.
I'll be clear - all i want to do right now is to test the app on an iPod Touch, which is plugged into the computer. How do I get past this error and do that? I have what i thought was a valid provisioning profile selected in active target and active executable, but apparently that isn't enough. Any ideas?
Couple of easy things to try:
Do a Clean before building again.
Go to Xcode's Organizer and click on all the Profiles, checking they are valid. Xcode'll throw up warning text if say, something is missing in Keychain.
Make sure your profile contains your iPod device UDID. Make sure that the certificate with which the profile is signed is installed in your keychain. Also make sure the bundle id in your profile and app info.plist match.
Outdated provisioning profiles can often be a problem. Click on your Project and your Target and then individually check the provisioning profile for each code signing identity (Ad Hoc, Debug, Release etc.) by actually clicking on it. Note that it might look like the right profile, but when you click on it, it appears at the bottom of the list in 'others'. This usually means XCode is referring to an older profile. Make sure you now select the current, up-to-date profile from the list above. It is best to check ever Code Signing Identity individually just to make sure.
Once done, I recommend cleaning the project and deleting the app from your device before running it again.
Also, check your profile in Organiser and make sure it has a Green Tick (Valid Profile) and in the Provisioning Portal to ensure the required device is included in the profile.
Go to Window -> Organizer -> Devices
and then go to the connected device's Provisioning Profiles tab.
Note the name of the currently valid profile (must have a green tick icon).
Click the project then go to Project -> Build Settings -> Code Signing
Then copy the appropriate profile name into the Code Signing Identity field.
Clean the project
Then run the program on the device
In one case, to solve this issue, I also had to add the provisioning profile on the iphone's provisioning profiles, available only on this phone, from Organizer>Devices. It is strange, because this device is the only one that require that action. (Anyway I'm Newbie)

Error in iTunes connect: The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate

I went through the dev portal provisioning process twice now trying to get it to work, but to no avail. I don't think it's the second half (signature is invalid), I think it actually may have to with my binary. I have a warning in Xcode that isn't helping me because I don't know what to do about it. And honestly I don't know how relevant this information even is. But it says:
"Check Dependencies: Warning: The copy bundle resources build phase contains target's info.plist"
The app runs perfectly in the simulator, and I haven't made any changes to the info.plist since I submitted the app to Apple last week. (this is an update)
To remove the warning, right click on the info.plist file and choose Get Info. Then from the Targets tab ensure that none of the targets (you may have only one target) are selected. You don't need to directly add the info.plist to the bundle. See this Apple Q&A note for further details.
Check that you are building with the correct code signing identity. Right-click on your target and select Get Info. In the build tag look for the code signing section and ensure that the correct certificate is being selected for the application specified in your info.plist.
Then do a clean build (from the Xcode menu: Build->Clean and then Build). Check the build results (Build->Build results), you may have to change the settings to show All Messages. At the end of the build log you should then see a message about a successful codesign.

Cannot run code on device

I have some source code which I had developed and later gave to another team. They signed it with their certificate and provisioning profile.
Now I have the code back and have set the appropriate values in the project properties for code signing identity (with my cert and profile). But when I run the application on a device, I get an error showing the other team's certificate and prompting that the provisioning profile does not exist.
I don't know where it is being referenced.
Can someone please help.
Thanks.
Check the Target properties, not just the Project, because it could be overridden there.
Similar thing just happened to me, in my case the "Target" settings were still set to the previous developer's certificate, while my "Project" settings were set to my new certificate. Xcode reported:
"Code Sign error: The identity 'iPhone Developer: ' doesn't match any valid certificate/private key pair in the login keychain"
Boot's answer worked for me - there are "Target" settings for signing that override the "Project" settings, which is why you may have needed to recreate the whole project, if you only changed the "Project" settings.
Change the Active SDK from iphone device to Iphone simulator. This will let you test your code on your iphone simulator. You need a cert if you plan on running your app on your device. (Maybe the code that you got was signed for device).
Under Project > Edit Project Settings... click on the Configurations menu and select All Configurations. Then scroll down to Code Signing (or type it into the search field) to verify your provisioning information, changing the Code Signing Identity as needed.
connect your iphone, open organizer, there you first need to delete the profile of your other team, and then force an add of your profile (by drag and drop or clicking the + button)
once done, change your code signing settings from the project info window and you should be okay. i faced the same problem and had to do the above to resolve it
Solution people
http://developer.apple.com/iphone/library/qa/qa2008/qa1618.html