Code signing error after updating iOS - ios

I have just updated to iOS 6.1 from 6, (i kept putting it off a while back) I have been developing on my iPhone and now close to publishing - but all of a sudden when I run it xCode gives this error:
I have checked and all my code signings are the same on the account and my phone is still authorised.
And here is the project file: Notice the MintfestProfile error:
Is there anything I can do to fix this?

Your Certificates and Provisioning Profiles have different exportation dates.
Update any expired Certificates or Provisioning Profile
Delete old profile in Xcode Organizer and Refresh (bottom right button)
Reselect profile in build setting.
Certificates
Provisioning Profiles

Related

iOS: Production Provisioning Profile has no devices included

I recently decided to add Push Notifications to my iOS App. I had to create new certificates, then I realised the devices included in the Apple Developer Website weren't up to date. So I had to add my new device with the correct UDID. That's where the issues started. I can't exactly explain all the steps I've taken because I've been constantly deleting and adding new Provisioning Profiles today. Here is the status now:
I have a iOS Team Provisioning Profile, in iOS Development, Managed by xCode, for my app.
Then, I created my own iOS Production App Store Provisioning Profile, but it always indicates that there are "0 devices" linked to the profile. Impossible to add a device. This obviously creates issues in xCode, because whenever I try to generate new archives, or builds, I'll get issues that my device is not included in the provisioning file.
I've tried deleting them all and recreating them multiple times to no avail.
Whenever I let xCode try to fix the issue, it ends up with the Provisioning Profile in Build Settings being switched to Automatic, and the Code Signing Identities ALL switch to "iOS Developer". But that obviously fails when I try to build a Release build of my app.
From scratch, what are the steps to generate a valid iOS Distribution Profile for my app, that includes my device, and that I can use for Push Notifications?
EDIT: I now understand that I can't add a Device to a Distribution Profile and that this is not necessary. Thanks a lot. Still, I get the following message whenever I try to build on my device:
Your build settings specify a provisioning profile with the UUID “...”, however, no such provisioning profile was found.
Xcode can attempt to fix this issue. This will reset your code signing and provisioning settings to recommended values and resolve issues with signing identities and provisioning profiles.
ANd when I click on fix, it switches back to everything I explained above.

The executable was signed with invalid entitlements after Xcode 7.2 update

Today I updated Xcode to version 7.2. When I opened Xcode after the update to do some enhancements to my app, I got build errors about the name of the app, which has an underscore in it (com.company.my_app). So I changed to bundle identifier to com.company.myapp (just removed the '_'). I've tried to rename all the My_app instances to the name without the underscore.
Now, every time I build the app it works, the build succeeds. But when it has to run the app on the iPhone (which I've previously used), it gives the error The executable was signed with invalid entitlements. I've checked the build settings with the provisioning profiles and entitlements and this is the list:
Code Signing
Setting: My_app
Code Signing Identity: iOS Developer
Debug: iOS Developer
Any iOS SDK: iOS Developer
Release: iOS Developer
Any iOS SDK: iOS Developer
Provisioning Profile: Automatic
Debug: Automatic
Release: Automatic
Changing the Code Signing Identity values to anything else I can choose from the menu (I get my own account with my email address, which is the correct one), it gives the following error:
Failed to code sign "Myapp"
Your build settings specify a provisioning profile with the UUID “ca8f55bc-aa78-445a-aa45-a6a69ff552f7”, however, no such provisioning profile was found.
Xcode can attempt to fix this issue. This will reset your code signing and provisioning settings to recommended values and resolve issues with signing identities and provisioning profiles.
It then shows a dialog asking me to fix these issues, but when I do that (selecting my profile) it just resets the values back to iOS Developer and the Provisioning Profile settings back to automatic. When I try to run the app, it just gives me the same error about the executable being signed with invalid entitlements.
How do I fix this? I just can't install this app on my iPhone and in the simulator it gets stuck at the splash screen. It was working perfectly well before the Xcode 7.2 update.
Your bundle identifier is linked to your provisioning profile when you changed it there is now no provisioning profile for your app.

Code signing broken on Xcode 5.1 + iOS 7.1

Seems Apple has broken provisioning profiles in Xcode 5.1 ??
Upgraded to Xcode 5.1
Plugged in a device that wasn't registered on Dev Center
Asked Xcode to auto-add it
Result:
Developer Provisioning Profile is now corrupt in Xcode5
The following had no effect:
Restarting Xcode
Deleting profile and re-downloading within Xcode
Check that certificate is valid
Re-building with other profiles for same account/project (i.e. Distribution profiles) that had NOT been changed (works fine)
NOTE: in iPhone Configuration Utility, the profiles shows up as valid with all the registered devices. In Xcode5.1 I get:
Code Sign error: No codesigning identities found: No codesigning
identities (i.e. certificate and private key pairs) that match the
provisioning profile specified in your build settings (“iOS Team
Provisioning Profile: com.irisconnect.betairisconnect”) were found.
Solution: it's Xcode 5.1 that is broken, with a major bug.
If you allow Xcode5 to download provisioning profiles, it now internally corrupts any Developer profiles it downloaded.
If you instead:
quit Xcode
login to web version of Dev Center
manually download the profile
install using iPhone Configuration Utility
Re-start Xcode
...everything works fine.
Note: if you ever do the download within Xcode 5.1, then no amount of restarts will help you :(.
Thanks, Apple.
i had the same problem and was tearing my hair out. thanks to the answer above, i went and looked in keychain access and saw that my previous iPhone Developer certificates were listed as expired. so, i deleted these in keychain access.
then:
1) i went to the apple developer portal (https://developer.apple.com/account/ios/certificate/certificateList.action?type=development), clicked on the development certificate, and clicked download.
2) i dragged that certificate into keychain access (it's a login cert).
3) i went back to xcode, to the build settings code signing section of the project.
4) by hand, i set the provisioning profiles to my team provisioning profile.
5) i went up into the code signing identity section and by hand selected the new code signing identity.
and voila, it worked...my project built.
btw, i went through all that because i had made the fatal error the prior answer indicated, i.e. i had let xcode download a new certificate and then let it try to fix the code signing issue, and got caught in 1 infinite loop...just kept failing...
hope this helps
I got the same problem.
Here is my solution
Download Provision from https://developer.apple.com/account/ios/profile/profileList.action?type=production
You will get the file name "mobileprovision", change it to "YourAppName.mobileprovision"
Now Click open it with xCode
Archive and Submit your application again by Organizer
Here's what worked for me on Xcode 6, iOS 8.
Visit https://developer.apple.com/account/ios/profile/profileList.action?type=production
Revoked all certificates
Closed/restarted XCode.
Attempted to Build/Run again.
This time the Auto Fix process in XCode worked.

Old provisioning profile keeps popping up

I have an app that I have had on the AppStore for a while and I have updated it several times.
After I installed my Mac from scratch without backing up my certificates (as I now know I should), I have been trying to set up the signing process again with no luck. I get the error:
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 6.1'
After a couple of attempts I have deleted all certificates in the KeyChain, deleted all provisioning files both in the organizer and on my phone and deleted everything on the provisioning portal.
Then I let Xcode do everything. (XCode 4.6 installed today) It adds both developer and distribution certificates to my keychain and the development and distribution provisioning files to the organizer.
But one strange thing happens. An old provisioning profile that I used on another project a couple of years ago keeps popping up. I wonder why and if it might disturb the signing process?
Below is from the provisioning portal. The lower profile is the old one that keeps popping up. It has another appID. And it is strange that it says. "Managed by XCode" on only that one. I let Xcode do it all. And the date on it is the same as the profile I created today.
Can I get rid of this old one?
Can it be that Xcode is confused and this is the reason?
It's possible that the old provisioning profile is still lingering in your project file. I had a simular problem. Here's how I fixed it: Link

"No unexpired provisioning profiles found that contain any of the keychain's signing certificates" Horror

I have seen a few other questions that addressed this topic but none like mine. Yesterday I innocently added a device to the list of devices.
Question:
I am under the impression that once you add a device, it will now be linked to the provisioning profile. However, I believe it was not linked to one of my distribution profiles. So I went into edit the profile, clicked the checkmark next to the device, and hit submit. This is where the problems began.
I notice two things: I recently renewed my certificate/provisioning profiles about a week ago. Now, it thinks I renewed my provisioning profile yesterday ( or at least it says so in the organiser ).
Also, when I try to build any project I get the awful "No unexpired provisioning profiles found that contain any of the keychain's signing certificates". In the build settings my signing identity shows up under Identities without provisioning profiles. I have read horror stories of people having to tear everything down and rebuild and I hope I don't have to do that here..
Related question:
Code Sign error: No unexpired provisioning profiles found that contain any of the keychain's signing certificates
iOS distribution is such a pain in the ass! This worked for me (follow the steps in this order):
1) in the xcode organizer:
delete all provisioning profiles
2) in the mac os x keychain:
delete all iOS dev certificates
3) go to developer.apple.com
log in to the member center
revoke all certificates (edit: some redditors pointed out that this isn't a good idea if you're working in a bigger team. If that's the case try just deleting expired ones.)
4) go back to the xcode organizer:
click refresh (bottom right) under the provisioning profiles tab and
login
List item
on the popups click the positive button
5) in your xcode project go to the "build settings" tab
under code signing pick the dev. and distr. identities
if they are not there or not valid go to developer.apple.com and navigate to "provisioning" if they are invalid just click modify and save them again
6) go back to the xcode organizer:
hit refresh again (bottom right)
Today I've installed Xcode 4.3.2, and immediately had the same problem! First trying to archive distribution, and after that In a clean new project, trying to run on a device.
I fixed both problems.
1. For successful distribution I've downloaded and installed my distribution certificate from iOS provisioning portal, after that in Xcode I've setup Code Signing Identity correctly. This solved my problem with archiving.
2. I had the same problem creating new project and trying to run on device. Again in provisioning portal in certificates I've deleted my development cert. Also I deleted all development provision profiles. Also deleted them from organiser. Then I added the device again.
Hope this helps!
For me just hit the "Refresh Button" at the bottom right was the answer !
Hope I can help someone.
I got this error when I the bundle identifier for my app did not match the provisioning profile I was trying to use with it.
I came across this today. It turns out that after I cleaned up my devices list (removed a few I'm no longer doing development for) it made some of my development certificates invalid. I deleted those from the provisioning profiles and regenerated them.
I have Xcode 5.1 and i fixed the issue like this
Xcode -> Preferences -> Accounts -> View details -> Refresh button (Bottom Left)
After it was refreshed i clicked done, and the error was gone :)

Resources