IOS study note 34-Apple push mechanism APNs (2)

Source: Internet
Author: User
Tags key string ssl certificate

The previous article introduced the basic principles and processing procedures of APNs. After introducing the APNs mechanism, let's take a look at how to integrate the APNS service into our own project. First, log on to our Apple Developer background and create an App ID for the App that will use the PUSH Service, as shown in, click Create and enter basic information:

 

 

 

Find the App ID we just applied for and check "Enable for Apple Push Notification service ".

 


From the above we can see that the push certificate is divided into two versions, one is the Development version, the other is the Production version, corresponding to the Development certificate and the release certificate (this is indeed a little troublesome, however, Apple must have its own reasons for doing so ). Now we use it for Development and testing, so we only configure the SSL Certificate of Development Push. If we want to release the App to the market, we will configure the Production certificate. The process is the same. Click Configure on the right side to go to the authentication page. Before proceeding to the next step, we need to prepare our local authentication certificate. This certificate was applied when we configured the developer account, you can generate a new one if it is not saved. The method is as follows:

First open the "key string" program and click the menu options, as shown in:

 

 

 

Enter the basic information, confirm, and save the Certificate file with the suffix. certSigningRequest to the local device:

 

 


Save the certificate to your local device. It will be used later:

 

 

 

Return to the previous page, click Configure to enter, click Continue, select a file, and upload the. certSigningRequest file we just applied:

 

 

 

After the upload is successful, click Generate. Apple will issue a Development Board push certificate to US based on the certificate we uploaded:

 

 

 

Click "Continue" to go To the download page. Download the push certificate to your local device and save the backup:

 

 

 

The downloaded file is named aps_development.cer. If it is a published certificate, it is aps_production.cer. Double-click the certificate and install the push certificate on our Mac server. After the certificate is installed successfully, the following page is displayed (if it is a release version, the certificate's Development section displays the Production)

 

 

 

At this point, the application and installation of the push certificate are complete. The next operation is to generate a Provisioning certificate for the App ID we have applied, after the certificate application is complete, double-click it to install it in Xcode. during development, select the signature certificate to our corresponding Provisioning file. Here mainly introduces how to apply for and install the push certificate, too detailed will not be described, if you want to learn more, you can refer to the previous summary of the article (I think it is very good) http://article.ityran.com/archives/194

The previous article introduced the basic principles and processing procedures of APNs. After introducing the APNs mechanism, let's take a look at how to integrate the APNS service into our own project. First, log on to our Apple Developer background and create an App ID for the App that will use the PUSH Service, as shown in, click Create and enter basic information:

 

 

 
 

Find the App ID we just applied for and check "Enable for Apple Push Notification service ".

 
 


From the above we can see that the push certificate is divided into two versions, one is the Development version, the other is the Production version, corresponding to the Development certificate and the release certificate (this is indeed a little troublesome, however, Apple must have its own reasons for doing so ). Now we use it for Development and testing, so we only configure the SSL Certificate of Development Push. If we want to release the App to the market, we will configure the Production certificate. The process is the same. Click Configure on the right side to go to the authentication page. Before proceeding to the next step, we need to prepare our local authentication certificate. This certificate was applied when we configured the developer account, you can generate a new one if it is not saved. The method is as follows:

First open the "key string" program and click the menu options, as shown in:

 
 

 

 

Enter the basic information, confirm, and save the Certificate file with the suffix. certSigningRequest to the local device:

 

 


Save the certificate to your local device. It will be used later:

 

 
 

 

Return to the previous page, click Configure to enter, click Continue, select a file, and upload the. certSigningRequest file we just applied:

 
 

 

 

After the upload is successful, click Generate. Apple will issue a Development Board push certificate to US based on the certificate we uploaded:

 

 
 

 

Click "Continue" to go To the download page. Download the push certificate to your local device and save the backup:

 

 
 

 

The downloaded file is named aps_development.cer. If it is a published certificate, it is aps_production.cer. Double-click the certificate and install the push certificate on our Mac server. After the certificate is installed successfully, the following page is displayed (if it is a release version, the certificate's Development section displays the Production)

 
 


 

Related Article

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.