Provisioning profiles status invalid (managed by XCode) - ios

Suddenly all my provisioning profiles are in status Invalid (managed by XCode). Why?
Also I remember in XCode 4 that you always had to create your provisioning profile. Now XCode autocreates your provisioning profile for development. Is this a new feature on XCode 6?

I had the same problem today.
In the Apple Developer website, all of my company's Provisioning Profiles were marked as "Invalid (managed in Xcode)". None were out of them were date, none were using iOS Certificates which had expired, and the website gave zero suggestion that anything was actually wrong.
The solution, ridiculously, was to delete my perfectly valid iOS Certificates, and recreate them.
We write in-house apps aswell as apps for the App Store, and Apple (quietly) refuses to let you have more than 2 of these at once. So I was unable to create a third iOS Certificate which would allow me to use the "In house and Ad-hoc" option, hence the need to delete an iOS Certificate first.
Once I had pointlessly recreated the "iOS Certificate", the Provisioning Profiles came to life.
Part 2 of this farce is to go into Xcode, and delete your Provision Profiles (XCode \ Preferences \ select your iOS Certificate \ View Details, then select all of your provisioning profiles, right click and select "Move to trash".
At this point, absolutely nothing will change, and you'll think you've done something wrong.
But then, if you then quit Xcode, and go back in, then you'll see the Provisioning Profiles will have disappeared.
Now you can re-download the Provisioning Profiles from the Apple Developers website, and redownload the latest versions.
Until Xcode 7.2 comes along, and breaks something else.
(Seriously, I spend more time fighting with Xcode bugs than writing code..)

Apple introduced Xcode Managed profiles in Xcode 5 as a way to try and make the provisioning process less cumbersome and get Developers sending code to their devices without having to go through the manual upload/setup/download/install/build process. In effect, Xcode was completely automating the entire provisioning process whenever there was a code sign error detected. For developers that had already wrestled with understanding Provisioning, this new behavior was frustrating as the processes those teams put in place were unintentionally being wrecked by Xcode's best attempts to be helpful. That said, it is better today but not as transparent as it should be when it comes to affecting your Certificates, Identities, and Profiles data. If you are't familiar with what all is included in a provisioning profile or signing identity, there's some related reading you might want to skim: What are code signing identities?
Suddenly all my provisioning profiles are in status Invalid (managed by XCode). Why?
The most common reason for a profile to move to the "Invalid" state is because at least one of the profile's registered test devices has been deactivated / removed from the developer's account. By doing so, all profiles that included that device UDID are marked as invalid and require regeneration. This can be accomplished in Xcode > Preferences > Accounts, clicking 'View Details' on your Apple ID account, and then clicking the refresh button in the lower right corner of that account details screen.
Also I remember in XCode 4 that you always had to create your provisioning profile. Now XCode autocreates your provisioning profile for development. Is this a new feature on XCode 6?
As stated in the start of this answer, no. Autogenerated provisioning profiles were introduced in Xcode 5 and the workflow has been refined several times since Xcode 5.0 and modern Xcode. If you allow Xcode to assist you with Code Signing error messages, its default position is to check the validity of your development or distribution certificate (depending on what kind of code sign operation you were trying to do), check the validity of the AppId and Provisioning Profile, and revoke then reissue whichever part of the signing identity is in error.

Really it messing up on me. it destroyed my 4 hours fighting with Xcode. At last created another new provisioning file with selecting appleID as iOS Wildcard App ID (xxx.*)

Related

No matching provisioning profiles

Though I had been a while without seeing such an error, I recently got this message, when trying to archive an app written in Objectiv-C:
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 haven’t changed anything in my settings, and this error seems to appear with recent versions of Xcode. I am using Xcode 6.3.2.
When I wanted to archive an app written in swift, I did not have this problem.
I do not see why the language would be related to the provisioning profiles, but that just something I noticed.
I tried to use a brand new provisioning profile, but it didn’t make any difference.
I also tried Refresh accounts from Xcode preferenced, but again with no luck.
Of course I looked for some solution on the net, but everything failed.
Refresh Provisionning profiles from XCode - Preferences - Accounts - View Details - refresh button
Connect to Itunes Member Center to agree on the new Apple Developer Agreement
It will take some minutes to propagate through the network if you click on the agree button (I had to wait 10 minutes)
eventually refresh again your provisioning profiles in XCode And eventually, check that your Distribution certificate is still valid in the iTunes Member Center

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!

iOS provisioning profile

Usually I can always find what I'm looking for on Stack Overflow. But this time I'm really stumped.
I've read other Stack Overflow responses for people who have had a similar problem to this; but to no avail. (I think some of that is that I'm using Mavericks and I recently updated Xcode to 6.0.1.)
My woes began with getting this warning from Xcode: “Target Integrity Provisioning profile is expiring...” which was true. I had recently renewed my developer's license and I did need to update the provisioning profile.
So before I updated Xcode, I went to the iOS dev center and created a new provisioning profile and downloaded it. I selected it in Window->Organizer / Devices and I removed the old one. But the warning did not go away.
I read a post on Stack Overflow, from someone who could not delete their provisioning profile. They suggested using the iPhone Configuration Utility. I went to that web link for that program; and read there that for Mavericks, I should now use the Apple Configurator.
I downloaded the Apple Configurator but when I began using the program, I couldn't readily see anything about provisioning profiles.
I began to think, maybe I did need the older program called iPhone Configuration Utility after all. So I downloaded that, and it installed. But I cannot find it anywhere. I'm so confused by that. Is the iPhone Configuration Utility part of Xcode or part of Apple Configurator now?
To make matters so much worse, after I updated to Xcode 6.0.1, the screen in Windows->Organizer / Devices where I was able to see my provisioning profiles and add and remove them is gone! (I'm not sure where it got moved or how to get to it.)
I'm worried if I don't take care of this warning soon the app may stop working because it's referencing the expired provisioning profile.
Has anyone had some success updating a provisioning profile with Mavericks and Xcode 6.0.1?
Well all you need is access to your developer portal and Xcode.
If your provisioning profile is expiring soon, all you need to do is to go to your developer portal > provisioning profiles > click on the one expiring > renew or regenerate.
After you do that, go to Xcode > Preferences > Accounts > Your Account > View Details > Refresh and you should be good to go.
It won't hurt to clean up your project after this procedure.
Edit:
Also check if your selected provisioning profiles for your project's schemas are valid and the ones you actually need.
As for your expiring provisioning profile, that's the one managed by Xcode. You can delete it from your developer portal without any worries and go to Xcode > Preferences > Accounts > Your Account > View Details > Refresh for Xcode to create a new general development provisioning profile for you automatically.
This error happened to me when I refreshed my xcode account's provisioning profiles, the provisioning profiles just got replaced with some ID that looks like thisas2d-12asdsd-13asd-ad3as-8sds, solution is to just choose the correct provisioning profile again, if the provisioning profiles are updated, the updated profile should be there.
THIS IS IMPORTANT, MAKE SURE THAT BOTH THE PROJECT AND THE TARGET PROVISIONING PROFILES WERE CHANGED

Certificates won't show in code signing identity in build settings

I'm encountering the errors:
No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found.
and:
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'
XCode isn't giving me any option other than "Automatic iOS Developer and Distribution" options in the 'Code Signing' area of the 'Build Settings'.
I've tried changing the bundle id to match the certificates exactly, as well as a more generic com.domain.appname ID, I've deleted and recreated the provisioning profiles - I'm really lost, it feels like it should be something really simply but I can't get my certificates to show in the settings.
I was shocked when having the same problem and reading some answers here, too complicated. But I solved this much much simpler.
Open Keychain Access. Delete iPhone Developer and iPhone Distribution certificates, although they are still valid.
Open Apple Developer Centre. Download iOS Development and iOS Distribution certificates again. Yes, I download them again as they are written as XXXX-1.cer
Drag them to Keychain Access to reimport them.
Rerun XCode. Problem solved.
The first thing I would check is that your Cert in Keychain Access is present and is married up to your private key. If it's listed but your private key isn't paired with it you've likely changed your Mac's password recently and instead of pressing "Update Keychain" you may have clicked on "New Keychain". This will require performing the CSR process again and adding that new cert from the portal to the existing prov profiles. (A screenshot here may help).
Next I would make sure that XCode's Organizer is showing your provisioning profiles as valid with a green checkmark. If they aren't valid XCode will tell you why. This could be anything from the missing private key to your cert wasn't added to the profile in the dev portal. (Another screenshot here may help).
If all of that looks good restart XCode. I've had problems with XCode not properly importing prov profiles until I give it a swift kick in the pants via restart.
What worked for me was to create a new iOS Provisioning Profile in apple portal then download and add it to the Organizer in XCode , my scenario was that I was importing the project from another user account and when Titanium was compiling the project had the iOS Provisioning Profile associated from the other user account therefore was crashing, so when I was ready to compile in the Run on iOS Device dialog I changed the Provisioning profile to the new one.
As it has been stated before, you need to see the green button (valid profile) in the Provisioning Profiles for your device .
Good luck! it took me two days to fix this!
Ren#ud

Yet another Xcode provisioning profile query

I'm sick to my back teeth with this whole provisioning business.
After Xcode (4.4.1) got into a state where it would crash on launch I re-installed it. But now after doing so I'm no longer able to run on hardware as I get a Provisioning Profile can't be found error.
But I don't know what profile its talking about as the id number given in Xcode doesn't mean anything to me. It says
Provisioning profile '27F6BCB8-4876-4408-AA16-D749F5B62C2A' can't be found
After struggling pointlessly for a while, I've deleted all the profiles from the device and from Xcode and then refreshed them within Xcode and copied them to the device. I have 4 profiles in Xcode, all showing as Valid, they are:
AdHoc Distribution Profile
Apple Push Profile
Project Specific Development Profile
iOS Team Provisioning Profile
In the provisioning portal Provisioning section there are:
- Apple Push Profile
- Project Specific Development Profile
- iOS Team Provisioning Profile
All 3 of which are showing as being in my Development Certificate profile list.
If I examine any of the profiles in the portal, nowhere can I see any sort of identifier which is of the form ''27F6BCB8-4876-4408-AA16-D749F5B62C2A', so how does one find out which profile Xcode thinks is missing?
If this isn't co-incidental, a few hours ago I added some new device ids to the portal and to the profiles. But I was still able to build/run after doing this and updating/refreshing the profiles. It was only after I had to reinstall Xcode that the problem started.
Right now I'm so fed up, as this isn't the first time I, and I expect countless other's encounter these sorts of problems. But as I don't know what profile Xcode thinks is missing, and things look alright I don't know what else to try to try and sort things out.
Cheers if you can help.
You can change what profile the app is being code signed against. It is probably set to an old profile that no longer exists. This is done in the targets build settings.

Resources