Old provisioning profile keeps popping up - ios

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

It's possible that the old provisioning profile is still lingering in your project file. I had a simular problem. Here's how I fixed it: Link

Related

Provisioning profiles status invalid (managed by XCode)

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.*)

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.

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