How to configure Provising Profiles for two macs - ios

I`m using two macs for develop and i configure the certificate and then generate two Provising Profiles, but when i active then and run the application in device from xcode in mac1 it desactive the other.
And from the desactivated i got this error.
How i supose configure for be activate in both mac?

This happened as the apple WWDR certificate expired... Apple did contact all developers about this:
https://developer.apple.com/support/certificates/expiration/
If you go into keychain access.
Click on System
Click on Certificates
Click on the WWDR certificate (probably expired)
Delete it
Download the new one
Install it on both macs (in System -> Certificates)
Xcode should fix this really, so:
Open Xcode
Click on the Xcode menu
Click on Preferences
In preferences click on the Accounts tab
In accounts select your applicable account (the one which should have the developer profile
Click on the view details button
At the top, you'll see your certificates. Click reset (or create) next to each
At the bottom of the page, download each of the provision profiles, Xcode should install them for you
See if that works.
If that again doesn't work, in system prefs, go to "Profiles" delete the one thats giving you issues and repeat the code fix above.

Related

Xcode 7 how do you refresh provisioning profiles?

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

Can't install Distribution provisioning profile

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

How remove a old provisioning profile in xcode 5?

I've install different provisioning profile in my xcode 5, before for remove it you had a session with all provisioning profile installed on the mac, but now this session disappear, how can I have access to this session now?
The best way to do this in XCode 5 is using an iPhone Configuration Utility. It lets you manually delete duplicates of provisioning profiles with ease and speed.
I keep Xcode closed when I do this just in case.
Edit:
For anyone wondering how to actually 'delete'. There are only two ways: a. menu -> b. Hit the / keyboard button.
You can delete the files directly from ~/Library/MobileDevice/Provisioning Profiles
Open finder, ⌘-Shift-G, and paste in the above path. Restart Xcode afterward.
Check out this related question for other suggestions.
Mirko's answer is correct- however, below I am trying to explain "why-it-is-so" on XCode5.
On XCode5, you are not supposed to/allowed to directly delete a provisioning profile- I think Apple has changed the paradigm a little bit and wanted to streamline the process, while making the provisioning and signing of binaries more secure. The idea on XCode5, is to allow you to login using your dev apple ID and then X-Code will be in sync with all your provisioning profiles. If you want to delete a profile (probably expired or redundant), you go to your dev profile and delete it- since the X-Code has all the details about your apple ID and provisioning profiles (as seen in the screenshot)- it will sync itself with your latest list of profiles- you do not have to worry about deleting those from X-Code anymore (and hence you can not delete these from X-Code anymore).
To delete a duplicate of an edited provisioning profile, you can also go to Xcode -> Preferences -> Accounts, select your account, and hit the refresh button on the bottom left corner under the provisioning profile list.
There are two ways for deleting your old provisioning profiles from Xcode.
1. Xcode Preferences
2. iPhone Configuration Utility Software.
Xcode Preferences -> Go Xcode -> click on left hand side top toolbar option Xcode -> Click Preferences -> Accounts, select your account, and hit the refresh button on the bottom left corner under the provisioning profile list.
By doing this you can delete your provisioning profiles.
iPhone Configuration Utility Software -> Install this software -> Open Software -> Provisioning Profiles -> find list of your all profile -> Press Backspace button, it will ask to delete provisioning profile ->Click on delete provisioning profile. So it will remove it from your all existing Xcode application and even from your PC.

Xcode "The private key for is not installed on this mac - distributing"

I always get this message when I try to submit my app to the app store.
Here is a picture of the message:
It would be great if someone could help me resolve that problem so I can submit my app to the store.
Try following these steps:
Revoke your existing iOS Distribution Certificate from the iOS developer website.
Generate a new iOS Distribution Certificate by going to XCode Preferences->Accounts->View Details and then clicking the + underneath the list of signing identities.
Go back to the developer website and make sure all your provisioning profiles are configured with the new certificate. (They should all be listed as Active when you are done.)
Go back to XCode and refresh your list of provisioning profiles.
I had the same issue as you did and this resolved it just fine.
This solved it for me without starting all the way from scratch:
1. Open Keychain Access on the machine that was used to generate the private keys
2. Select Keychains->Login and Category->Certificates on the left hand side
3. Locate the two certificates iPhone Developer: [your developer name] and iPhone Distribution: [your developer name]
4. Select both, right click and choose Export 2 items...
5. Enter a password of choice, save to disk and get the .p12-file over to the other machine that won't sign
6. Open the file, enter the password and you should be good to go.
Having a similar problem, after several days of testing, checking, try to repairing and so on, what worked for me was simply:
Open Xcode's preferences (Accounts panel)
Click on "Manage Certificates".
Add a new certificate.
Then everything started working again.
I also experienced this and fought the process for 4 hours. finally i did the following
Deleted all the Private and public keys and certifications in my Keychain Access
Deleted all Provisioning profiles
Deleted all AppID's - (Probably didn;t need to do this by I wanted a clean slate)
Deleted my certifications on the Developer.Apple site
Created new Wildcard Development Profile
Created new Profile SPECIFIC to the App that I was deploying (So it had the appname instead of *, in the AppID)
Created a new development Certificate from the Website.
Downloaded the intermediate certificate (Worldwide Developer Relations Certificate Authority) since I wiped that off my Keychain too
Created the Certification Signing Request (CSR), followed the instructions to the letter to add it to my keychain access. and Uploaded the CSR.
Once the Certification was added, I made sure to rename the public and Private Keys, and added comments to the info box - so I could remember what I did.
Created a new Distribution Cert by repeating Steps 7,9, 10 for the Distribution so I could get it onto the App Store.
Hopefiully this helps someone to know that you can wipe everything out and start over. I loaded all the certs on an olf Macbook Pro that started flaking out last week. So I got a new Mac Air last week, but Icouldn;t remember what keys, and I certainly didn't remember I had 2 sets of Private and Public one for the Development, and 1 for the Distribution. (If you have more that 1 distribution, I believe you would have additional sets.)
Steve
It is worth checking in Keychain Access to make sure you don't have multiple keys with the same name. Also, very often when I have run into Code Signing issues, the fastes solution has been to start the process over (create new keypairs, certs and provisioning profiles).
Best of luck!
Ran into the same issue and after cursing at Apple , I realized it was my fault.
1.- Go to developer.apple.com / Certificates / Production
2.- Download your certificate
This worked for me thank after trying other answers.
Go to Preferences -> Accounts -> Select the Apple ID you're using -> click "View Details…" button -> then click the plus button and select the "iOS Distribution" button. More details here.
It seems that you have got as far as generating a distribution certificate, so you must have generated a key pair at some point. Do you develop on multiple machines? Export the developer profile from the machine that has it and import it into this machine.
It's simple, login to the user's account (maybe on different mac) which was used to create the distribution certificate. Open Keychain Access and export their private key. Then install it to your Keychain.
My problem was Xcode was not on the Access control list for the private key. You can fix this in the keychain access without generating a new key pair.
Open keychain access.
On the left side select login and My Certificates.
Select your distribution certificate and double click your private key.
Select access control and add Xcode to the list if its not there.
Restart Xcode and make a new archive. It should find the private key now.
I actually just closed and reopened xCode and then everything was back to normal.
I have another answer (in addition to my prior post). Today, my private key expired (as I found looking at KeyChain Access), and a new one was in the list. How? Idk... Maybe from using the XCode "fix the problem" button I was presented, or by pulling an update for provisioning profiles as I described in my other post a new one was created automatically?...
Anyway, I logged in the development center, found the provisioning profile I wanted to use and clicked "edit". I was then able to select "Certificates". I found that the one wanted was not selected. I selected it and clicked "generate" to recreate the provisioning profile. Then I was able to download it. I dragged and dropped the file onto my XCode dock icon. That fixed it!
I've got the solution:
Your company has a Company (Enterprise Distribution).pem and CompanyEnterpriseDistribution.p12 you have to install them as well.
I have a company account in apple.
I solved the problem by:
1)in the developer website Certificates, Identifiers & Profiles
2)under Provisioning Profiles -> development
3)went to my development Provisioning -> edit
4)then download , and double click.
Try this..
In Your "System preferences" select "Security and Privacy".
Click on 'Lock' icon on bottom left corner.
Change 'Allow apps downloaded from' from "Anywhere" to "Mac App store and identified developers".
-Then try to build.
For those who are trying to update an app after some time, you need to renew your Porvisioning Profile in Apple Development Center, and then simply go to Certificates on the left hand side on your Apple Development Center, download the distribution certificate, and open it.
Xcode will do the rest and let you run the app.
Cheers!
For me it is that i have not installed my production certificate. (I have already installed development certificate which)
After downloading the production certificate and installed to key chain it worked for me.
This solved it for me without starting all the way from scratch:
reGenerate file "CertificateSigningRequest.certSigningRequest" by other macbook.
reGenerate Certificates "* Grid Information Technology Co.,Ltd"
reGenerate Provisioning Profiles
I am building and distributing development ipa's for my beta iOS app. I have repeatedly had to add new devices to list of those allowed, and have had many woes created by this. This time I'm documenting and sharing such a problem and the solution...
I added a new udid to my list in the developer center, built an archive and found the ipa was not found in the profile embedded in the ipa. So, I refreshed my provisioning profiles in XCode (to get an updated list) and this error was caused with the private key missing (as depicted in the start of this thread).
I then couldn't build another archive. Further, this created code signing errors when attempting to build the project.
After much pain I fixed it like this:
In XCode, go to Preferences...Account Tab. Click the add button (middle left) and select "iOS Development". This will create a new signing identity.
You should now be able to use the new provisioning profile to create the archive.
Also, the build errors should be fixed. Back in the project, "General" tab, select the "team" and retry the build. There may be some additional permissions dialogs. Click "fix" or "always allow" when prompted.
Note: The Member Center and Key Chain list will become a mess, with duplicates for signing ids, but at least everything works. You may want to try cleaning it up...
I created a new Distribution certificate, then edited my existing provisioning profile to point to that new certificate, then in Xcode > preferences > account > view details I updated my signing certificates.
worked like a charm
this will happen because you have format your mac and reinstall it or you are developing from new mac .
if you can not do the above and have your old certicate and profiles exported from the old mac
you will need to remove the wild card provissioning profiles from apple developer center , and also from certifcates you have to remove the old ones just the general development and production certificates .
then you will have to create new ones and to create new provisioning profiles for the app you need to upload to apple .
you do not need to delete all the provisiong profiles for now , but for sure you will need to create new ones for apps that you do not create for it .

No identities were available - administrator request

I had problems while "archiving" my app. I think there are invalid profiles because of iPhone Update to 5.1 and XCode update to 4.2.2.
I've taken now more than 4 hours to get rid of certification issues while using this thread step by step 3 times (which costs a lot of time):
Getting "A valid signing identity matching this profile could not be found in your keychain" warning
I still have the following fault:
No identities were available
An administrator must request identities before they can be downloaded.
The "Download identities" button went back to this window after processing some seconds.
Do you know how to get out of this wood of certification documentations and solve that fault?
Visit Member Center
Go to "iOS Provisioning Portal" -> "Certificates" (Left sidebar) >> "Distribution" tab
Check field "Provisioning Profiles". If empty, next (4)
Go to "Provisioning" (Left sidebar) -> "Distribution" tab. Press "New Profile" and complete it.
Go back to (3) check the field again.
Download and "run" (double click) the new provisioning profile.
In your project's build settings select the NEW provisioning profile (it might have the same name as the old one)
In your project's build settings update your code signing identities (all of them) to the new one if there is one. (The old one was probably expired which is one of the biggest causes for the error message you saw)
Verify that your bundle ID is correct (CaSe SeNsEtIvE)
Back to XCode Organizer - Devices. Click TEAM (Left sidebar) and click "Refresh" (right-bottom). You will find XCode fetch the new profile. If new content loaded, repeat steps 6 and 7 (they will have been changed!) *If you can't find team because you are running a newer version of xCode, go to Xcode preferences (clicking "Xcode" on the mac toolbar on the top left corner of your screen) and go to account, select your team and click refresh. If new content loaded, repeat steps 6 and 7 (they will have been changed!)If you are in Preferences -> Accounts and you still can't refresh, then:
Click on the Accounts tab
Select an Apple ID in the list
Click "View Details" on the bottom right
Click on the refresh arrow on the bottom left
Xcode will now refresh the updated credentials, and you can proceed to validate or distribute your app.
Validate or distribute your app again. It should work.
If this didn't work then go to "TEAM" under project settings > targets and select "none"... Now that you have selected None you will need to repeat step 7 and change the code signing identities (all of them) and try archiving again.
Lastly, if none of the above worked. Simply create a new production certificate AND create a new provisioning profile with the same bundle ID. (Yes, this will work if you are updating an app that is already live). Download the cert and prov. profile and run both (double click). Now repeat step 6 and archive. This should work.
#Takoi's answer is correct. However, with my latest version of Xcode, there is no TEAM option in the Devices section of the Organizer. I had to do the following instead to refresh the credentials:
Go to Xcode->Preferences
Click on the Accounts tab
Select an Apple ID in the list
Click "View Details" on the bottom right
Click on the refresh arrow on the bottom left
Xcode will now refresh the updated credentials, and you can proceed to validate or distribute your app.
Hope this helps!
Make sure the bundle id in your .plist file in XCode is the same as the bundle id in itunesconnect, if it's off, it won't be able to match the archive to the profile on itunesconnect when validating/distributing.
This is a little easier now.
You go to the app itunesconnect and login
click "certificates"
Provisioning Profiles / Distribution
generate a profile,
download the profile
double click it
I am a member of 2 teams and had the same problem while uploading one of the projects.
Changing General -> Identity -> Team to None in project settings (XCode 5) allowed me to upload the application to iTunesConnect.
Screenshot is here
My certificate had expired which resulted in my provisioning profile being expired.
Once I -
Updated my certificate on the iOS web portal
Clicked Edited on the provision profile
Selected the new certificate and clicked generate
In Xcode I refreshed my provisioning profiles
Error went away
I guess it is written somewhere in the stream, I did not read all in detail. I just want to emphasise on this point:
Due to an annoying xCode behavior, once you've set up everything, you HAVE TO clean the project and Quit xCode.
Then relaunch and build. Now you know if it works or not.
It looks like you're going to have to request another developer cert. Go to the iOS dev center website and go to the provisioning portal. Click the certificates tab and follow the directions. https://developer.apple.com/ios/manage/certificates/team/howto.action
To be clear, you're problem doesnt seem to be provisioning related, it's specifically the developer cert. if you do get another cert, you'll have to create all new profiles to sign your apps with.
My bundle identifier was named differently. I had to change it from Nyquist.GasBro to com.Nyquist.GasBro which is what I had in the provisioning profile.
None of previous answers helped me, so I post my issue.
Dev Center: Certificates, Identifiers & Profiles > Provisioning Profile > Distribution
Make sure that there is a distribution provisioning profile, and App ID in it is exactly the same as Bundle ID of your app in Xcode (Project Settings > General > Identity > Bundle Identifier).
Xcode: Project Settings > Build Settings > Code Signing:
Provisioning profile - choose that Distribution provisioning profile name (not Development!)
Code Signing Identity - I choosed Automatic since I have only one.
P.S. Before doing this, I deleted all unused and expired provisioning profiles and signing identities from Dev Center and from Xcode. Then, refreshed as mentioned in other answers: Xcode: Preferences > Accounts > (my Apple ID) > View Details > Refresh.
The answer that you are looking for is that when you generate the certificate request for COMMON NAME you need to put your HUMAN NAME as in John Smith, not your app name. Apple uses this term Common Name in 2 different ways and doesn't tell you that the certificate is supposed to have your name on it whereas in another area they ask for common name and want the APP name.
I had the same problem.
Nothing mentioned on this page did not work for me until i was deleted everything from archive.
After that problem disappear.
For those who says that the Ad Hoc Distribution profile wont work this year 2014, I have to agree.
In Build Settings locate the Code Signing setting: for Release choose your Store Distribution and then select Menu>Product>Archive.
Later, in the Organizer Window, select your archive and clic in Validate. It will let you select the Ad Hoc profile and validate... then select Distribute, it will let you save as .ipa file.

Resources