No identities were available - administrator request - ios

I had problems while "archiving" my app. I think there are invalid profiles because of iPhone Update to 5.1 and XCode update to 4.2.2.
I've taken now more than 4 hours to get rid of certification issues while using this thread step by step 3 times (which costs a lot of time):
Getting "A valid signing identity matching this profile could not be found in your keychain" warning
I still have the following fault:
No identities were available
An administrator must request identities before they can be downloaded.
The "Download identities" button went back to this window after processing some seconds.
Do you know how to get out of this wood of certification documentations and solve that fault?

Visit Member Center
Go to "iOS Provisioning Portal" -> "Certificates" (Left sidebar) >> "Distribution" tab
Check field "Provisioning Profiles". If empty, next (4)
Go to "Provisioning" (Left sidebar) -> "Distribution" tab. Press "New Profile" and complete it.
Go back to (3) check the field again.
Download and "run" (double click) the new provisioning profile.
In your project's build settings select the NEW provisioning profile (it might have the same name as the old one)
In your project's build settings update your code signing identities (all of them) to the new one if there is one. (The old one was probably expired which is one of the biggest causes for the error message you saw)
Verify that your bundle ID is correct (CaSe SeNsEtIvE)
Back to XCode Organizer - Devices. Click TEAM (Left sidebar) and click "Refresh" (right-bottom). You will find XCode fetch the new profile. If new content loaded, repeat steps 6 and 7 (they will have been changed!) *If you can't find team because you are running a newer version of xCode, go to Xcode preferences (clicking "Xcode" on the mac toolbar on the top left corner of your screen) and go to account, select your team and click refresh. If new content loaded, repeat steps 6 and 7 (they will have been changed!)If you are in Preferences -> Accounts and you still can't refresh, then:
Click on the Accounts tab
Select an Apple ID in the list
Click "View Details" on the bottom right
Click on the refresh arrow on the bottom left
Xcode will now refresh the updated credentials, and you can proceed to validate or distribute your app.
Validate or distribute your app again. It should work.
If this didn't work then go to "TEAM" under project settings > targets and select "none"... Now that you have selected None you will need to repeat step 7 and change the code signing identities (all of them) and try archiving again.
Lastly, if none of the above worked. Simply create a new production certificate AND create a new provisioning profile with the same bundle ID. (Yes, this will work if you are updating an app that is already live). Download the cert and prov. profile and run both (double click). Now repeat step 6 and archive. This should work.

#Takoi's answer is correct. However, with my latest version of Xcode, there is no TEAM option in the Devices section of the Organizer. I had to do the following instead to refresh the credentials:
Go to Xcode->Preferences
Click on the Accounts tab
Select an Apple ID in the list
Click "View Details" on the bottom right
Click on the refresh arrow on the bottom left
Xcode will now refresh the updated credentials, and you can proceed to validate or distribute your app.
Hope this helps!

Make sure the bundle id in your .plist file in XCode is the same as the bundle id in itunesconnect, if it's off, it won't be able to match the archive to the profile on itunesconnect when validating/distributing.

This is a little easier now.
You go to the app itunesconnect and login
click "certificates"
Provisioning Profiles / Distribution
generate a profile,
download the profile
double click it

I am a member of 2 teams and had the same problem while uploading one of the projects.
Changing General -> Identity -> Team to None in project settings (XCode 5) allowed me to upload the application to iTunesConnect.
Screenshot is here

My certificate had expired which resulted in my provisioning profile being expired.
Once I -
Updated my certificate on the iOS web portal
Clicked Edited on the provision profile
Selected the new certificate and clicked generate
In Xcode I refreshed my provisioning profiles
Error went away

I guess it is written somewhere in the stream, I did not read all in detail. I just want to emphasise on this point:
Due to an annoying xCode behavior, once you've set up everything, you HAVE TO clean the project and Quit xCode.
Then relaunch and build. Now you know if it works or not.

It looks like you're going to have to request another developer cert. Go to the iOS dev center website and go to the provisioning portal. Click the certificates tab and follow the directions. https://developer.apple.com/ios/manage/certificates/team/howto.action
To be clear, you're problem doesnt seem to be provisioning related, it's specifically the developer cert. if you do get another cert, you'll have to create all new profiles to sign your apps with.

My bundle identifier was named differently. I had to change it from Nyquist.GasBro to com.Nyquist.GasBro which is what I had in the provisioning profile.

None of previous answers helped me, so I post my issue.
Dev Center: Certificates, Identifiers & Profiles > Provisioning Profile > Distribution
Make sure that there is a distribution provisioning profile, and App ID in it is exactly the same as Bundle ID of your app in Xcode (Project Settings > General > Identity > Bundle Identifier).
Xcode: Project Settings > Build Settings > Code Signing:
Provisioning profile - choose that Distribution provisioning profile name (not Development!)
Code Signing Identity - I choosed Automatic since I have only one.
P.S. Before doing this, I deleted all unused and expired provisioning profiles and signing identities from Dev Center and from Xcode. Then, refreshed as mentioned in other answers: Xcode: Preferences > Accounts > (my Apple ID) > View Details > Refresh.

The answer that you are looking for is that when you generate the certificate request for COMMON NAME you need to put your HUMAN NAME as in John Smith, not your app name. Apple uses this term Common Name in 2 different ways and doesn't tell you that the certificate is supposed to have your name on it whereas in another area they ask for common name and want the APP name.

I had the same problem.
Nothing mentioned on this page did not work for me until i was deleted everything from archive.
After that problem disappear.

For those who says that the Ad Hoc Distribution profile wont work this year 2014, I have to agree.
In Build Settings locate the Code Signing setting: for Release choose your Store Distribution and then select Menu>Product>Archive.
Later, in the Organizer Window, select your archive and clic in Validate. It will let you select the Ad Hoc profile and validate... then select Distribute, it will let you save as .ipa file.

Related

Xcode 7 how do you refresh provisioning profiles?

In Xcode 6 you would click on Xcode -> Preferences -> Account -> View Details -> then there would be a little circular arrow. That is gone and there is now a "Download All" button that when pressed does not reload your provisioning profiles.
I've even tried deleting my account and re-adding it. Still no good.
Xcode 7 should automatically refresh your profiles locally when a change occurs to a profile in the Developer Portal. However, you can force this to occur by deleting and re-downloading the profiles.
Begin by opening Xcode's preferences window (Command+,). Select the Accounts tab, and click the "View Details…" button. In the bottom list that appears, Shift+click or click+drag to select the profiles you'd like to refresh. Then, right-click one of the selected profiles, and choose "Move to Trash" from the contextual menu.
Once that's done, the "Download All" button should pull down fresh copies of everything in the Apple Developer portal.
Profiles not deleting? Per feedback in the in the comments below, if you delete a very large number of profiles, Xcode may appear to do nothing, despite having actually removed all of the selected profiles. If you believe that this is the case, it may help to restart Xcode.
Be sure to take care when selecting profiles to delete… if they're not in the portal (e.g., they were supplied by another developer), Xcode can't automatically get them back for you. If you accidentally delete such a profile, you can find it in the Trash.
You can delete directly your Provisioning Profiles by running:
rm /Users/[userName]/Library/MobileDevice/Provisioning\ Profiles/*
Then re-download your profiles, Xcode -> Preferences -> Account -> View details... -> Download All
Your list in Target -> Build settings -> Code signing -> Provisioning Profiles will be updated.
YM
I had this issue with a workspace containing multiple projects in XCode 7. My developer certificate had expired so I needed to get a new one and reassign it to my provisioning profile. This ended up being a major problem because the expired provisioning profile kept rearing its ugly head and would not get updated automatically. It was in fact listed in XCode->Preferences->Account->View Details twice (where, I might add, there was no refresh button and no contextual menu). Nothing I did made it go away and XCode kept asking for the wrong provisioning profile.
I finally solved it by deleting all of the profiles in ~/Library/MobileDevice/Provisioning Profiles, opening the workspace in XCode 6 and using the refresh button that DOES exist in XCode->Preferences->Account->View Details.
XCode8: There is one provisioning profile that still always shows "Download". No matter what - it's the share extension app group provisioning profile for distribution.
I've tried:
Deleting all provisioning profiles in the Accounts tab "Move to Trash", then manually re-importing by downloading and dragging them to xcode - one still shows "Download"
Deleting the apple id associated with the account, then re-adding my apple id. Then manually re-importing by downloading the provisioning profiles and dragging them into xcode - one still shows "Download"
Downloading the provisioning profiles in the Preferences->Accounts is still really buggy and never works for me. It doesn't matter if I'm behind a proxy or not.
Deleting all provisioning profiles by removing the folder in /Library/MobileDevice/Provisioning profiles, then re-importing them by downloading the provisioning profiles and dragging them into xcode - one still shows "Download"
Apple, please fix this. Thanks. :)
I'm wondering if there is a guid mismatch in the project file or something, or if reinstalling xcode will help at all. This worked in xcode7, but now I'm using xcode 8.
UPDATE: The provisioning profiles were invalid but they weren't showing as invalid in the Apple Developer Site. When I toggled "automatically manage signing" to true, then back to false again, they showed up as invalid, then fixing them + re-importing them fixed the problem. What a disaster.
Make sure you've actually changed your provisioning profile. I ran into this same issue when I was trying to add a device to a provisioning profile. I added the device to my developer account, but had forgot to take the next step and add the device to my provisioning profile.
If your provisioning profile has changed, XCode (7.0) should automatically grab the updated provisioning profile once you visit Xcode -> Preferences -> Account -> View Details. There will be a download button you can click next to each updated provisioning profile.
As mentioned in one of the answers in Refresh devices in team provisioning profile managed by Xcode 7? , you can just delete and re-add the Apple ID in the Preferences->Accounts panel, which should regenerate the xcode-managed team provisioning profiles in the Developer Center. (Other answers suggest to right-click provisioning profiles, which doesn't work for me, or apply to older versions of XCode for which the answers no longer apply.)
Add your new device to provisioning profile.
Sometimes XCode 7+ does not automatically refresh provisioning profile. I removed apple id from Xcode -> Preferences -> Account and then added again. There was download button instead of newly updated profile. Click download. Close XCode and open again. It should work perfectly.

IOS: Code signing error Xcode 6.3.1 [duplicate]

I've build a new application which is going to support IOS 7. I got the new XCode 5 GM and tried to sign my apps using my fresh provisioning profile and distribution certificate, but i'm having trouble with distribution. I constantly get the following error:
"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:
'[XXXX.com.sample.company ]' for the key 'keychain-access-groups".
Also the same error for a key value called application-identifier.
Screenshot of the errror:
The solution lies in the new option in Xcode 5 which says provisioning profile. Just set the project target's provisioning profile to the right one and it'll work.
If you are like me and you think you tried EVERYTHING, archived your project over ten times, banged your head on the keyboard and still get this error. Please do yourself a favor and simply Restart XCode, it worked for me. Sometime Apple... I hate you.
I went through many of the steps above but what finally worked for me was refreshing my profiles in Xcode. Not sure why it was necessary since my app's distribution profile was showing up in the list already. Here are the steps:
Xcode Preferences
Accounts tab
Select your Apple ID
Hit the View Details button in the Apple ID detail panel
Hit the Refresh button in the lower left corner
In my case, i activated the same capabilities in Xcode that in Application services in developer.apple.com. Thats works for me
In my case (sorry) I switched "Team" to "None" in -> General -> Identity
In another case I needed to switch this identity from "None" to the developer account managing the identities and profiles.
Xcode sometimes messes up greatly with code signing, it seems. Or, we mere mortals simply aren't clever enough to understand what it is doing, of course. Don't give up, we're all going through some code signing torture at times!
In my case, I had to set correct Provision Profile for Release, and then had to restart Xcode. Before restarting, it had same provision profile, and didn't work. So, sometimes a restart can do miracles. Maybe this helps somebody.
If someone uses a GameCenter then check this section in your target. I worked with some old project and there were 2 errors (but everything worked fine). Disabling and enabling it back solved this problem.
Most likely this action adds Game Center entitlement to App ID and and handle it itself.
1.Go to project folder, delete *.entitlements files.
2.Then go yo in xcode project target -> build settings -> code signing entitlements - delete values
3.Clean
4.Run
Ah, this glorious error. For me whenever I see this error I check the following things:
1. Allow XCode to access your provisioning profile info all the time - If XCode keeps asking when you start it up to have access to your computer's private files so that it can get provisioning profile information with the options to allow access always, not now, or just one time - set it to ALWAYS ALLOW access
2. If you have any old entitlement files kicking around your project get rid of them and any sign of them - if you see a .entitlements file in your project delete it (or at least remove the reference to it if you aren't sure you are ready to outright delete it), then make sure the 'Code Signing Entitlements' line under the 'Code Signing' section in Build Settings is empty
3. Check your Application Services online and match them up with your Services in XCode for the app - Go to the Apple Member Center and check the App ID for your app, click on the app to see its 'Application Services' and see what you have checked, then go to XCode and check your 'Capabilities' section to make sure the two have the same list of Apple services on both
4. Make sure you assign a valid Provisioning Profile to your app before validating - double check your provisioning profile for your app in the Apple Member Center, make sure it isn't expired, has the right App ID with the correct bundle id and distribution. Download and click on the new provisioning profile to make sure XCode has it, or go to XCode > Preferences > Accounts > click on your account and 'View Details' then click the bottom corner button to Sync all the profiles to XCode. You should have the profile available to select now in the 'Code Signing' section. Once you have the correct provisioning profile then you can set the 'Code Signing Identity' lines to the correct option for that provisioning profile.
Note - if doing a distribution certificate it can help to set all the 'Code Signing Identity' lines to the identity you use for distribution including the debug lines
5. IF ALL ELSE FAILS - Clean your project and Restart XCode and some Apple magic may just work fine the next time you open your project and try to Validate
If you're building an old 3.1.5 project, Xcode 5 has some bugs which unfortunately makes Benjamin's answer impossible, as there are no Provisioning profiles to pick from. After many a late hour of tormented reading of Xcode project files I came up with this solution that worked for me:
In the Utilities pane (to the right) in Xcode 5, under project Document, change from Xcode 3.1-compatible to Xcode 3.2 compatible.
Enter your organization name.
Close project.
Open your project file, e.g. open -a TextEdit path/to/name.xcodeproj/project.pbxproj
Remove the two Distribution clauses (isa=XCBuildConfiguration).
Remove the two accompanying lines in buildConfiguration (one in PBXNativeTarget and one in PBXProject XCConfigurationLists)
Now you're ready to re-open, archive and submit to App store - voilà! It works again!
How I think it works
I assume this works because Apple somewhere along the line decided to drop the need for any separate distribution config, which is a good thing. When I archive, Xcode automatically code signs for distribution. That's the way it should have been implemented in the first place, it's just a shame that Apple can't make auto-migration part of the IDE; instead they force us developers to spend man-decades to make this stuff work.
I have been struggling with this problem for more than a day now, trying all kinds of solutions suggested here and elsewhere on the internet. Nothing worked...
But, I finally managed to solve the problem!
The problem I had was with an old app that I haven't touched in over 3 years, and now I was about to release a long awaited update. Since the time I released the app, Apple has been updating how the certificates and App Id works. They have introduced the concept of Team Id which seems to be recommended to use.
In particular, the Apple's "Certificates, Identifiers & Profiles" site, has seen a lot of changes since then.
There I realized that the Provisioning Profile I was using for App Store Distribution were connected to the App Id ED8xxxxxxx.com.rostsolutions.* but looking at the App Id for the game I was about to submit I notice that the App Id was ATMxxxxxxx.com.rostsolutions.Swisch. So the App Id prefix did not match!
That seemed to be the root of the problem. So what I did was to create a new Provisioning Profile connected to the App Id ATMxxxxxxx.com.rostsolutions.Swisch instead. Using that Provisioning Profile I successfully submitted my app to App Store and now I just keep my fingers crossed that everything else works fine at Apple's side.
(I first tried to connect to new Provisioning profile to the wildcard Id ATMxxxxxxx.com.rostsolutions.* instead, but that didn't seem to work).
But what puzzles me is that when I look at the old App in iTunes Connects and goes to Binary Details, it says that the App Id is ED8xxxxxxx.com.rostsolutions.Swisch. So why is the "Certificates, Identifiers & Profiles" page listing the App Id as ATMxxxxxxx.com.rostsolutions.Swisch?
My problem was solved by removing my Apple ID from Preferences->Accounts and then adding it back again. Then all my provisioning profile files showed up on the View Details utility panel. I was mistakenly choosing "Mac Team Provisioning Profile:*" instead of the actual distribution provisioning profile for the project thinking that it was a generic selection. Provisioning files must be specific to the project. Oh, and BTW, make sure your provisioning profile has the correct entitlements (for example, Maps). I managed to release an app with OSX Maps without the entitlement and Apple approved it -- but no Maps showed up on the production version!
In my case, I had the same problem, my solution was to change the 'Release Provisioning Profile' in the Build Settings before doing Archive. I do this twice, once for App Store distribution, and another one for Ad Hoc distribution. I also add a comment on my archives. My conclusion is that there is something broken about the "archive re-signature".
There is a very good tutorial for solving that problem on this website.
It says that this problem can occur when your Projects Bundle Identifier is different to the one you entered on the iTunes Connect Website.
I think xcode 5 uses "release" instead of "distribution" that you may created yourself.
If all above didn't work (in my case after couple of days no luck trying everything) I have only one Mac application. BE CAREFULL WITH REVOKE!
1) Revoke by hand all "Mac App Distribution" & "Mac Installer Distribution"
2) Clean relevant certificates and open-keys in Keychain (Warning: export before delete)
3) Restart Xcode
4) Go to (in Safari) developer.apple.com -> certificates etc.
5) Create CertificateSigningRequest.certSigningRequest in Keychain->Certificate assistant
6) Create by hand on developer.apple.com both "Mac App Distribution" & "Mac Installer Distribution" with your *.certSigningRequest
7) Provisioning Profiles -> Distribution -> create/fix custom provision for AppStore (I'm specially named it as "Mac provision profile for AppStore"
8) Xcode -> Settings -> Account -> Your account -> Refresh
9) Xcode Clean -> Archive -> Validate
I have been struggling with similar problem (I was building for Ad-Hoc distribution). Only thing that has changed since last successful deploy, was adding two devices to provisioning profile.
After double- and triple- checking all build settings, I regenerated provisioning profile (without changing anything), re-downloaded and it worked fine.
So note to self: if there is no logic explanation, you can always try good old IT voodoo.
I also recommend iPhone Configuration Utility, which despite its name, is useful for checking what provisioning profiles you have on computer.
ERROR ITMS-9000: “This bundle is invalid. New apps and app updates submitted to the App Store must be built with public (GM) versions of XCode 5.1.1 or higher and iOS 7 SDK. Do not submit apps built with beta software.
If multiple developers are using the same member center account. One of them can't use a certificate created by others cause they used a certificate request created using their computers.
You need to use a certificate created by you (certificate request
created using your computer).
Alternative, told them to send you the Developer Profile. not sure of the name. to use a certificate created on another computer.
Code signing Entitlements occur because of your resource does not contain Entitlements file in resources,Just go to build setting and search code signing Entitlements delete entry for debug and release, build project again you will see there is no error. Cheers
I had the same problem, but nothing written here worked for me. However, I found a simple way that worked for me. Here's how to do it:
1) In your Project and your Target(s) build settings, choose "None" for all Provisioning profiles, and choose "Don't Code Sign" for all Code Signing Identities.
2) Now, choose your Target and go to build settings. In Code Signing Identity Release setting, choose "iOS Distribution" for "Any iOS SDK". And then, in Provisioning Profile Release setting, choose your distribution profile for "Any iOS SDK". After that your Code Signing Identity Release setting should automatically change to "iPhone Distribution".
3) Archive your build and validate. Now it should work fine. That's it!

An "invalid value" being provided for the parameter 'appIdName'?

I've been working on this app for several weeks, and everything's been great. I've been building and archiving and having a ball. All certificates and profiles and IDs have (seemingly) been in order and working well.
Then a few days ago, seemingly without any change that I can discern, Xcode said I didn't have any "provisioning profiles with a valid signing identity", and when I told it to "fix issue" I would get this error every time:
An invalid value 'Xcode: Wildcard AppID' was provided for the parameter 'appIdName'.
I've found a few questions that seem similar, but I can't find anything at all about this error specifically. Google, SO, nothing. I do have an AppID in the Developer Portal called "Xcode: Wildcard AppID" with an ID of *, and I've tried making another (as suggested in those other questions) but it hasn't helped.
Can anyone explain what this error means, and how I might go about fixing it? And for bonus points, what caused it so I can avoid this in the future?
I was able to get it working. I tried what Cirec Beback suggested, but here are more specific instructions:
Go to the Apple Developer Member Center, and sign in
Go to your "Certificates, Identifiers & Profiles"
Under "iOS Apps", select "Provisioning Profiles"
Near the top, in the "iOS Provisioning Profiles" header, hit the + button
Select "iOS App Development" and hit Continue
From the dropdown, select your "Xcode: Wildcard AppID" option and hit Continue
Select your user, or everybody, and hit Continue
Select whatever devices you want, I did all of them, and hit Continue
Give the Provisioning Profile a name, and hit Continue
The next screen will have instructions, but basically it will have a download link, so download the provisioning profile, and open it. Then you should be all good!
This may happen if you do not have an updated provisioning profile.
To fix..
Go to Xcode preferences.
From the top tab select Accounts.
Click View Details button(Bottom right).
A screen will open showing all the provisioning profiles. Click the
refresh button (Bottom left) and wait the refresh to finish.
Check your bundle identifier(General tab) and your provisioning
profile(Build Settings).
Clean build.
Another explanation for this error message is that your app bundle id contains an unsupported character such as an underscore.
I just had this today (which is why I'm here). In my case, it was just because the build settings had the wrong Code Signing Identity and Provisioning Profile. It had nothing to do with the XCode wildcard.
The issue for me was that I had an existing app, with an existing appID, that did not have App Groups enabled. This was warned not just in capabilities, but also when I selected my main app target and viewed the Identity section.
I went to developer.apple.com > Certificates, Identifiers & Profiles > Identifiers
In Identifiers > App IDs: Selected my App ID
Clicked Edit, and enabled App Group under application services
Then went back to XCode and refreshed the Target General. Then back to Capabilities and let it "fix" it.
Wanted to let you know I had the same issue today. Might be an Apple issue. Anyway, I was able to go out to developer.apple.com and create the provisioning profile the old fashion way. xCode picked it up and was able to use it without any further issue.
I was having about the same issue on an Ionic project:
An invalid value '-widget-id--com.myapp.main--version--0.1.19--xmlns--http---www.w3.org-ns-widgets--xmlns-android--http---schemas.android.com-apk-res-android--xmlns-cdv--http---cordova.apache.org-ns-1.0---com.myapp.main' was provided for the parameter 'appIdentifierString'.
An invalid value 'XC -widget-id--com myapp main--version--0 1 19--xmlns--http---www w3 org-ns-widgets--xmlns-android--http---schemas android com-apk-res-android--xmlns-cdv--http---cordova apache org-ns-1 0---com myapp main' was provided for the parameter 'appIdName'.
After looking for awhile, I figured out that my platform/ios/MyApp.xcodeproj/project.pbxproj has it PRODUCT_BUNDLE_IDENTIFIER filled with
-widget-id--com.myapp.main--version--0.1.19--xmlns--http---www.w3.org-ns-widgets--xmlns-android--http---schemas.android.com-apk-res-android--xmlns-cdv--http---cordova.apache.org-ns-1.0---com.myapp.main
I have no idea on how it happened but putting com.myapp.main fixed it!

Can't install Distribution provisioning profile

I'd like to submit an app to the AppStore (my first app !).
I've already tested the application in my device (so I already have a development provisioning profile) but I'm not able to install a Distribution provisioning profile in Xcode.
I've followed the procedure (I don't know how many times) but when I try to add the provisioning profile through the Organizer I have following problems:
if I double click on the file nothing happens
if I click Add, the file is not selectable (grey)
if I drag and drop from Finder I see the following message: 1 profile
cannot be installed on "iPhone of Corrado". "iPhone of Corrado" is not included in this profile.
What does it means ?
If I go in the Development Center\Certificates, Identifiers & Profiles\Provisioning Profiles\Distribution and edit the profile, there is no devices and there is no way to add any (while in the Development provisioning profile I see all my devices).
What I'm doing wrong ?
Thanks, Corrado
I don't know which Xcode you are using, but supposing you are using Xcode-5, i suggest you use the automatic provisioning profile sync feature.
Just go to Xcode>Preferences and select the Accounts tab.
If you don't have any Apple IDs account signed just click on the '+' button on the bottom left and select 'Add Apple ID...', put the id and password that you use to log on the apple developer.
After that just click on the 'View Details...' button on the bottom right, and your signing identities and provisioning profiles should appear there. If they don't, just click on the bottom left refresh button.
I've just spent the last 12 hours trying to figure out why my OSX App wasn't code signing and the error was related to the provisioning profile containing 0 devices for my Mac. After following the advice above, much head scratching, deleting and re-creating certificates, the following link provides the correct approach for Distribution provisioning
https://developer.apple.com/library/ios/qa/qa1814/_index.html
Moving forward it seems that for Mac App Store Submission on OSX the correct code signing identity to use is Mac Developer and set the Provisioning Profile to Automatic.
You do need to restart Xcode during the Code Signing and Provisioning reset, but it does work.

"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