Provision Profile and Apple Keychain Services - iphone

Currently we are in the process of building multiple apps for the same client and for the convenience we are using a common provision profile for all the apps. etc :- com.companyname.*
However each app has a unique bundle identifier. etc : - com.companyname.appname
Today I noticed that once we save the user name on the key chain on a one app , it appears on the another app as well. So I think this common provision is the culprit here and is there any way that we can overcome this without using different provisions ?

For development you should also use a certificate (.cer) from Apple Developer Program. You create the certificate by sending your private key to Apple. After this procedure install .cer. For using key on several machines you need to create a .p12.
Once you have downloaded the Apple iPhone certificate from Apple, export it to the P12 certificate format. To do this on Mac OS:
Open the Keychain Access application (in the Applications/Utilities
folder).
If you have not already added the certificate to Keychain, select
File > Import. Then navigate to the certificate file (the .cer file)
you obtained from Apple.
Select the Keys category in Keychain Access.
Select the private key associated with your iPhone Development
Certificate. The private key is identified by the iPhone Developer: First Name
Last Name public certificate that is paired with it.
Select File -> Export Items.
Save your key in the Personal Information Exchange (.p12) file
format.
You will be prompted to create a password that is used when you
attempt to import this key on another computer.

Related

Valid Signing identity Not Found in Xcode

Actually i developed an app using my own developer certificates and provisioning profile.
Now i need to publish it on my client developer account and my client sent his distribution certificate along with provisioning .And I have installed the certificate and then i drag the provisioning profile to xcode, and i have got error message like "Valid signing identity not found"
Please assits me.
Change code sign in project settings.
You need the private keys that were used to sign the certificate. If you don't have them
anymore you can generate a new signing request.
You need p12 file from your client to use its developer certificate and provisioning profile.When your client provide you that p12 file than double click that file and its run perfectly.
And for geting p12 file ,select the cert, and open the arrow to also select the private key and export them together as a .p12 file from Keychain Access.
There are several ways to solve this issue.
The first one is, to export your developer certificate including the associated key from your keychain and importing it on your client machine.
The other way would be (If your client machine would use another apple dev account) to go through those steps listed here Apple Certification & Provisioning
I would recommend to delete the old certificates from xcode, sometimes xcode might lag otherwise

What private keys should I save in order to be able to rebuild my iOS application?

In Apple's iOS Provisioning Portal, under Distribution > "Prepare App," there is a stern warning about how critical it is that I save my private key. (To see it, click "Obtaining your iOS Distribution Certificate," then "Saving your Private Key and Transferring to Other Systems.") Here is what it says:
It is critical that you save your private key somewhere safe in the event that you need to build your application on multiple Macs or decide to reinstall your system OS. Without your private key, you cannot sign binaries in Xcode and there you will be unable to upload your application to the App Store or install your application on any Apple device. When a CSR is generated, the Keychain Access application creates a private key on your login keychain. This private key is tied to your user account and cannot be reproduced if lost due to an OS reinstall. If you plan to do development and testing on multiple systems, you will need to import your private key onto all of the systems you’ll be doing work on.
To export your private key and certificate for safe-keeping, open up the Keychain Access Application and select the “Keys” category.
Highlight the private key associated with your iOS Distribution Certificate and select “Export Items” from the ‘File’ menu. Save your key in the Personal Information Exchange (.p12) file format.
You will be prompted to create a password which will be used when you attempt to import this key on another computer.
You can now transfer this .p12 file between systems. Double-click on the .p12 to install on a system. You will be prompted for the password you first entered above.
I can't figure out which private key to save, and I don't quite understand how all this stuff works.
I figured I was probably supposed to save the private key that is associated with the certificate named "iPhone Distribution: Acme Software" (where "Acme Software" is the [fictional] name of the company). If I go to the "Certificates" section, then there is a certificate with that name, and if I expand that section, there is a private key under it named "Mike Morearty" (my name). So I could export that.
But the instructions on the Provisioning Portal said to go to the "Keys" section, not the "Certificates" section. Under "Keys," I see six private keys all named "Mike Morearty," and there is no way to tell most of them apart. A couple of them have certificates nested underneath them, e.g. one has "iPhone Developer: Mike Morearty," and another has "Apple Development Push Services: ...". I understand that. But none of them shows "iPhone Distribution: Acme Software."
Should I just click the "Mike Morearty" private key that was under the "iPhone Distribution: Acme Software" certificate in the Certificates section? Or is there some way to figure out which private key to export from the Keys section?
To be safe, you could export all of them.
However, if you have a working build environment in XCode that uses the proper keys then you can also export your developer profile. in XCode go to Window->Organizer and find "Developer Profile" under "Development". The Export Developer Profile exports the appropriate private keys for all the valid identities in that XCode installation.

Issue with transferring of developer certificate and Provisioning Profile under Xcode

I am trying transfer my developer certificate under the keychain to someone. I exported the item. And also send him the provisioning profile which includes his device ID.
He installed my certificate to his keychain and also the provisioning profile to his xcode.
However, The provisioning profile under his xcode complains of there's no Valid signing Identity. Well I already sent him the certificate.
What's wrong?
You have to export the matching private key with the Developer Certificate, you can select both the private key and Certificate and export at the same time.
Does he have multiple certificates with the same name in his keychain? In which case he may have to delete the one that is not applicable for this profile when he is trying to build the app (he can reinstall the deleted certificate later). Also, ask him to delete and reinstall the profile. Is there any more information he is getting with the error?
Along with the development & distribution certificates that you provided, you also need to export your private key as a *.p12 file. When he is importing this elements into the Keychain application ensure he selects the "login" keychain.

Can we remove certificates and create again on Account for iphone app distrbution

I have one big problem. I am having iphone developer account and now i have given all the controls to my developer so he has created certificate in account and install it. But he didn't know that if we want to use this information on multi system then we need to keep .p12 certificates and we have to install this certificates on another machine.
We don't have this .p12 certificate and we want to use another machine so what should i do for this things?. How can i delete current certificate from account and create another CSR and certificates for all machine?.
If anyone knows then please drops some line.
Thanks,
iPhone Dev.
If you still have the machine he created the Certificate Signing Requests (CSR) on, then you can export the private key from Keychain Access. Just find the key and export it.
If the private key is no longer available then you need to revoke the existing certificate and create a new one again. There are plenty of questions on Stackoverflow about this, e.g.
Lost Private Key For iPhone Distribution Certificate. What could be solutions?

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.