OSDN Git Service

Regular updates
[twpd/master.git] / ios-provision.md
1 ---
2 title: iOS Provisioning Profiles
3 ---
4
5 ### Types of profiles
6
7  * __Development__ - deploy to an iPhone via XCode
8  * __Adhoc__ - deploy via testflightapp.com
9  * __Appstore__ - only used for submitting to the app store
10
11 ### Requirements
12
13 | What            | Dev | Adhoc | Appstore |
14 |-----------------|-----|-------|----------|
15 | CSR file        |     | √     | √        |
16 | Device UDIDs    | √   | √     |          |
17 | Developers list | √   |       |          |
18
19 ### Obtaining a CSR file
20
21 Needed for Adhoc & Appstore builds.
22
23  * Open *Keychain Access.app*
24  * *Keychain Access* menu -> *Certificate Assistant* menu -> *Request a 
25  certificate...*
26    * User email address is *your email*
27    * Common name is *your name*
28    * CA Email address is *blank*
29    * Request is *Saved to disk*
30
31 ### Get the `.cer` files
32
33 Needed for Adhoc & Appstore builds.
34
35  * in the iOS dev portal, go to *Certificates*, and download the certificate.  
36  Install it on the dev machine.
37
38 ### Obtaining device UDIDs
39
40 Needed for Dev and Adhoc builds.
41
42  * via iTunes: http://whatsmyudid.com
43  * via XCode: cmd+shift+2 (Organizer), Devices
44
45 For developers
46 --------------
47
48 Don't ever ask Xcode to *Fix issue...* for you.
49
50 ### Using a provisioning profile
51
52 No need to use `.mobileprovision` files since XCode 5.
53
54  * Open the `*.mobileprovision` file using Finder
55  * XCode Project -> *Build settings* tab -> *Code signing* section -> 
56  *Provisioning Profile* section
57    * Set *Debug* to the *development* profile
58    * Set *Release* to the *ad-hoc* profile
59
60 ### Building an .ipa (Adhoc or Appstore)
61
62   * In the toolbar, select "iOS Device" as the target
63   * *Product* menu -> *Archive*
64   * In the Organizer (Cmd+Shift+2) -> *Archives* tab -> *Distribute...* button