Distribution Certificate in xCode Organizer - iphone

Can I have more than one Distribution Certificate? I am developing an app but the current certificate was not created by me and is for another app. That app and cert was done by someone else who is no longer here.
I downloaded the vert, but in the organizer it tells me, Valid signing identity not found.
What am I to do?
Thanks for the help.

The error is shown, because a valid Signing Identity is not found. The Apple Documentation clearly describes how to export/import it. You should ask the certificate's creator to export his own copy of the certificate (because it can't be re-downloaded from the iOS Dev Center), then you can import and use it.

There's a difference between certificates and provisioning profiles.
Certificates are associated per account while provisioning profiles are for individual apps under each account.
If you are working with multiple iTunes / Apple Developer accounts, then yes you should have a certificate for each of those accounts installed in your keychain.
And assuming your app has it's own application (bundle) ID, you need to have a provisioning profile for each of the apps you're developing under that account. There are different provisioning profiles for distributing ADHOC builds and the Store build that gets uploaded for review by Apple.
It sounds like you need to start with just getting the certificate for the account you want to work with, then the provisioning profile.

Related

Provisioning Profile Issue

My Apple Certificate had expired. So i went in the Developer's Provisioning Area and Revoked My certificate. I deleted my old certificate, and old provisioning profiles.
Upon notification from my Team Lead. I downloaded the new Developer Certificate to my Mac and Dragged it into KeyChain Access. Now it shows my certificate as valid. I re-downloaded the provisioning profile for my App. and Dragged it into XCode4. The Organizer shows it to be valid but with a warning
XCode Could not find a valid private key/certificate pair for this profile in the keychain.
Have i done something wrong in my approach.
I am able to run my app on the iPAD and debug it too. But i somehow sense an issue in the above statement.
Please Help.
If you didn't recreate the provisioning profile with the new developer certificate (i.e. if you downloaded the old profile) then I think this is the problem - you will need to create a new profile with your new certificate.
You did to get the certificate key/pair from your team leader. Apple does this weird thing where it actually signs it's certificate with a "password" in order to use the certificate you have to have the "password". That's why you get XCode Could not find a valid private key/certificate pair for this profile in the keychain. I had the same thing, you can't just download the new certificate :(. If I can find the documentation of Apple that says how to do this I will post it in an edit.
Ok here is the docs: https://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/10-Configuring_Development_and_Distribution_Assets/identities_and_devices.html#//apple_ref/doc/uid/TP40007959-CH4-SW2
It is under "Provisioning a Device for Development", I Hope this helps!

How do I add another developer's certificate to the iOS provisioning portal?

I've been trying to enable another developer on my team to build an iPad app that we are creating for a client, but am having no luck getting his development certificate uploading into the provisioning portal.
I'm starting to think I'm missing something simple. My assumption is that each developer needs to have their own certificate listed on the Certificates -> Development page. Is that right, or are we supposed to be using only one certificate?
We tried setting him up with the certificate that's currently listed, but he gets "Error: "A valid signing identity matching this profile could not be found in your keychain" when trying to build.
Though I had licked this provisioning thing, but I guess not :)
Thanks for any help you all can offer.
You need to invite the developer to your account in the apple developer site.
Member Center > People > Invitations > Invite a Person to Your Team
This should automatically install their developer profile and then you can sign the app with the "Team Provisioning Profile".
Also check out Organizer > Provisioning Profiles > Automatic Device Provisioning in Xcode 4; this simplifies installing profiles.
You can add additional developers only if you have signed up as a company.
Ref: https://developer.apple.com/support/account/
Note that only certain types of Certificates can be added to certain types of Provisioning Profiles.
For example, an "App Store Distribution" provisioning profile will only show you the option to add "iOS Distribution" certificates. All of your other certificates will not be shown in the Provisioning Profile editing interface.
I hit an issue similar to this question, when one developer held all of the Distribution certs and another held the Development certs. I thought there was an issue adding the certificates to a provisioning profile due to the multi-user scenario.
The actual issue was in matching the correct types of certificates to the given type of provisioning profile.

Apple's Developer Certificate and Provisioning Profile

Can I use someone else's Apple's Developer Certificate and Provisioning Profile to build and run my application on the iPad ? Are the certificates and profiles Machine Specific ?
Actually I am trying to install my friend's dev certificate and it is getting installed but when I am installing the provisioning profile its showing me an yellow warning "
The main question is that The Developer' Certificate and Provisioning profile can be used on different machines or not ?
See the message, "A valid signing identity matching this profile could not be found". You are adding the certificate in your keychain, not the identity(which is a .p12 file containing the private key). From wherever you got the certificate, you should get the private key exported from the keychain rather than exporting only the certificate.
At the end, like BoltClock said, it is violation of Apple's license to use some others' certificate.
"Error: "A valid signing identity
matching this profile could not be
found in your keychain"
Solution: Most likely that you have
not downloaded the necessary WWDR
certificate from the Apple developer
site. There is a link to download this
certificate in the 'Certificates'
section of the developer portal. If
you do have the certificate in your
keychain, make sure that it has not
expired (unlikely, as mine is valid
until 2016). Also make sure that your
developer certificate has not expired
(these seem to be valid for only 12
months at a time)."
http://discussions.apple.com/thread.jspa?threadID=2220082&tstart=0
If you want to run your app on a device then you have to add that device's id to the certificate.

iPhone Distribution: No profiles currently match

I am about to upload an app to iTunes Connect. I am not Team Agent, nor does it seem the Team Agent can make me a Team Agent. So he logged onto Member Center and downloaded a Distribution Certificate, which is in my Keychain along with the WWDR Certificate.
The bundle identifier is set to se."companyname"."appname".
When I set the Code signing identity to Distribution, it says no profiles match. Can only the Team Agent build the final apps for upload? How do I make XCode "use the right set of profiles"?
Any idea on how to get past this last hurdle? :)
Edit: can the Team Agent log onto Member Center and create a provisioning profile for the app, will that solve everything?
Answer: See Paul Peeleen's answer, I decided to add this additional information (too long for comment).
Paul, I'm going to mark yours as the correct answer, because it set me on the correct track... certificates are for the keychain (which is usually linked to a computer, or rather, a computer user's login, I guess).
A quite separate distribution profile must be created for the app - modifying an existing Development certificate to include the Team Agent only lets him develop. The little 'a-ha' or perhaps 'd'oh' moment was that it has to be created in the Provision section with Distribution tab selected (in the provisioning portal).
After that, in the Target Info/Build tab you just use the default automatic profile selector (dev/distro) and it's found automatically.
I also temporarily tried adding the 'gibberish' (f.ex. JX567ERNB.) before the se.companyname.appname for the Bundle Identifier, but the automatic profile selector told me that it shouldn't be there, I removed it and it worked!
The profiles are what enable the projects to use certificates in the Keychain, I guess.
"iPhone distribution no profiles match" is one of the most annoying issue that I have ever had with app development.
This is how I sorted it out:
In Developer under iOS Provisioning Portal I needed to generate 4 certificates and download the WWDR intermediate certificate to be able to submit my app to the App Store:
Under Developer Certificate section (link) generate a Developer Certificate. Also Make sure that you have the WWDR intermediate certificate installed, if in doubt download it from there.
Under Developer Certificate section (link) generate a Distribution Certificate (This is not that will show up in Xcode!)
Under Provisioning section (link) generate a Development Provisioning profile certificate
Under Provisioning section (link) generate a Distribution Provisioning profile. THIS WILL SHOW UP IN XCODE AS A DISTRIBUTION CERTIFICATE!
After that I was able to select the iPhone distribution profile generated at 4. Also make sure that your target settings are correct as they overwrite the project settings.
Your active provisioning profiles are listed under "Xcode/Organizer/Library/Provisioning Profiles"
I hope it helps
UPDATE: Some distribution provisioning profiles often just "disappear" from my list. So I have to download and install (just double click) them again from https://developer.apple.com/ios/manage/provisioningprofiles/viewDistributionProfiles.action not a big deal, but annoying.
I checked this with my accounts and it seems that only the team agent can create the stuff needed for AppStore or AdHoc releases.
IF you have the correct provisioning profile installed, and both your project settings and target setting for the "release" build are set to the correct provisioning profile. + that you have the correct certificates installed for that computer... you can build the release.
I am unsure if only the Team Agent can upload these build, but otherwise you can package the release as a zip file (which you should anyways) and send it off the the team agent. The Team agent can then use the Application Loader to upload the application.
Also dont forget If you deleted all your certificates and keys in Keychain and you plan on regenerating those certificates make sure you change your certificate preferences in Keychain for Online Certificate Status Protocol to Off and Certificate Revocation List to Off, for some resaon this important step is the only way it worked for me.
Another reason developer profiles are missing
While in organizer under Library > Provisioning Profiles...
On my computer, if I hit Refresh, all the Distribution profiles are removed!!!
No big deal, just go back to your provisioning portal and go to Provisioning > Distribution and download the appropriate distribution profiles and your good to go! :)
Instructions right from apple... Follow them EXACT
https://developer.apple.com/ios/manage/certificates/team/howto.action
To request an iOS Development Certificate, you first need to generate
a Certificate Signing Request (CSR) utilizing the Keychain Access
application in Mac OS X Leopard. The creation of a CSR will prompt
Keychain Access to simultaneously generate your public and private key
pair establishing your iOS Developer identity. Your private key is
stored in the login Keychain by default and can be viewed in the
Keychain Access application under the ‘Keys’ category. To generate a
CSR:
In your Applications folder, open the Utilities folder and launch
Keychain Access. In the Preferences menu, set Online Certificate
Status Protocol (OSCP) and Certificate Revocation List (CRL) to “Off”.
Choose Keychain Access -> Certificate Assistant -> Request a
Certificate from a Certificate Authority. Note: If you have a
noncompliant private key highlighted in the Keychain during this
process, the resulting Certificate Request will not be accepted by the
Provisioning Portal. Confirm that you are selecting “Request a
Certificate From a Certificate Authority...” and not selecting
“Request a Certificate From a Certificate Authority with …”
In the User Email Address field, enter your email address. Please
ensure that the email address entered matches the information that was
submitted when you registered as an iOS Developer. In the Common Name
field enter your name. Please ensure that the name entered matches the
information that was submitted when you registered as an iOS
Developer. No CA (Certificate Authority) Email Address is required.
The ‘Required’ message will be removed after completing the following
step. Select the ‘Saved to Disk’ radio button and if prompted, select
‘Let me specify key pair information’ and click ‘Continue’.
If ‘Let me specify key pair’ was selected, specify a file name and
click ‘Save’. In the following screen select ‘2048 bits’ for the Key
Size and ‘RSA’ for the Algorithm. Click ‘Continue’.
The Certificate Assistant will create a CSR file on your desktop.
I battled the problem all day too. Tried Tons of things.
I downloaded the distribution provisioning profile. OK
Double Click. Into Keychain it goes (like magic) OK
Build. NOPE. Not Signed
Check - it is not the Team Provisioning Cert that you are looking for it is the plain looking one that cannot be installed on devices.
If it is not there you did not copy it to YOUR library/MobileDevice/Provisioning Profiles folder. (just like I didn't)
Make sure that the case of your bundle identifier in the provisioning profile and your info.plist are the same.
I just had this problem, and resolved it finally when I saw that Xcode would not even let me manually select my distribution profile, saying 'profile doesn't match bundle identifier myappname'
When a took a close look, I saw that the bundle name had the app name capitalized, and the provisioning profile had the appname in all lowercase.

iPhone: Error-'this provisioning profile does not have a valid signature'?

In Developer program portal,
I created a developer certificate. I registered for my iPhone deice. And registered an App ID (In App Purchase enabled). I created a provisioning profile using the created certificate and app id details.
I followed the procedure that Apple said and created it.
I downloaded the provisioning profile and installed on Xcode and on the device.
I tried to install my application on my jailbroken iPhone device( i did jailbroken already) using the provisioning profile which i downloaded, but it throws an error as 'this provisioning profile does not have a valid signature or it has a valid but untrusted signature(or it has a valid but untrusted signature)'.
Can some one advise me what is wrong here and how to resolve it?
NOT YET RESOLVED WITH THE SUGGESTIONS PROVIDED UPTO NOW. ANY HELP PLEASE?
Martin/
I had the very same issue although I set up provisioning, entitlements etc. correctly.
One cause of the error is described in http://www.onidev.com/2010/01/12/the-application-does-not-have-a-valid-signature/
Certain folder names may not be used in your app bundle. Check especially your "Copy files" build phases.
It seems this correlates with typical Apple app bundle names.
Unallowed folder names include (but are probably not limited to):
resources
contents
Renaming my folder from contents to myContents solved the problem for me.
Did you add the developer certificate and the corresponding private key to your keychain?
Not only do you have to add your own certificate (iPhone Developer: Johny Appleseed) you must also add Apple's Certificate Assigning Authority to your local keychain as well.
EDIT:
The certificate section in the program portal has the following info:
Downloading and Installing Development
Certificates In the ‘Certificates’ >
’Distribution’ section of the Portal,
control-click the WWDR Intermediate
Certificate link and select “Saved
Linked File to Downloads” to initiate
download of the certificate. On your
local machine, double-click the WWDR
Intermediate certificate to launch
Keychain Access and install. Upon CSR
approval, Team Members and Team Admins
can download their certificates via
the ‘Certificates’ section of the
Program Portal. Click ‘Download’ next
to the certificate name to download
your iPhone Development Certificate to
your local machine. On your local
machine, double-click the downloaded
.cer file to launch Keychain Access
and install your certificate. Team
Members can only download their own
iPhone Development Certificates. Team
Admins have the authority to download
the public certificates of all of
their Team Members. Apple never
receives the private key for a CSR.
The private keys are not available to
anyone except the original key pair
creator and are stored in the system
keychain of that Team Member.
The certificate assigning authority should be something like applewwdrca.cer, there are screen shots and more info in the "How To" section.
EDIT 2:
Read through this Provisioning HowTo carefully (as well as the other HowTo tabs in the program portal), provisioning is a pain in the ass tedious process, if this documentation does not fix your problem then you need to burn one of your free support cards and call Apple because there is a problem with your particular machine. You should have gotten 2 of those support requests when you entered the program, if you used them all you can buy more.