renewing provisioning profile and certificates - ios

I have 2 iOS certificates - one for development and one for distribution (App Store). Both are expiring in 2 weeks. I am on Xcode 4.4.1. I have 2 development provisioning profiles and 4 distribution provisioning profiles.
In Xcode, I see that all of the provisioning profiles tied to the distribution certificate are set to expire in 2 weeks. I went into the Organizer->Provisioning Profiles and tried to Renew, but I received an error dialog indicating that "No value was provided for the parameter 'deviceids'". When I look on the Apple Provisioning Portal for that profile, it shows that the certificate is expiring in 2 weeks and that there are no devices associated with it (which is the way I've been doing it all along).
So - I'm trying to renew these, and haven't done this before. Has anyone seen a similar error in Xcode? Do I need to renew my certificate first, and if so, how? I don't see any "create new certifcate" button on the Provisioning Portal or in Xcode.

I had a similar problem after I recently renewed my certificate.
The following corrected the issues for my Development Provisioning Profile:
Click Refresh in Xcode Organizer.
Ensure the Code Signing build settings for your Project and Target are set to the proper Provisioning Profile. You should select iPhone Developer to avoid future issues.
Optionally, remove expired profiles from Device tab in Xcode Organizer.
The following corrected the issues for my Distribution Provisioning Profile:
Log in to your iOS Developer Portal
Go to the Distribution tab under Provisioning
Create a new distribution profile.
After the profile is generated, click Refresh in Xcode Organizer

OK - I think I've fixed this. Here is what I did and it seems to work - when I upload the next release I'll know for sure.
In X-Code, I deleted all of my provisioning profiles
I then quit out of X-Code
From the Development Portal, I revoked my developer and distribution certificates
I created new keys using the Key Chain application
Still in Key-Chain, I removed my old, soon to be expiring key/certificate
Back on the Development Portal, I created new certificates
Still on the Development Portal, I was able to edit all of my provisioning profiles and associate the correct new certificate to it
I downloaded the new profiles
I then followed this link's advice and worked around the apparent bug in X-Code to remove the old provisioning profiles from my project: Codesign error: Provisioning profile cannot be found after deleting expired profile
Started X-Code back up and copied the provisioning profiles into Organizer
Built for a device and tested OK.
Built for IOS Device as though I'm preparing to upload to the AppStore and build was successful. I haven't tried uploading to the store.
I actually did the steps twice, once for the development profiles and then once that worked/tested on my test devices, I modified the distribution profiles.
These set X-Code up w/ no warning and Organizer now shows all my valid provisioning profiles that won't expire for another year. Hopefully, next year, if I don't forget these steps, I'll be able to do it a bit more quickly.

An easier way of doing it is ...
My certificate had expired, so the renew button button in the Xcode Organizer did not work.
I did the following:
logged into the iOS provisioning portal
went to provisioning profiles > distribution
clicked on each of the expired profiles and clicked edit
the certificate radio button was unchecked because my certificate had expired, so I checked it and clicked generate
you'll then be prompted to download the newly generated profile.... dont!
wait about 5 minutes
go into the Xcode Organizer > provisioning profiles and click refresh
the profiles should then change from "expired" to "valid"

Related

How to reset app signing process in Xcode

I can’t sign my app in Xcode, therefore I’m looking for a way to completely reset everything I have to in order to be able to sign it. I did
Revoke all certificates in the certificates, identifiers & profiles menu in http://developer.apple.com
Delete all provisioning profiles in http://developer.apple.com
Delete all iPhone development and iPhone distribution certificates in my keychain
Delete the provisioning profiles in Xcode
and then
Create new certificates in developer.apple.com
Create new provisioning profiles in http://developer.apple.com
Download certificates and add them to my keychain
Use new provisioning profile in Xcode
Unfortunately I’m still encountering this error (item can't be found in keychain), which leads me to the assumption that I did not successfully reset all the app signing process in Xcode. Can anyone give me a hint?
I had this issue last week with my own app. I did multiple things to fix this at once, so I'll tell you what I did, and hopefully one of them works.
Try:
Removing and deleting all certificates, devices, and provisioning profiles from your developer account and recreate them.
Download the developer and distribution certificates, and right click on them to add them to your keychain.
Download your provisioning profiles to your mac and right click on them to add them to whatever they get added to.
MAKE SURE YOU HAVE AN ACTUAL DEVICE ADDED TO YOUR DEVELOPER PROFILE ON DEVELOPER.APPLE.COM
In xcode, go to accounts and make sure you are signed in with your developer account and you have the correct profiles downloaded. In your app's build settings/signing settings, make sure you don't have your "Personal Team" profile ANYWHERE that it asks for some sort of signing/developer/provisioning Profile.
If this answer helped you, please mark it as the answer.

Xcode 7.1 certificate issue and invalid profiles

We are two devs working on the same ios project, using same developer id. When one of us runs app on device, xcode offers to fix a certificate issue. After agree, xcode kills all existing certificates and invalidates provisioning profiles. This kills each other provisioning profiles.
Steps to Reproduce:
1. Create developer certificate and provisioning profile.
2. Share it with other developer.
3. Create new profile by xcode when it says "there is no profile to run on device" (and gets "Fix issue" button).
Expected Results:
Previously created provisioning profiles and developer certificates should remain valid.
Actual Results:
It invalidates existing developer certificates and provisioning profiles.
Version:
xcode 7.1
How we can fix this issue?
Never use the "Fix issue" button is one of the best tips given by this article : http://blog.jaredsinclair.com/post/116436789850/follow-these-guidelines-and-never-struggle-with).
Instead learn how to manage provisioning profiles:
1/ Connect to your member center from http://developer.apple.com
2/ Generate a developer certificate, you will have to share the private key with your other developer to use the same account (or you could invite him if you had an entreprise account)
3/ Register your device UDIDs
4/ Generate a development provisioning profile
5/ Configure your project to use this provisioning profile and developer certificate
6/ Build and run on your devices (and never struggle again with provisioning with provisioning profiles!)
Here is all the documentation you need: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
Hope that helps.
Cyril

Error Code-90161 Invalid provisioning profile

ERROR ITMS-90161:"Invalid Provisioning Profile
I have created IPA using Xamarin IOS in ad-hoc mode and selected a adhoc provisioning profile. but while uploading, following error annoying me :(
when I uploaded using application loader:
ERROR ITMS-90161:"Invalid Provisioning Profile.The provisioning profile included in the bundle x.x.x.x[Payload/x.x.x.app] is invalid.[Missing code-signing certificate.] For more information,visit the iOS developer Portal."
If you get this error, you probably don't have the correct type of Provisioning Profile. There's a few types of Provisioning Profiles, most notably are the "Development" and "Distribution" profiles. I suggest looking at your provisioning profiles, and if necessary recreate them.
To elaborate: You have 1 Certificate (created via Xcode Certificate Generating). With this Certificate, you can create an "App Identifier", and Provisioning Profiles. You can use the same Certificate for both a Developer Provisioning Profile and a Distribution Provisioning Profile. They don't work with one another, meaning a Developer Provisioning Profile won't work for a release build, and a Distribution Provisioning Profile won't work for a debugg build.
Try this, and see if that helps. Be sure to haul the new profiles in Xcode (or any other method you'd use) and edit your project's settings.
Good luck!
Love and regards,
Björn
My issue was related to having Xcode Automatically manage signing. What finally fixed the issue for me was going into the developer portal, selecting Certificates, and revoking the Distribution Managed certificate. I then rebuilt my project in Xcode, keeping the checkmark enabled to Automatically manage signing, and a new Distribution Managed certificate was automatically created in the developer portal under certificates. Distributing the archive to the App Store no longer produced any errors.
This issue also came up in other projects where I manually manage the Provisioning Profile. What worked for me was doing the following on the developer.apple.com portal:
Revoke the existing Distribution Certificate linked to the app's provisioning profile.
Issue a new Apple Distribution Certificate.
Link the new certificate to the app's provisioning profile.
Make sure to select the correct provisioning profile for your app's target in Xcode.
While de3z1e's solution seems to work for most people, it did not work for me. What did work was creating an Apple Distribution cert when using XCode settings. While Xcode is open,
Go to preferences (Command + ,) -> Accounts -> Choose your team -> Manage certificates -> + (bottom left) -> Apple Distribution -> Re-archive + upload
I am not sure why the other solution did not work for me, but this did. I also have Xcode manual signing on and left it on.
For Distribution:
If you upload to Test Flight you need an Apple Store provisioning Profile.
If you are distributing to specific devices, you need Ad hoc provisioning profile.
You assign it in visual studio through Manual Provisioning, choosing an Apple Distribution Identity, and choosing your provisioning profile manualy - nothing in automatic.
If you like me could not find your newly created provisioning profile to appear in visual studio, make sure the bundile indetifier in info.plist is the same as used in the provisioning profile.
If you are white-labeling as per xam-girls blog, other copies of info.plist is not looked at by visual studio iOS Bundle Signing
I faced same problem. I edited profiles, it works.
Click edit button all provisioning profiles and save it. Download and use edited profiles. App will upload to store.

Can't code sign with distribution provision profile after renewing distribution certificate

I recently renewed my distribution certificate and added it to my laptop. I re-created a distribution provision profile that uses the new certificate and added it to Xcode. The only issue is that now it can't find the correct distribution profile. Per example, the App ID is 18FH128DBH.ApplicationName and the bundle ID set here is 18FH128DBH.ApplicationName. However, if I try to find the provision profile, it just reads:
ApplicationName - for Bundle Identifiers ('ApplicationName')
profile doesn't match bundle identifier '18FH128DBH.ApplicationName
So, I removed the bundle seed ID and it found the correct profile to sign with. I can build successfully from there. However, when I try to submit to the App Store, I get an error saying that the 'Bundle identifier 'ApplicationName' differs from prior bundle identifier '18FH128DBH.ApplicationName'. Not sure how I can rectify the issue; I've been working on this for several hours with no avail.
Any clue on why this is?
These instructions might be a little bit outdated, but I've had a similar problem happen to me in the past and wrote this down for myself. I think the issue is that the keychain gets "out of whack". I can't promise this will work, because I honestly am not sure what causes the problem but this has worked for me in the past. Good luck!
Launch XCode
Open Window Organizer
Delete all provisioning profiles from your device
Delete all provisioning profiles under 'Development'
Log into the developer website
Click on 'Certificates' and Revoke your certificate
Launch 'Keychain Access' on your local desktop.
With the 'login' keychain selected
Delete all developer certificates
Delete all of your public/private keys
Close and restart 'Keychain Access'
Go back to the developer portal and request a new certificate (follow instructions)
Once the CSR has been uploaded and approved
Make sure that the new certificate is associated with the appropriate provisioning profiles.
Download and install the new certificate
Open XCode -> Organizer and add your device to the team provisioning portal
Go back to the developer portal and download and install the provisioning profile.
You should be good to go now to build and install to your device.

"No unexpired provisioning profiles found that contain any of the keychain's signing certificates" Horror

I have seen a few other questions that addressed this topic but none like mine. Yesterday I innocently added a device to the list of devices.
Question:
I am under the impression that once you add a device, it will now be linked to the provisioning profile. However, I believe it was not linked to one of my distribution profiles. So I went into edit the profile, clicked the checkmark next to the device, and hit submit. This is where the problems began.
I notice two things: I recently renewed my certificate/provisioning profiles about a week ago. Now, it thinks I renewed my provisioning profile yesterday ( or at least it says so in the organiser ).
Also, when I try to build any project I get the awful "No unexpired provisioning profiles found that contain any of the keychain's signing certificates". In the build settings my signing identity shows up under Identities without provisioning profiles. I have read horror stories of people having to tear everything down and rebuild and I hope I don't have to do that here..
Related question:
Code Sign error: No unexpired provisioning profiles found that contain any of the keychain's signing certificates
iOS distribution is such a pain in the ass! This worked for me (follow the steps in this order):
1) in the xcode organizer:
delete all provisioning profiles
2) in the mac os x keychain:
delete all iOS dev certificates
3) go to developer.apple.com
log in to the member center
revoke all certificates (edit: some redditors pointed out that this isn't a good idea if you're working in a bigger team. If that's the case try just deleting expired ones.)
4) go back to the xcode organizer:
click refresh (bottom right) under the provisioning profiles tab and
login
List item
on the popups click the positive button
5) in your xcode project go to the "build settings" tab
under code signing pick the dev. and distr. identities
if they are not there or not valid go to developer.apple.com and navigate to "provisioning" if they are invalid just click modify and save them again
6) go back to the xcode organizer:
hit refresh again (bottom right)
Today I've installed Xcode 4.3.2, and immediately had the same problem! First trying to archive distribution, and after that In a clean new project, trying to run on a device.
I fixed both problems.
1. For successful distribution I've downloaded and installed my distribution certificate from iOS provisioning portal, after that in Xcode I've setup Code Signing Identity correctly. This solved my problem with archiving.
2. I had the same problem creating new project and trying to run on device. Again in provisioning portal in certificates I've deleted my development cert. Also I deleted all development provision profiles. Also deleted them from organiser. Then I added the device again.
Hope this helps!
For me just hit the "Refresh Button" at the bottom right was the answer !
Hope I can help someone.
I got this error when I the bundle identifier for my app did not match the provisioning profile I was trying to use with it.
I came across this today. It turns out that after I cleaned up my devices list (removed a few I'm no longer doing development for) it made some of my development certificates invalid. I deleted those from the provisioning profiles and regenerated them.
I have Xcode 5.1 and i fixed the issue like this
Xcode -> Preferences -> Accounts -> View details -> Refresh button (Bottom Left)
After it was refreshed i clicked done, and the error was gone :)

Resources