Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tutorials

Reply
 
LinkBack Thread Tools Display Modes
Old 09-22-2011, 08:41 AM   #1 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,005
Duncan C has a spectacular aura about
Default Critical: Back up your developer key!

When you register with Apple and pay your fee, you have to go through several steps in order to be able to build apps and install them on iOS devices. The first step is creating private key and certificate signing request. All your developer certificates will require that you have this private key.

To quote Apple's docs from the provisioning portal on their website:

Quote:
It is critical that you save your private key somewhere safe in the event that you need to develop on multiple computers or decide to reinstall your system OS. Without your private key, you will be unable to sign binaries in Xcode and test your application on any Apple device.
If your hard drive crashes and you don't have a backup of your private key, you will have to revoke your developer certificate and create a new one, and regenerate all your provisioning profiles. Needless to say, this is bad.

Below are the instructions on backing up the private key that's used to create your developer certificate, extracted from the how to section of Apple's provisioning portal:

It is critical that you save your private key somewhere safe in the event that you need to develop on multiple computers or decide to reinstall your system OS. Without your private key, you will be unable to sign binaries in Xcode and test 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.

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.
  1. To export your private key and certificate for safe-keeping and for enabling development on multiple systems, open up the Keychain Access Application and select the ‘Keys’ category.
  2. Control-Click on the private key associated with your iOS Development Certificate and click ‘Export Items’ in the menu. The private key is identified by the iOS Developer: public certificate that is paired with it.
  3. Save your key in the Personal Information Exchange (.p12) file format.
  4. You will be prompted to create a password which is used when you attempt to import this key on another computer.
  5. You can now transfer this .p12 file between systems. Double-click on the .p12 to install it on a system. You will be prompted for the password you entered in Step 4.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 09-22-2011, 12:42 PM   #2 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 158
cribasoft is on a distinguished road
Default

Why is it such a big deal to re-create your provisioning profiles?

I've done it a couple of times. Doesn't really affect App Store distribution.

Maybe you're pushing out a lot of Ad Hoc Dist builds? I bet not many people are doing that.
cribasoft is offline   Reply With Quote
Old 09-22-2011, 01:08 PM   #3 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,005
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by cribasoft View Post
Why is it such a big deal to re-create your provisioning profiles?

I've done it a couple of times. Doesn't really affect App Store distribution.

Maybe you're pushing out a lot of Ad Hoc Dist builds? I bet not many people are doing that.
I'm not talking about provisioning profiles. I'm talking about the private key that is used to create your developer certificate. If you lose that, you have to revoke your developer certificate and re-create it, AND all of your provisioning profiles (release, development, and ad hoc, across all your products)
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 09-22-2011, 01:11 PM   #4 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 158
cribasoft is on a distinguished road
Default

Quote:
Originally Posted by Duncan C View Post
I'm not talking about provisioning profiles. I'm talking about the private key that is used to create your developer certificate. If you lose that, you have to revoke your developer certificate and re-create it, AND all of your provisioning profiles (release, development, and ad hoc, across all your products)
Yeah I know.

So you are creating different profiles for each product? I only have the distribution profile, the team profile that Xcode automatically creates/maintains, and one ad hoc one (because I do such limited ad hoc). Maybe I'm doing this wrong?

Once you re-create your profiles everything is back to normal. It *is* a bit of a hassle, though.
cribasoft is offline   Reply With Quote
Old 05-10-2012, 05:00 PM   #5 (permalink)
User Interface expert
 
_Mac's Avatar
 
Join Date: May 2009
Location: Sweden
Posts: 141
_Mac is on a distinguished road
Question

Duncan, don't TimeMachine back this up?

If not, I'm taking your're advice and backing up my private key first thing tomorrow to a usb-stick and save it our physical safe.
__________________
-- Happy Coding
_Mac is offline   Reply With Quote
Old 05-16-2012, 10:18 AM   #6 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Question

Question:

In KeyChain Access, the private key contains my developer certificate, which is set to expire
in exactly one year.

What must I do when this certificate expires? Will I need to go through this process again,
and export another private key?
samurle is offline   Reply With Quote
Old 05-23-2012, 10:20 PM   #7 (permalink)
New User
 
Join Date: Oct 2011
Posts: 7
skiril is on a distinguished road
Default

Quote:
Originally Posted by samurle View Post
Question:

In KeyChain Access, the private key contains my developer certificate, which is set to expire
in exactly one year.

What must I do when this certificate expires? Will I need to go through this process again,
and export another private key?
Nope. Prior to expiration date (I did it 2 weeks in advance) login to your developer portal on apple and pay for another year. Once your payment cleared (few minutes to few hours) your profile extends to another year from the expiration date. Tnen when you launch Xcode just sync your new profile from organizer.

About main topic: I might be wrong here but I don't think it's a big deal about your local keychain. Your profile is maintain on Apple side. Local keys is just an ssl self signed request to ensure identity, not a validity.
I revoked and recreated my profiles few times with signing process started over and it didn't affected my existing apps being revoked or something.
As long as you paid on time prior to your Dev account on Apple expiration you are good. Even if you screw things up you can call them and they will work with you to help you out. It might take you a lot of waiting and hassle but not the end of the world.

Last edited by skiril; 05-23-2012 at 10:23 PM.
skiril is offline   Reply With Quote
Old 05-24-2012, 08:23 PM   #8 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Default

Quote:
Originally Posted by skiril View Post
Nope. Prior to expiration date (I did it 2 weeks in advance) login to your developer portal on apple and pay for another year. Once your payment cleared (few minutes to few hours) your profile extends to another year from the expiration date. Tnen when you launch Xcode just sync your new profile from organizer.

About main topic: I might be wrong here but I don't think it's a big deal about your local keychain. Your profile is maintain on Apple side. Local keys is just an ssl self signed request to ensure identity, not a validity.
I revoked and recreated my profiles few times with signing process started over and it didn't affected my existing apps being revoked or something.
As long as you paid on time prior to your Dev account on Apple expiration you are good. Even if you screw things up you can call them and they will work with you to help you out. It might take you a lot of waiting and hassle but not the end of the world.
Thanks for the reply.

Just to get this straight in my head, does my private key need to be backed up every year,
since my certificate expires annually, or does it only need to be backed up once?
samurle is offline   Reply With Quote
Old 05-24-2012, 09:16 PM   #9 (permalink)
New User
 
Join Date: May 2012
Posts: 6
Joseph262 is an unknown quantity at this point
Default

Duncan, don't TimeMachine back this up?


If not, I'm taking your're advice and backing up my private key first thing tomorrow to a usb-stick and save it our physical safe.
Joseph262 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 472
14 members and 458 guests
alexeir, David-T, Dj_kades, foslock, iAppDeveloper, jeroenkeij, LunarMoon, Mijator, myach, pipposanta, QuantumDoja, robsmy, sacha1996, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,129
Posts: 402,928
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:25 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0