iOS development certificate that point thing

Xcode iOS development is as a development tool, Xcode after installation comes with a simulator (Simulator). Simulator is a good tool, it does not have any user requirements, but we must remember one thing: App ultimately developed to be executed on a real machine, there is no increase in the real machine tried, released App out there will certainly be a variety of Italian unexpected problems, and it can not be solved. Instead, use the on-device debugging, development certificate will not be able to go around.

A. Development Account

Apple's Developer account is divided into three types:

  • Individual Development Account: $ 99; App can on the App Store; personal use only.
  • Developed account: $ 99; App can on the App Store; multiplayer collaborative development.
  • Enterprise Development Account: $ 299; App not on the App Store, the company internal distribution only; multiplayer collaborative development.
    Personal and corporate accounts in addition to the permitted number of users is not the same, there is no other difference. The next will be an example to clarify individual development account certificate to create and use processes.

Second, create a certificate and use - to develop a personal account certificate for example.

  1. Generate a CSR
    CSR file is generated by the Mac keychain, create a development certificate is required. Methods : Open Keychain, Keychain Access [] -> [Certificate Assistant] -> [request a certificate from a certification authority], fill in the "email address" and "common name", select "Save to disk" and click Continue . Then we will get a CSR file: CertificateSigningRequest.certSigningRequest .

    Note: while generating the CSR file, will generate a pair of keys: a public key and a private key, the private key is stored in the Keychain (can be viewed in the keychain), the public key is included in the CSR file created for certificate.

  2. Create a certificate

    Use the developer account login Apple Developer website :

    • Creating AppID.

      App AppID is the BundleID, used to uniquely identify your App. By "Identifiers" section to create, for example com.example.myApp. Here I have to say, if you do not use the push function, you can create shaped like com.example.*AppID of; but if you want to use the push function, you must use a specific AppID. AppID created when at the same time check the push service, and then create a push certificate.

    • Add Device.

      Adding your iPhone's UUID into account the development of go, so your iPhone can be used for debugging. The device is not in the account can not participate in the development of debugging. Can "Devices" section by adding.

    • Generate the certificate.

      Create a certificate, select "iOS App Development" under "Certificates" section, then upload the CSR file required to generate a development certificate.

    • Creating Provisioning Profile (ie PP file).

      Enter "Profiles" section, select "iOS App Development", then select the file to be added to the PP's AppID, then select the certificate added to the PP file, PP finally opted to file the device.

      Note: PP file can be seen as a "package" of different types of PP files contain different content:

      PP = + DevelopmentCert the AppID Development S (may contain a plurality) + Devices

      Distribution PP = AppID +DistributionCert

      AdHoc PP = AppID + DistributionCert + Devices

  3. Local Configuration

    The certificate created above (if also need to download the certificate push down together) and PP file downloaded to the local. Double-click the Install Certificate Certificate will be added to your keychain and automatically associate it with a private key that you created earlier. PP Double-click the file will be added to Xcode, debugging in real machine, Xcode will go to the keychain access the appropriate certificate and private key based on PP file, and verify that the connected device is already included in the list of equipment PP file. If there is no problem, it can be really enjoyable machine debugging.

Three .P12 file

If you have multiple development needs a Mac will naturally think Repeat the above steps on each Mac to create a certificate and configure the environment. But Apple for a number of certificates created under the development account has been restricted, after you create more than one certificate can not continue to create. In fact, Mac development process, the most important is generated when you create the CSR file private , the problem can be solved by the development of multiple Mac keychain will export the certificate (including the private key) from a P12 file.

  1. Open Keychain, find the corresponding certificate, expand Certificates item will find its associated private key. Right-exported as P12 files. Certificate is not associated private key can not be exported P12 file.
  2. P12 file and distribute the files to a Mac PP other for development, then install it.

Guess you like

Origin www.cnblogs.com/zlayne89/p/11010610.html