TestFlight iOS App get-task-allow Issue - ios

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.

Related

Xcode 7: App installation failed: A valid provisioning profile for this executable was not found

I have already searched and almost implemented max solution but it's not installing any app even though if I am creating just sample single view app.
App installation failed
A valid provisioning profile for this executable was not found.
============== update ====================
I fixed this issue today.
First, go to ~/Library/MobileDevice/Provisioning Profiles.
Make sure Xcode isn't running.
Then, delete all provisioning files (like xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.mobileprovision).
Start Xcode.
You will see something like "Fix this issue" in your Target's General tab.
Click it.
Xcode will now load new provisioning profile.
That's it.
----------- OLD Answer -------------
I have same problem now.
I've checked my provisioning profile using https://github.com/chockenberry/Provisioning/releases.
In my case, my provisioning profile had the wrong UDIDs but right machine count.
I've registered machines, and Apple Developer Center listed right UDIDs for those machines.
However, whenever I downloaded new provisioning profile, it contained wrong UDIDs.
I think Apple's system is outputting wrong provisioning profile.
I called Apple support for this issue today, but Apple only emailed me with their knowledge base links(forums,documents,etc).
Possibly you are using App Store distribution provisioning profile. Use development or Ad-Hoc provisioning profile.
For Xcode 8 / Swift 3.0
In my case, for my app target and my extension in "General" I check "Automatically manage signing" and it work
I was having this issue because the date/time on my iPhone was not the same as that on my Mac running Xcode ( i changed the date on my iPhone while testing some app).
On my iPhone, i went to Settings > General > Date & Time > Set Automatically
This fixed it
Make sure you have added device UDID in your provisioning profile.
Go to provisioning portal.
Edit provisioning profile.
Make sure device is checked.
Done, download
Use new Profile
Another possible reason: Device date is set to later than the expiry of you provisioning profile.This is very weird but, it could happen.
In my case it was that the running option in the building scheme was set to Release so it was trying to sign it using the appstore provisional profile not the development or the adhoc one. I had to set it to Debug to fix this!
I could run on Simulator just fine, but trying to install the App on device was throwing this exact error.
I had a test target in addition to the main target. The test target had signing set to a different team and profile. Setting the unit test target to match the main target settings for signing solved my issue.
Didn't notice it had been automatically changed over to a different team, was caused by being added to a new Enterprise team.
In my case, I went to the Apple Developer website and added the phone to the Provisioning Profile.
Then I re-downloaded the Provisioning Profile and worked =)
In my case was The build system. I had to change the default build system in "File > Project / Workspace Settings" and change it to the Legacy Build system.
For me, it's because the project I was trying to build is someone else's. The bundle identifier does not match with my team's provisioning profile.
Change bundle identifier to something else help.
In my case, my certificate is overdue..
The following worked for me:
Install the app using Personal provision profile (re-install after going into your phone settings and trusting the profile)
Delete the app from ypur phone
Switch back to registered developer profile and try again
In my case iOS 14.4, rebooting the iPhone solved it.

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!

Xcode6 error: "No matching provisioning profiles found for application"

I'm trying to submit my iOS app in Xcode6. When I click Submit or Validate in the organizer, a window pops up that says:
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:
No matching provisioning profiles found for "Applications/MyApp.app”
None of the valid provisioning profiles allowed the specified
entitlements: application-identifier, beta-reports-active,
keychain-access-groups.
I have created a distribution provisioning profile for this app in the member center and it appears in Xcode.
I've looked around and have not found anything online that has told me how to fix this. Can anyone help? Thanks.
Andy
There's a couple possibilities for your issue, but the main causes is what I got from experience as well as other SO answers.
Your certificate or profile is outdated, in which case you have to go and regenerate your profiles again. I had this problem before, but Apple has described (partially) this issue.
You haven't set your profile in the Build Settings/Code Signing area, along with the appropriate certificates. Verify your Team in General/Identity and ensure that your profile is properly set.
From Xcode 5: Code signing entitlement errors (The image is a bit outdated, but its the same as Xcode 6):
You are using a beta version of Xcode.
#jaytrixz states: "I just removed Entitlements.plist in Code Signing Entitlements under Build Settings" which could possibly work. Be sure that your provisioning profiles are configured as well.
As jaytrixz, wrote in the comments...
"I just removed Entitlements.plist in Code Signing Entitlements under Build Settings "
I did the same and it worked after an hour of trying other things!
There are a lot of answers here, some have worked for me in the past, but not this time. I'd even created a new provisioning profile but that still did not help.
Based on the "None of the valid provisioning profiles allowed the specified entitlements" part of the error I tried the following on a hunch and it worked for me:
1. add and remove a particular Capability
Go to Targets > Capabilities, and turn one on and then off.
I doubt it matters which you choose, I added "Push Notifications" (which I don't need for my app), once it was "ON", I changed it back to "OFF"
2. Archive again
I am now successfully uploading my app to the store.
Another solution, that fixed this symptom for me, can be found at: Xcode Watchkit: None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups
Briefly: clear ~/Library/MobileDevice/Provisioning Profiles
If you are sure you have valid certificate and provisioning profile, then you may need to do the following:
I would suggest people to refresh the link between xCode and developer account by doing the following:
Go to Xcode -> Preferences -> Account -> View details -> (Refresh icon)
Otherwise you may not be able to see the provisioning profile as an option in the build settings (You may only see old profiles)
A lot of times it gives me connection error, you may need to retry.
Do this refresh every time you edit the provisioning profile or certificate online on apple developer member center
If certificates and build setting are all good, and you are part of multiple teams, make sure to select the proper team for the app.
Clean and archive again.
I had another cause for this problem.
I had 3 different Configurations (Debug, AdHoc, AppStore). I accidentally had the AdHoc Configuration selected in the Archive Scheme setting and tried to upload the generated archive to the AppStore.
So setting the Archive configuration to AppStore solved the problem for me.
It's the year 2017, and the provisions are still not just working. I had to put them on manual mode because automatic didn't worked after struggling half an hour. I have no idea what are those entitlements, i have no entitlements file.
After trying every possible fix in the world, I ended up just adding this to the entitlements file:
<key>beta-reports-active</key>
<true/>
Find the right entitlements file by looking in Targets > Build Settings > Code Signing > Code Signing Entitlements.
Maybe it's something to do with this Apple doc, although I couldn't follow the instructions fully as certain things were missing in XCode 7 (e.g. the refresh icon in Preferences > Accounts).
Another possible cause for this message is if you accidentally did remove the 'target inclusion checkbox' for the entitlement file – in that case the error message is slightly misleading...
In my case, the problem was caused by different Bundle Identifier in Target General tab than in Build Setttings.
If you have only development provisionning profile, just create distribution also
I played with fastlane gym, and there it gave some interesting insights:
There was an error exporting your application Unfortunately the new
Xcode export API is unstable and causes problems on some project You
can temporary use the :use_legacy_build_api option to get the build to
work again
This is the according Bug-Report. Seems to be unfixed for month.
https://openradar.appspot.com/radar?id=4952000420642816
Building the app in legacy mode worked for me.
gym --use_legacy_build_api true
Hope, this helps anyone.
In my entitlement file for Health kit there was development key. I removed that and my problem resolved.
I hope this answer could help :)
There seem to be many possible causes of this error.
In my case, my app was an Enterprise release and I was clicking "Validate" when I should have been heading straight to "Export".
I found this in the Apple docs:
Validate or Submit is not intended to be used with Development, Ad Hoc or Enterprise builds. Ad Hoc or Enterprise distributions should skip straight to Export.
Source: https://developer.apple.com/library/content/qa/qa1830/_index.html
I ran into this issue using App Groups. To resolve, I had to log into developer.apple.com and reassign the App Group ID to my App ID.
If other solutions do not work, try going to XCode -> Preferences -> Accounts -> View Details
Now look in Provisioning Profiles section. If your provisioning profile has an action button of 'Download', click the button and download. Then try again
Create a new provisioning profile
This solution worked for me when I had this problem.
Step by step :
log onto the apple developer portal and go here : https://developer.apple.com/account/ios/profile/production
Click the [+] add button and fill in a new profile name and select your app ID
Click the Download button, and once it has downloaded double click to open that file in Xcode
Re-Archive, and this time you should be able to upload succesfully to the store

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.

Code Sign error: No unexpired provisioning profiles found that contain any of the keychain's signing certificates

I think I've reached the nadir of iOS provisioning hell. After migrating to a new mac and doing an archive for distribution, I received the error:
Code Sign error: No unexpired provisioning profiles found that contain
any of the keychain's signing certificates
I then erased all certs and keys and provision profiles and did a "hard reset" (deleting all keys, certs, and profiles), following Apple's instructions by hand, with the same error. Then I did another hard reset and then had Xcode handle the whole thing via the Organizer, did another archive - only to see the same error.
I have all certs (WDRCA, Developer ID Cert Authority, iPhone Dev, iPhone Distribution) showing in Keychain Access, Xcode shows that it sees the dev and distribution certs, as well as the provisioning profiles, all marked with a green checkmark and "valid" status.
Code signing within the app show the correct dev and distribution is selected.
What's really troubling is that a Google search on the error shows one tech note from Apple that isn't very helpful, 2 tweets, and 3 results in Japanese - and nothing else. I contacted one of the tweeps and he said he fixed it with a hard result, which I have done twice.
Any ideas on where to go or what to do next?
Fixed it by Organizer -> Teams (select Your Team) -> Refresh (low right corner).
After removing all devices/profiles/certificates and adding/creating it did still not work here too....also removing the Xcode prefs did not help.
but it seems to in the project settings, check in the build settings under CODE_SIGN_IDENTITIY, in my project the first line was set to a old profile but not visible in the list, only if you open the pulldown, after removing that it worked.
I just had this problem as well. I finally realized that the identifier is case sensitive. For example if your product name is "StackOverflow" it automatically tags the identifier with com.yourcompanyname.StackOverflow. (this of course can be changed by going to the summary of the target). The problem lies in what the app id is in the developer portal. Make sure that the identifier in the portal matches what's in Xcode.
I have the same issue here since Xcode 4.3 install (moving from /Developer to /Applications). I found this post for changing the Xcode dir
in the terminal check what path it is set to with:
/usr/bin/xcode-select -print-path
and then if it is still set to /Developer set it to /Applications:
sudo /usr/bin/xcode-select -switch /Applications
which worked for me to be able to do the update to 4.3.2 but this did not resolve the issue mentioned....so maybe it helps you.
After nine hours of hair pulling, cursing and burying my head in my hands... All I had to do was create a new project, transfer the files over by hand, and the error went away. Argh.
Update: My marking my own answer as correct does not mean these other answers were wrong - I didn't get a chance to try any of them.
i 've met the same problem.
the answer of the problem is simple.
you need to login your apple develpoer web site
to apply and download a profile for your app .
after double-click the download file ,
you can see the file in organization of the project in xcode .
the name of the bundle id is the type like com.yourname.appname
the xcode device choose the ios device
and the codesign of the target should choose distribution
which is one of the file in organization of the project in xcode .
f.y.i.
A few days ago I had exactly the same problem.
The issue is related to no having the correct distribution provisioning profiles; My error was that I added a new device to the portal and did not re-download the distribution profile from the developer site.
Today I had the same issue; while it was working perfectly with the developer profile i could not archive or build a distribution package..
I had to go to the portal and manually re-download my distribution profile because new hardware was added even though I am not actively using it on the developer profile (did not check the box to add it to the provision)
Hope it helps anyone
I went straight to "but it seems to in the project settings, check in the build settings under CODE_SIGN_IDENTITIY, in my project the first line was set to a old profile but not visible in the list, only if you open the pulldown, after removing that it worked."
And that seems to have done the trick.
I fixed it by updating the bundle identifier in the project settings > targets > appName
in the info tab.
I had this problem, and fixed it by putting my scheme back to Debug, as opposed to Release.
I faced the same problem after upgrading to Xcode 4.3.2 and SDK 5.1. Everything worked perfectly in the previously version of Xcode with SDK 5.0. After many hours of hair pulling I created a new distribution certificate in the iOS Provisioning Portal->Provisioning-> Distribution Tab and after downloading it and installing it into Xcode (drag-and-drop) it works to archive after selecting the new certificate in the Code Signing area for my target.
I had the same problem after upgrading the OS/xcode so its worth to try.
the solution for me was simple,
go to the ios provisioning portal.
make sure the app certificate for the app is valid and not expired.
download again it again and double click it to install.
it should fix the problem.
I had this error when trying to build a release version - no problem occurred for debug builds. Baffling because in the code signing section of the build settings I had the same profile selected.
The solution for me was to create and download a new distribution provisioning profile, even though from the settings it appears not to be used.
I found a solution that was not on here, after looking through the errors and looking into my raw .app file, i found the solution.
Go to your target, and then "Build Phases" instead of Build Settings.
Make sure that in "Compile Sources" is your storyboard. For some reason Xcode didn't add the storyboard to this area of my file when I coppied the storyboard in.
P.S. I had to add the other .m's that i wanted in the project to this area as well (the ones that I dragged in, not created in the project)
Hope this helps
In the Target settings, in Sumary, check if Bundle Identifier is exactly the same as in itunesconnect.com
as example:
Bundle ID: com.mycompany.myapplication
I fixed mine by Analysing instead and checking that error. It indicated that my bundle ID was not lowercase as in the provisioning profile.
I actually was having this issue but whenever I tried to get into the organiser it caused XCode to crash. To resolve this issue I went into my targets and changed everything under Code Signing Identity to iPhone Developer. The target defaulted to the provisioning profile I wanted and it worked.
What worked for me is to choose "Don't code sign" and then do a build. This generates an error, but seems to clear out whatever xcode is hanging on to. Then choose the right provisioning profile and build. This has solved similar problems for me in the past.
Fixed it.
Went to Project-> general-> found an option "no provisioning profiles found" Fix Issue button. Clicked it . Automatically fixed
Reason Of Error
If you don't have any valid provisioning profile downloaded to your system's Library/MobileDevice/Provisioning Profiles folder then you might run into this error.
Solution
Login to your Apple Developer Account from Xcode->Preferences->Accounts and then download a valid provisioning profile.
Move to Target->General and select the correct Team.
Now go to Project Build Settings->Code Signing Identity and select just 'iOS Developer' and 'Automatic' in Provisioning Profiles. Your app will run smoothly.
In the Build Settings look for
General > Identity > Bundle Identifier and Team Settings. Fill in the Bundle Identifier and select Team. (this basically your publishing info). Of course as the others have written you'll need the correct dev or team account. This solution worked for me and resolved the build error.
Its because of the SUDO permission you have given while adding the platform.
Follow this link Ionic Code Sign error: No unexpired provisioning profiles

Resources