About the iOS message push feature

Source: Internet
Author: User
<span id="Label3"></p><p><p>Thanks to the guidance and selfless sharing of the great god, we have studied this recently because of the use of the iOS message Push. This article is mainly for the product release version of some of the problems of a comprehensive online some of the information according to their own practice, but the test can also be Seen.<br>How the push function works I'm not going to talk about it. there's a lot of information about push on the web, but there are a lot of them that don't know why, but the principle can be figured Out.<br>Attached here is an English post link http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12 Chinese translation/http article.ityran.com/archives/194</p></p><p><p>Key to implementing message pushes</p></p><p><p>1 Generating Keychain request problems it's best to regenerate the keychain request when you make a new app with push functionality save the picture as Chaos.<br>When you generate a keychain request, the CRS file must be kept, and more importantly, you'll get a couple of keys in the keychain when you generate the Keychain Request. it's important to note that the pair is just appearing.<br>The export of The. P12 file refers to the export file for the private key of the key that was just<br><br>2 must have a unique identifier The app ID cannot be used with wildcard Characters. But the same application test and release can use the same identifier.<br><br>3 APNs Address<br>Test Address gateway.sandbox.push.apple.com:2195<br>Post Address gateway.push.apple.com:2195<br>These two are different, of course the certificate is also<span style="font-size: large;"><strong><br></strong></span><br>4 Order</p></p><p><p>To be aware of the order problem, be sure to follow this order:</p></p><p><p>Generate keychain requests--configure Download Development certificate--configure app ID, configure, download SSL certificate-->provisioning certificate</p></p><p><p>Be sure to have this order key CRS file must match in the download release certificate must first put the published SSL certificate under the good otherwise the push succeeds the client will not receive the Problem.</p></p><p><p></p></p><p><span style="font-family: 宋体;"><span style="font-family: 宋体;">5 Real-machine Testing</span></span><br><span style="font-family: 宋体;"><span style="font-family: 宋体;">the development of the general we are using Xcode directly into the device at this time development certificate can be pushed successfully, but production certificate is not</span> able to push</span><br><span style="font-family: 宋体;"><span style="font-family: 宋体;">But Apple has provided us with ad hoc testing methods it uses a publishing certificate if you don't know the ad hoc mode you can search very simple</span></span><br><span style="font-family: 宋体;"><span style="font-family: 宋体;">Here's a key place where development and production get tokens that are not the same</span></span><br><span style="font-family: 宋体;"><span style="font-family: 宋体;">using ad hoc to install to the device is production token so you are testing with ad hoc mode to use production token</span></span><br><span style="font-family: 宋体;"><span style="font-family: 宋体;">If you use ad hoc mode test no problem This release is no Problem.</span></span><br><br><span style="font-family: 宋体;">another <span style="font-family: 宋体;">problem is that token will be updated this is mentioned in the official documentation that the Apple server may update the token of the device for a certain amount of time or if the machine does not appear regularly</span></span><br><span style="font-family: 宋体;"><span style="font-family: 宋体;">Here's A mechanism you need to solve this problem</span></span><br><span style="font-family: 宋体;"><span style="font-family: 宋体;">My solution is to update the application version and then periodically delete the server for a longer time token</span></span><br><span style="font-family: 宋体;"><span style="font-family: 宋体;">This will certainly cause some non-updating users to not receive the push issue but as long as he updates it immediately, no problem. it's a lazy way.</span></span><br><span style="font-family: 宋体;"><span style="font-family: 宋体;">because my application is only uploaded once when the program first opens, it will not be transmitted. this reduces the load</span> on the Server.</span><br><span style="font-family: 宋体;"><span style="font-family: 宋体;">but you're a push. frequent update service-side records are frequently used that's according to the Situation.</span></span></p><p><p>About the iOS message push feature</p></p></span>

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.