﻿{"id":1019,"date":"2012-11-12T13:57:55","date_gmt":"2012-11-12T05:57:55","guid":{"rendered":"http:\/\/nick.workao.org\/?p=1019"},"modified":"2012-11-12T13:57:55","modified_gmt":"2012-11-12T05:57:55","slug":"%e7%94%9f%e6%88%90apns-service%e8%af%81%e4%b9%a6%e7%9a%84%e6%ad%a5%e9%aa%a4","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/mac-os\/1019","title":{"rendered":"\u751f\u6210APNS Service\u8bc1\u4e66\u7684\u6b65\u9aa4"},"content":{"rendered":"<p>\u8981\u8fdb\u884c\u63a8\u9001\u670d\u52a1\u7684\u7b2c\u4e00\u4ef6\u4e8b\u5c31\u662f\u83b7\u53d6\u63a8\u9001\u8bc1\u4e66\u3002\u5b83\u7528\u6765\u5bf9\u4f60\u901a\u8fc7SSL\u4e0eAPNS\u901a\u8baf\u8fdb\u884c\u8bc6\u522b\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5728Mac\u4e0a\u751f\u6210 Apple\u63a8\u9001\u901a\u77e5SSL\u8bc1\u4e66\uff1a<\/p>\n<ol>\n    <li>\u767b\u5f55\u5230\u00a0<a href=\"http:\/\/developer.apple.com\/iphone\/manage\/overview\/index.action\">iPhone Developer Connection Portal<\/a>\u00a0\u5e76\u70b9\u51fb App IDs<\/li>\n    <li>\u521b\u5efa\u4e00\u4e2a\u4e0d\u4f7f\u7528\u901a\u914d\u7b26\u7684 App ID\u00a0\u3002\u901a\u914d\u7b26 ID \u4e0d\u80fd\u7528\u4e8e\u63a8\u9001\u901a\u77e5\u670d\u52a1\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u7684iPhone\u7a0b\u5e8fID\u50cf\u8fd9\u6837\uff1a\u00a0 AB123346CD.com.serverdensity.iphone<\/li>\n    <li>\u70b9\u51fbApp ID\u65c1\u7684\u201cConfigure\u201d\uff0c\u7136\u540e\u6309\u4e0b\u6309\u94ae\u751f\u4ea7\u00a0\u63a8\u9001\u901a\u77e5\u8bb8\u53ef\u8bc1\u3002\u6839\u636e\u201c\u5411\u5bfc\u201d\u6307\u5bfc\u7684\u6b65\u9aa4\u751f\u6210\u4e00\u4e2a\u7b7e\u540d\u5e76\u4e0a\u4f20\uff0c\u6700\u540e\u4e0b\u8f7d\u751f\u6210\u7684\u8bb8\u53ef\u8bc1\u3002\u6b64\u6b65\u9aa4\u5728\u00a0<a href=\"http:\/\/sckl.blog.sohu.com\/166505417.html#\">Apple\u6587\u6863\u4e2d<\/a>\u00a0\u4e5f\u6709\u8c08\u5230\u3002<\/li>\n    <li>\u901a\u8fc7\u53cc\u51fb.cer\u6587\u4ef6\u5c06\u4f60\u7684 aps_developer_identity.cer \u5f15\u5165Keychain\u4e2d\u3002<\/li>\n    <li>\u5728Mac\u4e0a\u542f\u52a8 Keychain\u52a9\u624b\uff0c\u7136\u540e\u5728login keychain\u4e2d\u9009\u62e9 Certificates\u5206\u7c7b\u3002\u4f60\u5c06\u770b\u5230\u4e00\u4e2a\u53ef\u6269\u5c55\u9009\u9879\u201cApple Development Push Services\u201d<\/li>\n    <li>\u6269\u5c55\u6b64\u9009\u9879\u7136\u540e\u53f3\u51fb\u201cApple Development Push Services\u201d > Export \u201cApple Development Push Services ID123\u201d\u3002\u4fdd\u5b58\u4e3a apns-dev-cert.p12 \u6587\u4ef6\u3002<\/li>\n    <li>\u6269\u5c55\u201cApple Development Push Services\u201d \u5bf9\u201cPrivate Key\u201d\u505a\u540c\u6837\u64cd\u4f5c\uff0c\u4fdd\u5b58\u4e3a apns-dev-key.p12 \u6587\u4ef6\u3002<\/li>\n    <li>\u9700\u8981\u901a\u8fc7\u7ec8\u7aef\u547d\u4ee4\u5c06\u8fd9\u4e9b\u6587\u4ef6\u8f6c\u6362\u4e3aPEM\u683c\u5f0f\uff1a\n<pre>openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12\nopenssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12<\/pre>\n<\/li>\n    <li>\u5982\u679c\u4f60\u60f3\u8981\u79fb\u9664\u5bc6\u7801\uff0c\u8981\u4e48\u5728\u5bfc\u51fa\/\u8f6c\u6362\u65f6\u4e0d\u8981\u8bbe\u5b9a\u6216\u8005\u6267\u884c\uff1a\n<pre>openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem<\/pre>\n<\/li>\n    <li>\u6700\u540e\uff0c\u4f60\u9700\u8981\u5c06\u952e\u548c\u8bb8\u53ef\u6587\u4ef6\u5408\u6210\u4e3aapns-dev.pem\u6587\u4ef6\uff0c\u6b64\u6587\u4ef6\u5728\u8fde\u63a5\u5230APNS\u65f6\u9700\u8981\u4f7f\u7528\uff1a\n<pre>cat apns-dev-cert.pem apns-dev-key-noenc.pem > apns-dev.pem<\/pre>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>\u5c06\u6b64\u6587\u4ef6\u4fdd\u5b58\u4e3a\u4e00\u4e2a\u6613\u8bb0\u7684\u540d\u5b57\uff0c\u4f60\u6709\u53ef\u80fd\u4ee5\u540e\u4f1a\u7528\u5230\u5b83\u3002\u4e0a\u8ff0\u6b65\u9aa4\u540c\u6837\u9002\u5408\u4e8e\u751f\u6210\u4ea7\u54c1\u8bc1\u4e66\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u8981\u8fdb\u884c\u63a8\u9001\u670d\u52a1\u7684\u7b2c\u4e00\u4ef6\u4e8b\u5c31\u662f\u83b7\u53d6\u63a8\u9001\u8bc1\u4e66\u3002\u5b83\u7528\u6765\u5bf9\u4f60\u901a\u8fc7SSL\u4e0eAPNS\u901a\u8baf\u8fdb\u884c\u8bc6\u522b\u3002 &nbsp; \u5728Mac\u4e0a\u751f\u6210 Apple\u63a8\u9001\u901a\u77e5SSL\u8bc1\u4e66\uff1a \u767b\u5f55\u5230\u00a0iPhone Developer Conn&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[340],"tags":[343,342,344],"class_list":["post-1019","post","type-post","status-publish","format-standard","hentry","category-mac-os","tag-apns","tag-mac","tag-344"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=1019"}],"version-history":[{"count":1,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1019\/revisions"}],"predecessor-version":[{"id":1020,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1019\/revisions\/1020"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=1019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=1019"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=1019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}