I've done it before, so, it's do-able. It's just a question of figuring it out again. I wonder if I made a blog entry on it? Well, I did when I was deploying it for a client, so this will be *less* complicated. But I think I'll just take another look at it.
Ok, let's start from here:
https://developer.apple.com/ios/manage/overview/index.action
Ok, after I log in to the iphone developers portal, which is my inititials @ mycompany.com, I see the familiar menu on the left.
Well, I have a profile (or is it iOS development certificate - or are they the same?) for the previous app, but not for this one.
In the ‘Certificates’ section of the iOS Provisioning Portal, you can request individual iOS Development Certificates. All iOS applications must be signed by a valid certificate before they can be run on an Apple device. In order to sign applications for testing purposes, Team Members need an iOS Development Certificate.
I just want the individual certificate.
Let's check out the "How To" under "Certificates". It looks like I'm at the "Configure Profile" with a check under "Development Certificate".
A digital identity is an electronic means of identification consisting of a secret "private key" and a shared "public key". This private key allows Xcode to sign your iOS application binary.
Ok. So, the certificate is a private key?
The digital certificates you request and download are electronic documents that associate your digital identity with other information, including your name, email address, or business. An iOS Development Certificate is restricted to application development only and is valid for a limited amount of time. The Apple Certification Authority can also invalidate ("revoke") a certificate before it expires.
Generating a Certificate Signing Request
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.
// Ok, to *get* the dev certificate, you need to *ask* for it (create a CSR) - using the KeyChain Access app.
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:
I'm not clear if you need a key for each app or not. Working theory is yes.
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”.
Well, when I bring that up, I have both an iPhone developer and an iPhone distribution certificate under "certificates" and they don't expire till March 2012.
I also have two keys for developer and distribution.
I also have "MyCertificates" for developer and distribution.
One caveat is that the name for the key insignia for the certs is different for developer and distrubution.
Actually, I just need to test right now.
What if I just change to "device" instead of "simulator" under XCode 4?
Ah it says "Code Sign error: The identity 'iPhone Developer' doesn't match any identity in any profile".
Ok, let's look at this and see if it helps:
http://mobiforge.com/developing/story/deploying-iphone-apps-real-devices
In order to test your iPhone applications on your device, you need to obtain an iPhone Development Certificate from the iPhone Developer Program Portal. This needs to be done once for every device you wish to test your apps on. The following sections walk you through the various steps, from obtaining your certificate, to deploying your applications onto the device.
First, obtain the 40-character identifier that uniquely identitfies your iPhone/iPod Touch. To do so, connect your device to your Mac and start Xcode. Select the Window > Organizer menu item to launch the Organizer application. Figure 1 shows the Organizer application showing the identifier of my iPhone. Copy this identifier and save it somewhere. You will need it later on.
I think I've done this. But, I might just want to walk through the whole thing. Wait, I did load this app before on my device!
If I open window / organizer, I see it under applications. But, this is a new project, but I have an an app id.
Anyway, here's my device identifier:
b29130c9477fea6abf766f9e7258f7818d3f643d
Ok, the provisioning profile, my client's, is expired.
Ok, I don't know where the profile I generated is.
Ok, let's just walk through the steps - again.
Generating a Certificate Signing Request
Before you can request a development certificate from Apple, you need to generate a Certificate Signing Request. This step must be performed once for every device you wish to test on. To generate the request, you can use the Keychain Access application located in the Applications/Utilities/ folder (see Figure 2).
In the Keychain Access application, select the Keychain Access > Certificate Assistant menu and select Request a Certificate From a Certificate Authority (see Figure 3).
Ok, I'm changing the default address to my company email address.
In the Certificate Assistant window (see Figure 4), enter your email address, check the Saved to disk radio button and check the Let me specify key pair information checkbox. Click Continue.
Choose a key size of 2048 bits and use the RSA algorithm (see Figure 5). Click Continue.
You will be asked to save the request to a file. Use the default name suggested and click Save (see Figure 6).
Logging in to the iPhone Developer Program Portal
Once you have generated the certificate signing request, you need to login to Apple's iPhone Dev Center (see Figure 7). Click on the iPhone Developer Program Portal link on the right of the page. Remember, you need to pay US$99 in order to access this page.
In the iPhone Developer Program Portal page, click the Launch Assistant button (see Figure 8) to walk you through the process of provisioning your iPhone and generating the development certificate.
First, you will be asked to create an App ID (see Figure 10). An App ID is a series of characters used to uniquely identify an application (or applications) on your iPhone. You only need to create an App ID once per application, i.e. you do not need a new App ID for new versions of your app. Enter a friendly name to describe this App ID (to be generated by Apple). Click Continue.
I'll give it a different name "JlptVocabQuiz"
The next screen allows you to provide a description of your iPhone/iPod Touch. You need to provide the device ID that you have obtained earlier (see Figure 11). Click Continue.
Ok, good - it's got my iTouch on file and is letting me select it.
You are now ready to submit the certificate signing request to Apple (see Figure 12). The instructions on the screen show you the steps that you have performed earlier. Click Continue.
And - it's got my existing certificate on file. Great! I can just use this. Next...
Provide a description for your provisioning profile (see Figure 14). A Provisioning profile will be generated so that you can download it at a later stage and install it on your device. Click Generate.
I'll call it JlptVocabQuizProfile
Drag and drop the downloaded Provisioning profile (in the Downloads folder) onto Xcode (located in the Dock). This will install the Provisioning profile onto your connected iPhone/iPod Touch. Click Continue (see Figure 17).
Ok, going smoothly. The downloaded file name is:
JlptVocabQuizProfile.mobileprovision
Good - it's now in "Window", "Organizer", "ProvisioningProfile".
You can verify that the Provisioning profile is installed correctly on your device by going to the Organizer application and viewing the Provisioning section (see Figure 18) to see if the profile has been added.
Right. Now what?
Back in the iPhone Developer Program Portal, you are now ready to download and install the development certificate onto your iPhone/iPod Touch. Click the Download Now button (see Figure 19) to download the development certificate to your Mac. Click Continue.
I'm using an existing one, I think - let's see what it does.
Here's what the Assistant says:
Step 3: Verify your private and public keys in Keychain Access
Verify the iOS Developer private and public keys are paired together in the Keychain Access application to ensure your Certificate is properly configured on your Mac.
Ok, it's the same one I had before - when I click on the downloaded development certificate, it just brings up the certificate in keychain access - they one with the private key under my company name, not my personal name.
Back to the web page instructions:
In the Keychain Access application, select the login keychain and look for the certificate named "iPhone Developer:" (see Figure 22). If you can see it there, your certificate is installed correctly.
Same thing.
You are now almost ready to deploy your iPhone application onto your iPhone/iPod Touch. Click Continue (see Figure 23).
In Xcode, under the Active SDK item (if this item is not already on the toolbar, go to View > Customize Toolbar and add it to the toolbar), select the OS version number of the device that is currently connected to your Mac. In my case, my iPhone is running the older iPhone OS 2.0, hence I selected "iPhone Device (2.0)" (see Figure 25).
Well, I couldn't find that. I'm just going to click run - and it works. Phew. Well, sort of. I think the background might be covering up the display. But that's and issue for another post.
No comments:
Post a Comment