Aurora pushes the demo test process, problems and workarounds that may be encountered during the test

Source: Internet
Author: User

Create a development certificate, create a profile, Aurora push Page Setup, Xcode project settings, real-machine test Step 1: Create a development certificate <1> login https://developer.apple.com Enter Developer Center <2> Go to create and profile page <3> Click App IDs to create an app Id<4&gt. Enter the name of the app ID in the app ID description after creating the page <5> fill in a unique app ID (Note: Push app IDs can only be created with a single, not generic.) )

Explicit App ID is a unique app ID Wildcard app ID is a generic app ID (can replace any content with *)

&LT;6&GT: tick push service <7> Next, at this point the options for the service are yellow, representing the need to create the corresponding certificate, (the certificate is created below, the app ID is created first) Click Continue, complete the creation of the <8>. Create a certificate <9>. Tick the test push certificate (this certificate is used when the server sends a push request to APNs) and click Continue <10> Select the app ID that you created when we just 1~9 the step, click Continue <11> remind you that you need a CSR file <12>. Upload (CSR file). <12.1> process for creating a CSR file

Open Keychain-Tap Menu Keychain Access-Certificate assistant-Request a certificate from a certification authority

<12.2> fill in the details of the request, enter the requestor's mailbox, can be sent to the requestor through the mailbox, or can be stored to the local disk

Click Continue

<12.3> Select location, click Save (Create a good CSR file will appear in the corresponding folder) <13> Click Select File to submit the CSR file that we created <14>, select the corresponding CSR file, click Select, and then click Continue. <15> Download this certificate Step 2: Create a profile <1> start creating a profile <2> Select the type of profile, then click Continue <3> Select the app ID that this profile contains (app ID 1~9) <4> Select the certificate you want to use (if you have more than one) <5> Select the device you want to use (you can choose All) and click Next.

Click Finish to double click on the certificate and descriptive file, the certificate requested above is a test remote push of a certificate.
The test push certificate is used only when the server sends a message to APNS (typically a PEM file) and can be exported p12 and converted to a PEM file

Step 3: Aurora push Page Setup <1> double-click to open the certificate

When you double-click the open certificate, the Keychain Access tool starts when the certificate is opened. In keychain access, your certificate appears in my certificates.

<2> export the. P12 certificate file <3> Save the file in personal information Exchange (. p12) format. <4> Upload Certificate

On the Jpush management Portal, for an application, upload the steps above to get the. P12 certificate file. This is the necessary step for the IOS SDK to receive jpush push messages.

<4.1> Create an app on Jpush portal

Create an app on Jpush's management portal and upload the APNs certificate. If you are not familiar with the APNs certificate, please refer to: IOS Certificate Setup Guide

<4.2> automatically generates AppKey after successful creation to identify the app. Step 4:xcode project Setup <1>. Project code

AppDelegate.h inside the Code: #import # # # staticnsstring AppKey = @ "4fd48a0712a3fde75eb1c7423";//The official will provide it to you after the application is successful. Staticnsstring channel = @ "Publish channel"; Staticbool isproduction = FALSE; @interface Appdelegate:uiresponder # # # @property(strong,nonatomic) UIWindow *window; @end

<2>. The certificate configuration tutorial for Xcode

Follow the iOS SDK Integration Guide to integrate the Jpush SDK and upload a push-to-use P12 certificate before compiling to run the certificate, the steps are as follows: Open xxx-info.plist bundle identifier item upload to Jpush The bundle ID of the console is filled in:

<3> Click on Project, select target targets and go to build Setting interface, search "Code signing", follow configuration <4> client settings

To change the application's capabilities in Xcode to open remote notifications, refer to:

Step 5: Real-machine test <1> Login to Aurora push official website <2> Select app, which is the project you created the test: my project is AA. Testpush<3> Click to send Notifications

Click Send notification on the left, or you can select a custom message (here I choose to send a notification):

<4> Fill out push content

I'll write something here. Test with my phone:

<5> Click the Send now:<6> mobile display:<7> push history

=============================================================================================================== =============================================================================================================== =============================================================================================================== ======

Problems and workarounds that you may encounter during the test 1. "Not get devicetoken yet. Maybe:your certificate Not configured APNs? is the or current network isn't so good so APNs registration failed? Or there is no APNs register code? Refer to Jpush docs. "

Reason: Provision profile in my codesigning was not selected correctly because I modified the configuration at Apple's Dev center but didn't update to Xcode. Updates can be found in account management, Xcode menu on the Xcode->preferences->account tab, find your account in Apple IDs, click the View Detail button in the lower right corner, In the pop-up window, click the Refresh button in the lower left corner to refresh the latest provision profile. Finally, select the latest value in the provision profile in codesigning.

2. You can't receive push messages when you test your new iphone

Cause: Your profile does not contain a device for the new phone. To update your profile in the developer center. Add a new device. Then re-download the profile and double-click on Run Xcode

3. In the case of a real-time test, there is a sudden error, code signing is required for product type ' application ' in SDK ' IOS 9.1 '.

Cause: That means the code signing certificate is wrong

Solution 1. Select the project->build Settings, code Signing, code Signing Identity, Debug, any iOS SDK to change the option to: IPhone De Veloper

Solution 2. Re-download your certificate, or modify the wildcard character, or modify your AppID. Select Project-"Bundle Identifier modified to the latest AppID. The reason for this is that you have modified your App SDK version.

If not, you can try the menu under Edit Project Setting: Edit Active Target "Hello World" = "Build =" code Signing = "Any iOS value set to iphone De Veloper

4. Compile error could not find Developer Disk Image

Reason: Literally can't find the developer's disk image!! Probably means that Xcode7.1 does not support iOS9.2 workaround 1. Updated Xcode workaround 2. Download iOS9.2 profile Package, right-click to open Xcode display package contents, copy to your/contents/developer/platforms/iphoneos.platform/ Devicesupport This directory (it is important to note that after the configuration file is copied, the Xcode reboot and then compile, if not, you can try to restart the Mac, if normal, will re-scan the symbol file, to scan the completion, you can do the real machine debugging. )

Aurora pushes the demo test process, problems and workarounds that may be encountered during the test

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.