Xcode Signing certificate is invalid when build on ext device - ios

I'm trying to solve an issue with Xcode 8.3.3 that prevents me to test my Apps on my devices.
At the moment I'm using a free provisioning account for my tests.
I've worked many months without any problem, then I've upgraded to Sierra and Xcode 8.3.3.
Unfortunately I don't know exactly after what action/update the problem started, because I have not used Xcode for several months.
The issue: when I try to build my app to run on my iPhone, I get these errors in project page, under General > Signing view:
Automatic signing failed
Xcode failed to provision this target. Please file a bug report at http://bugreport.apple.com/ and include the Update Signing report from the Report navigator.
Signing certificate is invalid.
Signing certificate "iPhone Developer: edoxxx#me.com (xxxxxxx)", serial number "xxxxxxx", is not valid for code signing. It may have been revoked or expired.
The issue happens either on my main Mac account and also if I create a fresh new user account,
it happens also if I use another AppleID account for code signing.
but it doesn't happens if I boot the same machine into another macOS installation (using the same AppleID and same device). In this last case I'm able to build and run the app without any issue on my device.
Because of that behaviour, I think that is something related to some software crap in the first OS installation, and not related to my user's "data" nor my AppleID account.
I've tried everything I've found on internet to clean-up the Xcode installation, including total removal/reinstall plus Keychain cleanup. But nothing solved the problem.
I've found some related informations in this topic:
https://forums.developer.apple.com/thread/83611‌
but no real solution.
Hope that someone could help me :)
Bye,
Edoardo

Here's what worked for me:
Open "Keychain Access"
Find the private key called "iOS Developer"
Delete the private key
Try code signing again, it should work!

I had the same thing happen to me. I discovered my problem was that in my build settings I had set my Code Signing Identity
Debug to iOS Developer
and my
Release to iOS Distribution
Because they were different. One wasn't able to find a signing certificate. The signing certificate I had downloaded was and iOS Developer certificate so when I switched my Code Signing Identity for Release back to iOS Developer everything was fixed.

After further investigation, I've found the problem.
Looking at differences in keychain between my productive machine and the fresh OS installation, I've dicrovered that the "Apple Worldwide Developer Relations" CA was missing in my productive machine (no idea why...).
I've erased all my developer certificates, downloaded new certificates from https://www.apple.com/certificateauthority/.
After the code signing fix in Xcode, I was back able to build and run my app on my device.
Strange that Xcode does not handle this kind of errors correctly, but report a "generic" error about code signing.

Although I added the new, valid certificate to the keychain, it was not working. The solution for me was:
1. Restarting Mac OS (because deleting certificate was not working)
2. Deleting all invalid certificates
You don't have to do something further. The valid certificate is being automatically used for your deployment(/development) provisioning profile.

Related

"iPhone has denied the launch request." can not debug [duplicate]

Using Xcode beta 9 (v4), I'm trying to launch the app by clicking on the "play" button. I get a "build succeeded" but right before launching, a popup message appears in Xcode:
"iPhone has denied the launch request."
It used to work yesterday. It does work on the simulator. I've rebooted my computer, the iPhone, uninstall the app, cleaned the build. Running out of ideas.
It may be code sign issue. Make sure you're signing with developer, not distribution.
It happens using Xcode 9.x or newer.
I tracked this problem down to the "debug executable" checkbox in the product scheme (product->scheme->edit scheme->info->debug executable checkbox). I unchecked that and this stopped happening (as well as a couple other weird issues - no output in console being one).
I have a workaround:
If you change the scheme to 'Ask on Launch' it works.
In Xcode top bar
Product > Scheme > Edit Scheme > 'Info' tab > Executable: "Ask on Launch"
http://upload-images.jianshu.io/upload_images/663014-d5d182e310052664.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240
It's slightly annoying but it works.
This issue can be resolved by unchecking Debug Executable in Edit Scheme.
After getting "denied launch request" error, do this:
Edit Scheme -> Info -> Executable -> Ask on Launch
This worked for me with adhoc profile.
The problem for me was that I was using a free developer account (simply signed in with my Apple ID). When looking at the device logs I found (bold added)
(RequestDenied); reason: "The request was denied by service delegate
(SBMainWorkspace) for reason: Security ("Unable to launch
{com.my.bundleID} because it has an invalid code signature, inadequate
entitlements or its profile has not been explicitly trusted by the
user")"
That made me realize that I needed to go into Settings -> General -> Device Management -> {My Apple ID} -> Trust
After that, everything worked as expected.
In previous versions of iOS I would encounter a dialog on my device that would tell me that this was the problem. Maybe Apple took it out for iOS 11. 🤔
Simple restarting of the iPhone helped me out.
For me issue was due to code signing the app with Ad hoc profile.
After changing the code signing to developer profile,from xcode settings general tab the above issue got resolved.
I got this issue recently and I found the solution for this crazy issue. This are the Scheme Issue to fix this issue follow following steps.
Click Edit Scheme top Navigator Tab.
Click Info on Run menu.
On Executable dropdown select "Ask on Launch" option -> Then Close and run the build once.
This solved my problem when I got this issue.
Apple Reference
Got this with Xcode 9.0 while deploying to a non-simulated iPhone 6s with iOS 10.3.
I had force-quit the app right before this arose. Otherwise, nothing had changed; all the developer signing credentials was still trusted, and the app was still marked Verified in the iPhone's Settings.
The trick that fixed it was turning the iPhone off and then turning it back on again.
Looking at my logs, it appears applicationWillTerminate was triggered a while before this happened; the instance of the app that I thought I force-quit must have been some zombie process?
The problem is that xcode 'times out' after certain seconds. The fix is to edit the scheme and ask xcode to 'wait' until the executable is launched.
In Edit Scheme, check 'Wait for executable to be launched' instead of 'Automatically'
I attentively read all answers but they don't help me. My solution:
Go to Xcode preferences, select accounts (⌘ + ,)
Select your Apple ID, choose team and click Manage Certificates
In Pop up menu in bottom left corner click + button and select iOS Development, then click done and close popup
Try to relaunch application, now it's should fine.
It may cause with switched a wrong branch with Git, Make sure the branch you switch not too old(since it may cause code sign issue), And on the right branch if this still bothering, select the development Provisioning Profile under Signing(Debug) if u r not Automatically manage siging.
Just tick "Automatically manage signing" in General -> Signing properties of the Target. It will create Development provisioning profile for you and running on the device will work.
These simple steps helped me.
Remove your connected iPhone, iPad from the mac.
Restart your device.
Select "Automatically manage signing" in Xcode settings.
Reconnect your iPhone, iPad.
I know there are lots of answers in this thread. I've tried every one of them but none worked for me.
TLDR:
Here is the solution:
Update to xcode 11.4.1 or newer
Going through all the certificates in Keychain access I found out that all of my developer certificates has a invalid status. And, I believe that, this is the root cause of this issue. I've tried the solution here saying delete Apple Worldwide Developer Relations Intermediate Certificate and everything. But, It didn't work.
Then I came across this link. Apparently, the Apple Worldwide Developer Relations Intermediate certificate (AWDRI) is set to expire in 2023 and developer certificates or any other certificates issued after January 28, 2021 won't be using that particular AWDRI certificate. Instead of that they use a renewed certificate which is set to expire in 2030. And here comes the problem, The new renewed certificate only works in xcode versions of 11.4.1 or newer. And, I have an older version of xcode.
When I updated my xcode to latest version - 12.4 (I had to go through making space on my machine, updating macos and all) The problem went away. All my developer certificates on Keychain access are now showing valid. And, I could see two AWDRI certificates on my Keychain access one expiring on 2023 and another one in 2030.
Description from the link I shared:
The current Apple Worldwide Developer Relations Certification Intermediate Certificate (intermediate certificate) is set to expire on February 7, 2023. The renewed certificate will be used to sign new software signing certificates issued after January 28, 2021 for the Apple Developer Programs. Remaining service certificates will be updated in the future and this page will be updated to reflect additional certificate changes.
And more...
This requirement also impacts all software signing certificates generated after January 28, 2021, by developers with Personal accounts in Xcode, as well as members of the Apple Developer Program, Apple Developer Enterprise Program, and iOS University Developer Program.
The new Apple Worldwide Developer Relations Intermediate Certificate is downloaded automatically by Xcode 11.4.1 or later and is available for download on the Certificate Authority page. Confirm that the correct intermediate certificate is installed by verifying that the expiration date is set to 2030.
Also they are mentioning about an issue with older versions:
Xcode 11.4.0 and earlier may not be able to sign software using signing certificates issued by the new Apple Worldwide Developer Relations Certification Intermediate Certificate. If you’re unable to upgrade to a supporting version of macOS or Xcode on your build machine, you can build and archive your app using an earlier Xcode client and sign it for distribution using the latest release. Alternatively, you can utilize the codesign tool to sign your software using the command line.
I face this issue on Xcode 9.1
Scenario: I checked "Connect via Network" option for device. And trying to run app to this device with USB cable attached.
Fix: Simply remove USB cable and run.
I'have tried all the answers nothing worked for me,
The problem is coming form Xcode itself and has nothing to do with profiles and certificate :
Product > Scheme > Edit Scheme
In Run (Section) / info (tab) [select] the Release instead of debug as Build Configuration as follow :
It's a regression since Xcode 10.1
Config : Xcode Version 10.1 (10B61)
Iphone X / IOS 12.1.4
I had the same issue . Its a bug in Xcode 9.1. There is a trick to make it work for now. Lock your phone. Run the code. Xcode will ask to unlock the iPhone.
I just cleared the profiles with the Apple Configurator, restarted the iDevice and worked again as usual.
It's an intermittent bug in Xcode - I just stopped and started all my devices and it magically worked (after messing about for 1/2 hour)
I had upgraded MacOS overnight to 10.13.04 which obviously upset something!
Xcode 9.3, iOS 11.3 watchOS 4.3
Let me tell you a workaround which solves my problem:
Step 1: Windows > Devices and simulator.
Step 2: Unpair device.
Step 3: Reconnect device and trust.
Step 4: Run the application. BINGO.
For me this issue was related to a Manually installed Enterprise Certificate and having to use it for both development and release schemes. I had to trust the certificate on the device before it would allow the app to be launched, but it would never launch as I kept getting that denied message. Eventually, editing the scheme and setting it to wait for the app to be attached before debugging did the trick.
Open the App Groups in Capabilities, wait App... effective,then close the App Groups, it worked:
After seeing all the solutions given across web, i finally found one and here are those:
Error occurs because of it makes Runner confused about what profile to use.
You will most often get this error, when you have added new account in profile in Xcode > Targets > Signing.
You can remove this error by just using before one Profile.
There is no need to create New Users.
or you can sign in with account you are using in Profile in your iPhone (i did this!)
Happy Days :)
In case this problem occurred for you a couple of days before today, 2019-Mar-20, it is very likely related to the fact that faulty code signing certificates were issued. In that case you should be able to resolve it by just recreating the code signing certificate. This SO question already has an answer that explains you how to do so.
I'm not sure whether it's a fix, or just another workaround, but uninstalling the application from my device helped. I'm still not sure what caused it, but #MrRogers answer helped me figure it out.
For me the issue came-up because, I was using the Distribution Provisioning Profile to debug.
We cannot debug with Distribution Provisioning Profile, changing it to Development Provisioning Profile fixed the issue.
Steps: (Xcode 11.2.1)
Select Project, Under TARGETS, select the correct target.
Switch to Signing & Capabilities
Under Singing section, change the Provisioning Profile to Development profile or you can just check Automatically manage signing
None of the other answered worked -
Xcode 11+
Click Edit Scheme on the top Navigator Tab.
Launch option choose Wait for executable to be launched
You will have to run the application on your device manually but that will keep the debugger attached as for some of the other solutions debugger get detached.
Today,I also meet this question.This is my way to solve.
Xcode 9.0,iPhone 6s,Automatically manage signing with my account.
When I select "iPhone 6s",I found that there is an logo after the iPhone 6s
It's the new function of Xcode 9.0 that can run an app on the iPhone without a string connect computer(iPhone and Mac must connect the same Network).
So, I try to change this kind of connect way.
Open "Devices and Simulators"-> unselect "Connect via network"
And then, I clean, rebuild and run my project.It works!
I will be happy if this method can help you.

Xcode validation failure

Validation of an archive for uploading to the store is failing in the Xcode Organizer with this message: "Failed to locate or generate matching signing assets: Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues. Permissions failure - Your account does not have permission to create profiles."
This problem has been reported by several other people on StackOverflow and Apple Development Forums, with no resolution. Here I'll explain some things I've tried with the hopes that maybe someone can suggest a solution. This is a really important problem because it's preventing release of an app.
Does anyone know how to fix this? Does anyone know what the "permission to create profiles" is referring to? From my understanding, the Organizer should just be signing the app with an existing Provisioning Profile, not creating any new ones.
Background information: I have admin privileges in a company team and am able to build the project fine. My development certificate works ok for installing to a phone. There are no expired certificates in my Keychain and the certificates in the key chain look ok. I have rebuilt the Distribution certificate and downloaded it to my Mac successfully.
The problem occurs whether I select manual or automatic provisioning in Project Settings (though this shouldn’t affect archive validation anyway). I have the original distribution Certificate on my machine from importing a .p12 file from the original developers. I’ve tried rebooting my Mac, restarting Xcode.
Issues I can think of looking at next: (1) I am using a wildcard in the app bundle name in the Distribution Provisioning Profile. Is there any problem with this? The wildcard seems to match the app bundle ID in the build. The app has previously been released without an explicit app bundle name in the provisioning profile. (2) The distribution provisioning profile has no services enabled. The app Project Settings include one service: Remote Services under Background Modes. Is there a problem because of this mismatch? (3) Should I try using Application Loader instead of the Xcode Organizer?
The problem, it turns out, was a bad Distribution Certificate. The team I was working for turned out to have two Apple Developer accounts with the same name, but one was an Enterprise account and the other was not. I had been given the Distribution Cert for the Enterprise account. Once I deleted all my relevant certificates from my keychain and XCode Preferences/Accounts and read in the .p12 file for the correct Distribution Cert, everything worked.

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.

TestFlight iOS App get-task-allow Issue

I have an app in testflight for ios called MapItTrackIt. Everything has been working great.
I just updated to xcode 5.1. I built the app exactly the same way I always have. Same profile and ad-hoc cert.
This time when I try to upload my IPA file I get the 'Invalid Profile: developer build entitlements must have get-task-allow set to true.' error.
I didn't change anything at all with provisioning or what not. I just added some more functionality to the app and rev'ed the version.
What the heck do I do now? How do I fix this? My boss wants this deployed right now and I can't.
Same exact issue for about 4 hours today - restarting Xcode seems to be the fix as depressing as that is.
I had this and solved it.
Xcode was using a different provisioning profile from the one I had expected it to - it was signing the build with a distribution certificate, but had created a development provisioning profile.
It turned out that the distribution certificate was somehow invalid. I discovered this by setting the provisioning profile explicitly in the project, which then prompted xcode to give me an error to tell me there were problems.
A good place to start solving these issues is to look in the build log, at the codesign step - there will be a line line:
Using code signing identity "iPhone Distribution: XXXXXX" and provisioning profile "YYYYYY" (<..guid...>)
Check this line says the certificate and profile you expect, and that the signing identity and profile are both distribution ones.
For me the problem was that I had a custom .framework bundled with the app that was not code signed. Apparently this unsigned framework caused the problem.
When I code signed the framework with a distribution certificate the app uploaded without problems.
I fixed this bug by changing my Code Signing Identity - Release part to Distribution certificate
It looks like there are several different issues that can cause this. Mine was similar to JosephH's, but not the same.
For me there was another provisioning profile that was valid, but from a different user. I have several apple accounts that I am a member of for development.
My build was using a different profile from another user account when it went to sign. This was even though I had told it which one to use in the settings.
I solved this by having to delete that other provisioning profile whenever I wanted to build this app for testflight. The provisioning profile would always come back if I did an update from the dev site for that other user account.
The final solution was that I happened to get a new mac for development and didn't install that other user account's profiles into this mac yet. Now everything builds fine without doing anything.
I tried many different ways. None of them works for me.
I thought maybe it's a problem of testflight.
So I used crashlytics to distribute my adhoc build. I had no problems to upload it.
Then I tried to use Organizer to validate this archive to get more information, I got an
error. I was told this archive contains unsupported i386 and x86_64 architectures.It turned out that I used a framework which contains i386 and x86_64 architectures. Then I recreated a new framework which contains device only architectures. It works like a charm.
Same exact issue here with the new Xcode 6.3 beta, solved by deleting the Project.entitlements (along with the Code Signing Entitlements entry on the Build Settings of the target)
Solved. I was trying to update a label in the launch screen to show app name, version and build through a custom ViewController. This proved impossible to too complex so I deleted the View Controller. BUT I left the outlets in the Launch Screen Storyboard. I deleted these (Last icon in Utilities tab, a right arrow in circle) and all is love, peace and joy.

iOS - cannot validate my app "No identities are available for signing" [duplicate]

I have an error "No identities are available for signing" when try to validate my app in Xcode 5. I tried all: Recreate certificates and provisioning profiles, all methods which have been described on this site and another resources; I'm confused, because when I try to distribute my app as Ad-hoc, it successfully create and install on test device an IPA file. But when I try validate my app or submit to AppStore, all the time I have an error. Maybe someone can help me with this issue.
All you need to do is:
go to Certificates, Identifiers & Profiles in the Developer Center
create a new provisioning profile in "Provisioning Profiles" / "Distribution"
download the profile and open it
restart Xcode
Please make sure you are using distribution provisioning profiles, rather than Development.
And the code sign setting in Xcode is compatible with the distribution provisioning profiles.
The validation process does not work with Ad-hoc profiles. Need to create a Distribution provisioning profile. It is not specified in the instructions for beta testing. I agonized all day until realized.
Use the Application Loader (Xcode -> Open Developer Tool -> Application Loader).
Also - this answer/question may also be helpful for you:
https://stackoverflow.com/a/18914073/730172
Restarting Xcode solved the problem for me! Restart and/or clean solves 99% of all issues...
#CainaSouza 's comment above worked for me. I didn't even have to create any new provisioning profiles.
I just had to go to Xcode > Preferences > Accounts > (Apple ID) > View Details and hit the refresh button. After a minute or two it was done and had loaded my provisioning profiles. I didn't even have to select it in my project options, it had already selected my most recently generated one.
Clean your Product Build Folder (with Alt button)
Restart Xcode
It solved my same issue
I had a similar issue. Found out that the bundle identifier did not match the app id that was on itunes connect - it was capitalized differently. Fixed the issue by making the identifiers match.
Yes the appID and bundle identifier must match. Remember it is CASE-SENSITIVE. That was the problem for me.
I updated to Maverick and Xcode 5 and had the same issue even though I had everything ok in Profiles. I created a new Distribution profile (identical to the old one), added it by refreshing profiles and the issue was solved without rebuilding.
Apple Decided to "Magically Dissapear" my distribution provisioning profile from their site after upgrading to a newer Xcode, giving me this problem too.
Solution is obvious only once I had discovered this fact!
-Create new Distribution Provisioning Profile
-Download & install it / Refresh Xcode preferences under account details
I fixed this issue by delete the old development/distribute profiles and create new one with new names.
I had a mismatch between the Bundle Identifier within Xcode and the App ID on Developer.Apple.Com (Certificates, Identifiers & Profiles). This StackOverflow post was a great help to me. For a little extra info check out this blog post. The official documentation for the touch command can be found here. I had quit Xcode before doing the below. Upon completion of the details below and reopening Xcode my issue was resolved.
Use a text editor to update the bundle identifier to match the App ID, the Info.plist file is located:
ProjectName > ProjectName > ProjectName > ProjectName-Info.plist
Your looking for the following lines:
<key>CFBundleIdentifier</key>
<string>MyCompany.${PRODUCT_NAME:rfc1034identifier}</string>
Update the value to match you App ID, eg:
<string>com.MyCompany</string>
Use the terminal to issue the touch command, ensure your within the above listed directory:
touch ProjectName-Info.plist
If you are using Xcode 5.1 or above (which you would be now), this helped me: Code signing broken on Xcode 5.1 + iOS 7.1
The key is to delete the old provisioning profile on your mac and create a new one (with a different name?) from Apple web site and download it. Looks like Xcode 5.1 corrupts the existing provisioning profile and it does not help even if you re-download it again.
My solution was to go into the dev center, find the distribution provisioning profile, and it had expired. So i tapped edit on it, and renewed it, downloaded it, installed it, chose the profile in the build settings, and it worked.
HTH someone.
Of all the development issues I've faced over my 20+ years as a software developer, none have wasted so much time as the code-signing/provisioning profile rubbish in Xcode.
This week, I have wasted 8+ hours trying to build an Ad-hoc release of our iPhone app. In the past, it just worked, I could Archive, stick a download button on our in-house webpage, and users could just install our app from this page.
But, this week, I was facing the same "No identities are available" issue, described here.
EVENTUALLY, here's what solved the issue for me:
When I logged into the hopeless Apple Developers website, it showed that our company had 2 "iOS Distribution" certificates. They were valid, their expiry dates are months away, and in the Keychain Access application, the certificates were installed and valid... no problems here.
But what fixed my issue was to delete these two certificates, recreate a new one, then recreate my "In house" Provisioning Profile (as the original one was now showing as being invalid, as it used the old "iOS Distribution" certificate).
I also went into the "Keychain Access" application on my MacBook, and deleted all "iOS Distribution" keychains.
Then, I downloaded the new certificates & provisioning profiles, now, finally, Xcode would report that there was an identity which I could code-sign with.
To the Xcode development team:
Please. Get this fixed.
If a developer like myself, is up against a wall, unable to get a valid Provisioning Profile, which will result in a downloadable app, which will fail each time on "The app couldn't be downloaded at this time" message.. DON'T allow the Archive function to be used.
Instead, TELL the user what the problem is. HELP them resolve it, rather than going through the motions, and happily allowing them to create Archives which will never be useable.
And if an Ad-Hoc install is invalid, please put something in the Log to explain what's gone wrong, and make this accessible from Xcode. Currently your "The app can't be downloaded at this time" message is both useless and misleading.
One last thing (if this helps):
Our company accidentally let its Developer Enterprise Program license expire last month. We did then renew, everything was seemingly okay again, but perhaps, behind the scenes, this messed up our "iOS Distribution" certificate ? And perhaps, not. From the Apple website's point of view, everything was fine.
My issue was that I had none.myApp in my Bundle Identifier whereas in the AppID, I had com.myApp.
This drove me crazy for hours.
I ran into this issue today and it seems to be related to the face that the profile started with a number. I deleted the profile and recreated it exactly the same way (after a lot of other troubleshooting steps found on SO) EXCEPT this time I started with a word instead of a number. Coincidence? Not sure but worth trying.
Had this yesterday and could not figure it out, no matter what I did! To solve the problem, I went to both the Project and the Target in Xcode, and under code signing, chose
Code signing identity: Don't code sign
Provisioning profile: None
Build, and then Product > Archive, and now Organizer chose the correct code signing identities and profiles to allow it to get to the Validation step. Woohoo!
It happen to me after update Xcode.
I fixed doing the follow
change the sign in to "no sign"
restart Xcode
set it to the correct sign
re-archive the build
I hope it helps
Apple Documentation
"If Xcode doesn’t find signing identities, a dialog stating “No identities are available for signing” appears. Verify that you have a distribution certificate and an ad hoc provisioning profile before continuing.
If your ad hoc provisioning profile doesn’t appear in the Provisioning Profile pop-up menu when you create the iOS App Store Package, refresh the profiles in Xcode, as described in “Refreshing Provisioning Profiles in Xcode.”"
In my case, the adhoc provisioning that I wanted to set was not selectable in Code Signing in Build Settings. Though, I created and downloaded the adhoc provisioning from developer store. The answers mentioned here didn't work for me. Fix Issue button in General tab fixed the issue by downloading the required adhoc provisioning file by itself.
Creating a new certificate, Profile in Apple development center did not work for me! I tried editing a profile/certificates and download again and double click to install in KeyChain, but still did not work. I restarted XCode (Version 7 and Mac on El Capitan), restarted Mac but still did not work!
What worked for me is:
XCode -> Preferences -> Accounts - Then I deleted the Apple ID.
Shutdown my Mac, and restarted it.
Started my XCode, added the Apple ID, went to view details in Apple ID's and downloaded the Provisional Profile again and only then it started working!
Restarting solved my problem. I have a new mac and tried downloading the profiles, which should've transferred anyways. restarting solved it.

Resources