iOS development-the process of creating and using certificates

Source: Internet
Author: User

This article is for the beginning of the iOS development of the compatriots some convenience, although this is not an important technical point, but the estimate will be sometimes more distressed, found that their handsome after writing code but can not run their own mobile phone, or in the release of the project when stuck in a certain operation steps, or because the project needs to push the function but how can not receive information, in fact, sometimes these are not your code error, but not the standard certificate use caused you do not know in fact your certificate may have been bad use, well, words not much to say directly on the steps:

Now that you have a Development account and we are ready to work on the pre-development, I use the company developer account I am using as an example to create a real-machine Debug Certificate (that is, a certificate of type development ) as follows:

Before creating the certificate we need to generate a certificate Signing request on our computer, which is the certificate enrollment requests file, find "Keychain Access" under Mac Click to enter the interface


Click "Request a certificate from a certification authority"


Here's the email address and common name to write your own, the following is the way we get the CSR file, we select "Save to Disk"


Here the file name is the default, the stored path according to their own habits, as long as convenient to find on the line

After clicking on the store we will get such a file


This is the certificate enrollment request file that we need to create the certificate later

Next we login to our developer account, if you are a new account after you click on the left menu bar certificates-development, your right side should be no certificate information, then we click "+" button to add a development certificate


Click on the "+" button
Since we are going to create a debug certificate so we choose the iOS App development under development, the following Apple push Notification Servi SSL is the certificate to be created when the push is made, Production This part is what we want to create when we publish the app, now we select the selected iOS app development


Click Continue


Here we need to use the CSR file generated by us, click Choosefile


Select the Certificatesigningrequest file and open it, then click Generate to generate the certificate


To this you have successfully created a debug certificate! ~ Click Download to download and double-click Install certificate

And then, in your keychain access, you'll see that your credentials have been successfully added to your keychain.


There is an arrow on the left side of the certificate, when clicked will appear belongs to your Mac's private key, proves that your certificate is available on this computer, there is a case that the certificate is also shown here but there is no arrow, that is, does not show the private key, this should be the case you have downloaded the previous certificate exists, But it is not authorized on your computer, although you can see your certificate installed here but it is not used, so if we use this certificate more than one time, We're going to export this to a. p12 file on the computer where the certificate was first created, and others to use the exported. p12 file to install the certificate correctly.

Next we start creating the app IDs


Click "+" to add the app ID


Here's the name to fill in a convenient name to distinguish, such as "TestID"

Attention! In the options below, if you select the explicit App ID then the Bundle ID field must match the content in your Xcode-bundle identifier, as


My naming habit is com. Company name. The project name, from the line below the bundle ID, is the small print "We recommend using a Reverse-domain name style string (i.e. com.domainname.appname ). It cannot contain an asterisk (*). " See, this naming format is also Apple's official recommended naming format,

You can also follow your habits, just keep it consistent.

So this is when we choose the explicit app ID, and we'll find a wildcard app ID option underneath it, which is a "wide area ID" that can be applied to multiple projects, not just a project as described in the previous step of the explicit app ID service, We can tell from the name


The bundle ID of this location we are going to fill out "com.xxx.*" This means that in Xcode bundle identifier as long as you are in the front part of the "com.xxx" consistent * Part of any name can be, so this app IDS can be tested for multiple items

Here are two scenarios, we choose the first option as an example to look down


If your project does not have a special service, the selected option is the default.

Next we click Continue

Then click Submit to complete the creation of the ID


The AppID that we created will be displayed in the right column.

Next we click All under devices to add the running devices that we support


We choose Register Device this one, here the name can be easily identified can be, the following udid you can go to itunes to see the copy and paste it in

And then we'll be ready to add our equipment to the next step.

Then we start creating the provisioning profiles file


Select the first iOS App development

Continue


This step selects the app ID we created earlier

Continue

Select the Debug certificate we created

Continue


Select the devices that we support


Fill out a name that you can distinguish


Finish creating the download and double-click

Double-click to open Xcode after installation Click Preferences Add your Developer account (skip this step if added)

Click the Add Apple ID to add your developer account and you'll see your developer account information on the right.

Then, in team line, select the name that appears in team name in your account.

Locate the code signing location in Buildsetting

Select the file created in the last step in Provisioning profile, then select all of the above as the debug certificate you created

Connect your phone to your computer command+r run! Success ~

Then the release certificate (distribution) is in fact the same as the Real Machine Debug Certificate (development), but when the first certificate is created we select the app Store under production and hoc is the first option to create, So is the final step of provisioning profile, choosing production under development.

The above is the development of certificates and publish the specific process of the certificate, I hope to have some help for the novice, of course, if the friends see flaws or errors please timely point out and exchange ~qq:511815688

iOS development-the process of creating and using certificates

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.