Xcode 7.1 certificate issue and invalid profiles - ios

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

Related

Noob stuck in App Store Distribution upload

I'm a novice Flutter developer. I just completed my first app. I've managed to get it published to the Google Play Store internal testing process. I'm attempting the same for iOS and macOS and TestFlight but I'm getting stuck when I try to upload for Distribution. The error is a mismatch in the code signed versus the provisioning profile. I've retraced and retried my steps multiple times, but I'm stuck.
Anyone willing to help me?
Thanks in advance,
JT
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.
Error Code-90161 Invalid provisioning profile

iOS how to add a provisioning profile

I am using Xcode Version 8.3.3 (8E3004b). I have an app developed that I would like to deploy to Apple's App Store.
In order to Archive and deploy, I understand I first need a provisioning profile. So, in the developer console, I set up an iOS Distribution Provisioning Profile.
I also have the following certificates:
On my MacBook, I added the following certificates to the key chain:
Then when I go to Xcode, I would expect to have a Provisioning Profile:
But as you can see, it Failed to create provisioning profile and No profiles for 'com.ionicframework.thewhozoo912107' were found.
I am obviously missing some step in order to create the Provisioning Profile in order to distribute the app to the Apple App Store.
Question
If anyone can suggest what I need to do in order to create a working provisioning profile in order to distribute the app, I would appreciate the help.
More info:
Solution:
I fixed this in Xcode by unchecking Automatically Manage Signing, and then selecting my provisioning profile.
I had that problem as well when I was developing my first app. It took a while, since I managed it. Try to plug your iOS device in your computer and then it should work.

What is the Team Provisioning I have from scratch?

I understand the provisioning profiles something like this: a provisioning profile contains signing identity information, and used to sign an application code. I can develop an application using simulators without any provisioning profiles. To run and test an application on real devices, I need at least development provisioning profile. These profiles should be generated in Apple Developer Portal and then downloaded to use them locally with Xcode. Currently Xcode itself is responsible for generating and downloading profiles, and Xcode does it automatically. There are also distribution provisioning profiles Ad-Hoc and AppStore.
But I'm confused by so-called "Team Provisioning Profile" used to sign the application in Xcode by default. It appears automatically and allows me to install application on the real devices, so I understand it as an automatically generated development provisioning profile. But I can't see any corresponding iOS-development provisioning profile in the Apple Developer console.
My question is: What is the Team Provisioning Profile then? If it's kind of Development Provisioning, why can't I see it on Apple Developer console?
Team : - A kind of Development profile that’s managed by Xcode. Xcode automatically adds everyone’s cert to it and all UDIDs from devices as well.
What is the Team Provisioning Profile then?
To save you time, Xcode creates and manages a type of development provisioning profile, called a team provisioning profile, for you. The team provisioning profile allows all your apps to be signed and run by all team members on all your team’s devices. For an individual, the team provisioning profile allows all your apps to run on all your devices. Xcode also performs configuration steps for each app service you enable that requires some type of provisioning. Although Xcode simplifies this process, it helps to understand your code signing and provisioning assets and to know where they reside.
If it's kind of Development Provisioning, why can't I see it on Apple Developer console?
Xcode creates a team provisioning profile and its components as needed in your developer account. Xcode requests a development certificate for you if it’s missing. The development certificate is used in the team provisioning profile to identify you. A device must be registered to create a provisioning profile, so Xcode may ask you to connect an iOS or tvOS device. For Mac apps, Xcode automatically registers the Mac that is running Xcode.that's why you can't see it on Apple Developer console
More check this : apple doc

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.

renewing provisioning profile and certificates

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"

Resources