{"id":488,"date":"2016-03-17T13:13:43","date_gmt":"2016-03-17T13:13:43","guid":{"rendered":"c3c59e5f8b3e9753913f4d435b53c308"},"modified":"2016-03-17T13:13:43","modified_gmt":"2016-03-17T13:13:43","slug":"apns","status":"publish","type":"post","link":"https:\/\/www.xiaobo.li\/notes\/archives\/488","title":{"rendered":"APNS"},"content":{"rendered":"<p>1\u3001\u5b9e\u73b0provider\u5411APNS\u63a8\u9001\u6d88\u606f<\/p>\n<p>\u5728\u901a\u8fc7provider\u5411APNS\u53d1\u9001\u6d88\u606f\u4e4b\u524d\uff0c\u6211\u4eec\u9996\u5148\u9700\u8981\u4e86\u89e3\u9700\u8981\u53d1\u9001\u7684\u683c\u5f0f\uff0cAPNS\u7684\u4fe1\u606f\u7ed3\u6784\u5305\u5982\u4e0b\u56fe\uff1a<br \/>\n<a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201603\/59b21458198252.png\" id=\"ematt:385\"><img loading=\"lazy\" decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201603\/59b21458198252.png\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" width=\"573\" height=\"91\" border=\"0\" \/><\/a><\/p>\n<p>\n\u4e0a\u56fe\u663e\u793a\u7684\u8fd9\u4e2a\u6d88\u606f\u4f53\u5c31\u662f\u6211\u4eec\u7684\u670d\u52a1\u5668\uff08Provider\uff09\u53d1\u9001\u7ed9APNS\u670d\u52a1\u5668\u7684\u6d88\u606f\u7ed3\u6784\uff0cAPNS\u9a8c\u8bc1\u8fd9\u4e2a\u7ed3\u6784\u6b63\u786e\u5e76\u63d0\u53d6\u5176\u4e2d\u7684\u4fe1\u606f\u540e\uff0c\u518d\u5c06\u6d88\u606f\u63a8\u9001\u5230\u6307\u5b9a\u7684\u8bbe\u5907\u3002\u8fd9\u4e2a\u7ed3\u6784\u4f53\u5305\u62ec\u4e03\u4e2a\u90e8\u5206:<\/p>\n<p>\u7b2c\u4e00\u4e2a\u90e8\u5206\u662f\u547d\u4ee4\u6807\u793a\u7b26;<\/p>\n<p>\u7b2c\u4e8c\u90e8\u5206\u662f\u4e00\u4e2a\u8868\u793a\u8fd9\u4e2a\u901a\u77e5\u7684\u4e00\u4e2a\u8868\u793a\u4f4d\uff0c\u5982\u679capns\u4e0d\u80fd\u89e3\u91ca\u8be5\u901a\u77e5\uff0c\u5c31\u8fd4\u56de\u4e00\u4e2a\u9519\u8bef\u5305\uff1b<\/p>\n<p>\u7b2c\u4e09\u90e8\u5206\u662f\u4e00\u4e2a\u4ee5\u79d2\u6807\u8bc6\u7684\u65f6\u95f4\u503c\uff0c\u5b83\u6807\u8bc6\u901a\u77e5\u662f\u5426\u6709\u6548\uff0c\u6807\u8bc6\u7684\u901a\u77e5\u65f6\u95f4\u4e0eUNIX\u4e4b\u5dee\u4e0e\u5f53\u524d\u65f6\u95f4\u4e0eUNIX\u65f6\u95f4\u4e4b\u5dee\uff0c\u5982\u679c\u5927\u4e8e\u96f6\uff0cAPNS\u6700\u5c11\u901a\u77e5\u4e00\u6b21\uff0c\u5982\u679c\u5c0f\u4e8e\u540c\u4e8e\u96f6APNS\u4e0d\u5728\u5b58\u50a8\u901a\u77e5\uff08\u7f51\u7edc\u5b57\u8282\u987a\u5e8f\uff09\u3002<\/p>\n<p>\u7b2c\u56db\u4e2a\u90e8\u5206\u662f\u6211\u4eec\u7684device_token\u7684\u957f\u5ea6\uff0c<\/p>\n<p>\u7b2c\u4e94\u90e8\u5206\u662f\u6211\u4eec\u7684device_token\u5b57\u7b26\u4e32\uff0c<\/p>\n<p>\u7b2c\u516d\u90e8\u5206\u662f\u63a8\u9001\u6d88\u606f\u4f53\uff08Payload\uff09\u7684\u957f\u5ea6\uff0c<\/p>\n<p>\u6700\u540e\u4e00\u90e8\u5206\u4e5f\u5c31\u662f\u771f\u6b63\u7684\u6d88\u606f\u5185\u5bb9\u4e86\uff0c\u91cc\u9762\u5305\u542b\u4e86\u63a8\u9001\u6d88\u606f\u7684\u57fa\u672c\u4fe1\u606f\uff0c\u6bd4\u5982\u6d88\u606f\u5185\u5bb9\uff0c\u5e94\u7528Icon\u53f3\u4e0a\u89d2\u663e\u793a\u591a\u5c11\u6570\u5b57\u4ee5\u53ca\u63a8\u9001\u6d88\u606f\u5230\u8fbe\u65f6\u6240\u64ad\u653e\u7684\u58f0\u97f3\u7b49\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u6211\u4eec\u62c6\u89e3\u770b\u4e00\u4e0bPayload\uff08\u6d88\u606f\u4f53\uff09\u7684\u7ed3\u6784\uff1a<\/p>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201603\/9eb61458198252.png\" id=\"ematt:386\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201603\/9eb61458198252.png\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" \/><\/a><\/p>\n<p>\u8fd9\u5176\u5b9e\u5c31\u662f\u4e2aJSON\u7ed3\u6784\u4f53\uff0calert\u6807\u7b7e\u7684\u5185\u5bb9\u5c31\u662f\u4f1a\u663e\u793a\u5728\u7528\u6237\u624b\u673a\u4e0a\u7684\u63a8\u9001\u4fe1\u606f\uff0cbadge\u663e\u793a\u7684\u6570\u91cf\uff08\u6ce8\u610f\u662f\u6574\u578b\uff09\u662f\u4f1a\u5728\u5e94\u7528Icon\u53f3\u4e0a\u89d2\u663e\u793a\u7684\u6570\u91cf\uff0c\u63d0\u793a\u6709\u591a\u5c11\u6761\u672a\u8bfb\u6d88\u606f\u7b49\uff0csound\u5c31\u662f\u5f53\u63a8\u9001\u4fe1\u606f\u9001\u8fbe\u662f\u624b\u673a\u64ad\u653e\u7684\u58f0\u97f3\uff0c\u4f20defalut\u5c31\u6807\u660e\u4f7f\u7528\u7cfb\u7edf\u9ed8\u8ba4\u58f0\u97f3\uff0c\u5982\u679c\u4f20\u6bd4\u5982\u201cbeep.wav\u201d\u5c31\u4f1a\u64ad\u653e\u5728\u6211\u4eec\u5e94\u7528\u5de5\u7a0b\u76ee\u5f55\u4e0b\u540d\u79f0\u4e3abeep.wav\u7684\u97f3\u9891\u6587\u4ef6\uff0c\u6bd4\u5982\u5f53\u624b\u673a\u9501\u5c4f\u65f6QQ\u5728\u540e\u53f0\u6536\u5230\u65b0\u6d88\u606f\u65f6\u7684\u6ef4\u6ef4\u58f0\u3002<\/p>\n<p>provider\u901a\u8fc7APNS\u63d0\u4f9b\u7684\u63a5\u53e3\uff0c\u901a\u8fc7Socket\u8fdb\u884c\u5f02\u6b65\u901a\u4fe1\uff0c<\/p>\n<p>\u5728Production\u73af\u5883\u4e0b\u9762\u901a\u8fc7gateway.push.apple.com,\u7aef\u53e3\uff1a2195<\/p>\n<p>\u5728Development\u73af\u5883\u4e0b\u901a\u8fc7gateway.sandbox.push.apple.com \u7aef\u53e3\uff1a2195<\/p>\n<p>Provider\u53ef\u4ee5\u5efa\u7acb\u591a\u4e2a\u4e0eAPNs\u7684\u8fde\u63a5\u3002\u6bcf\u4e2a\u90fd\u5f97\u7528TLS(or SSL)\u6765\u5efa\u7acb\u5b89\u5168\u901a\u9053\uff0c\u9700\u8981\u7528\u5230SSL\u8bc1\u4e66\uff08\u5c31\u662f\u4e0a\u9762\u63d0\u5230\u7684provider\u8fde\u63a5APNs\u8981\u7528\u5230\u7684SSL\u8bc1\u4e66\uff09\u3002<\/p>\n<p>\u53d1\u9001\u6d88\u606f\u7684\u4e8c\u8fdb\u5236\u63a5\u53e3\u548c\u6d88\u606f\u7684\u6570\u636e\u5305\u683c\u5f0f<\/p>\n<p>\u6d88\u606f\u987b\u662f\u7f51\u7edc\u5b57\u8282\u987a\u5e8f(\u5373\u5927\u5c3e\u987a\u5e8f),\u6d88\u606f\u91cc\u9762\u7684payload\u90e8\u5206\u4e0d\u53ef\u4ee5\u8d85\u8fc7256\u5b57\u8282\uff0c\u4e14\u4e0d\u5f97\u4ee5'\\0'\u7ed3\u5c3e\u3002<\/p>\n<p>\u6709\u8fd9\u4e48\u4e00\u79cd\u60c5\u51b5\uff0c\u5f53\u6211\u4eec\u5c06\u5e94\u7528\u4ece\u8bbe\u5907\u5378\u8f7d\u540e\uff0c\u63a8\u9001\u7684\u6d88\u606f\u6539\u5982\u4f55\u5904\u7406\u5462\u3002\u6211\u4eec\u77e5\u9053\uff0c\u5f53\u6211\u4eec\u5c06\u5e94\u7528\u4ece\u8bbe\u5907\u5378\u8f7d\u540e\uff0c\u6211\u4eec\u662f\u6536\u4e0d\u5230Provider\u7ed9\u6211\u4eec\u63a8\u9001\u7684\u6d88\u606f\u7684\uff0c\u4f46\u662f\uff0c\u5982\u4f55\u8ba9APNS\u548cProvider\u90fd\u77e5\u9053\u4e0d\u53bb\u5411\u8fd9\u53f0\u5378\u8f7d\u4e86\u5e94\u7528\u7684\u8bbe\u5907\u63a8\u9001\u6d88\u606f\u5462\uff1f\u9488\u5bf9\u8fd9\u4e2a\u95ee\u9898\uff0c\u82f9\u679c\u4e5f\u5df2\u7ecf\u5e2e\u6211\u4eec\u89e3\u51b3\u4e86\uff0c\u90a3\u5c31\u662fFeedback<br \/>\nservice\u3002\u4ed6\u662fAPNS\u7684\u4e00\u90e8\u5206\uff0cAPNS\u4f1a\u6301\u7eed\u7684\u66f4\u65b0Feedback service\u7684\u5217\u8868\uff0c\u5f53\u6211\u4eec\u7684Provider\u5c06\u4fe1\u606f\u53d1\u7ed9APNS\u63a8\u9001\u5230\u6211\u4eec\u7684\u8bbe\u5907\u65f6\uff0c\u5982\u679c\u8fd9\u65f6\u8bbe\u5907\u65e0\u6cd5\u5c06\u6d88\u606f\u63a8\u9001\u5230\u6307\u5b9a\u7684\u5e94\u7528\uff0c\u5c31\u4f1a\u5411APNS\u670d\u52a1\u5668\u62a5\u544a\u4e00\u4e2a\u53cd\u9988\u4fe1\u606f\uff0c\u800c\u8fd9\u4e2a\u4fe1\u606f\u5c31\u8bb0\u5f55\u5728feedback service\u4e2d\u3002\u6309\u7167\u8fd9\u79cd\u65b9\u5f0f\uff0cProvider\u5e94\u8be5\u5b9a\u65f6\u7684\u53bb\u68c0\u6d4bFeedback service\u7684\u5217\u8868\uff0c\u7136\u540e\u5220\u9664\u5728\u81ea\u5df1\u6570\u636e\u5e93\u4e2d\u8bb0\u5f55\u7684\u5b58\u5728\u4e8e\u53cd\u9988\u5217\u8868\u4e2d\u7684device_token\uff0c\u4ece\u800c\u4e0d\u518d\u5411\u8fd9\u4e9b\u8bbe\u5907\u53d1\u9001\u63a8\u9001\u4fe1\u606f\u3002\u8fde\u63a5Feedback service\u7684\u8fc7\u7a0b\u540c\u6837\u4f7f\u7528Socket\u7684\u65b9\u5f0f\uff0c\u8fde\u63a5\u4e0a\u540e\uff0c\u76f4\u63a5\u63a5\u6536\u7531APNS\u4f20\u8f93\u7ed9\u6211\u4eec\u7684\u53cd\u9988\u5217\u8868\uff0c\u4f20\u8f93\u5b8c\u6210\u540e\u65ad\u5f00\u8fde\u63a5\uff0c\u7136\u540e\u6211\u4eec\u6839\u636e\u8fd9\u4e2a\u6700\u65b0\u7684\u53cd\u9988\u5217\u8868\u5728\u66f4\u65b0\u6211\u4eec\u81ea\u5df1\u7684\u6570\u636e\u5e93\uff0c\u5220\u9664\u90a3\u4e9b\u4e0d\u518d\u9700\u8981\u63a8\u9001\u4fe1\u606f\u7684\u8bbe\u5907\u7684device_token\u3002\u4eceFeedback<br \/>\nservice\u8bfb\u53d6\u7684\u6570\u636e\u7ed3\u6784\u5982\u4e0b\uff1a<br \/>\n<a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201603\/c00b1458198252.png\" id=\"ematt:387\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201603\/c00b1458198252.png\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" \/><\/a><\/p>\n<p>\n\u7ed3\u6784\u4e2d\u5305\u542b\u4e09\u4e2a\u90e8\u5206\uff0c\u7b2c\u4e00\u90e8\u5206\u662f\u4e00\u4e2a\u65f6\u95f4\u6233\uff0c\u8bb0\u5f55\u7684\u662f\u8bbe\u5907\u5931\u6548\u540e\u7684\u65f6\u95f4\u4fe1\u606f\uff0c\u7b2c\u4e8c\u4e2a\u90e8\u5206\u662fdevice_token\u7684\u957f\u5ea6\uff0c\u7b2c\u4e09\u90e8\u5206\u5c31\u662f\u5931\u6548\u7684device_token\uff0c\u6211\u4eec\u6240\u8981\u83b7\u53d6\u7684\u5c31\u662f\u7b2c\u4e09\u90e8\u5206\uff0c\u8ddf\u6211\u4eec\u7684\u6570\u636e\u5e93\u8fdb\u884c\u5bf9\u6bd4\u540e\uff0c\u5220\u9664\u5bf9\u5e94\u7684device_token\uff0c\u4e0b\u6b21\u4e0d\u518d\u5411\u8fd9\u4e9b\u8bbe\u5907\u53d1\u9001\u63a8\u9001\u4fe1\u606f\u3002<\/p>\n<p>The Feedback Service<\/p>\n<p>feedback service\u5305\u542b\u4e86\u8fd9\u6837\u7684\u5217\u8868\uff1a\u67d0iOS\u5e94\u7528\u7a0b\u5e8f\u5bf9\u5e94\u7684\"\u8bbe\u5907\"(\"\u8bbe\u5907\"\u7528\u4e8c\u8fdb\u5236\u683c\u5f0f\u7684\u8bbe\u5907token\u6765\u6807\u8bc6)\u3002--\u8fd9\u4e9b\u8bbe\u5907\u662f\u7531\u4e8e\u5404\u79cd\u539f\u56e0\u800c\u4e0d\u80fd\u63a5\u6536APNs\u53d1\u6765\u7684\u6d88\u606f\u3002<\/p>\n<p>Provider\u5e94\u8be5\u5b9a\u671f\u67e5\u8be2\u8fd9\u4e2a\u5217\u8868\uff0c\u5e76\u4e14\u4f5c\u51fa\u5bf9\u5e94\u5904\u7406\uff0c\u5982:\u505c\u6b62\u5411\u8fd9\u4e9b\u7684\u8bbe\u5907\u53d1\u9001\u6d88\u606f\u3002<\/p>\n<p>provider\u8bbf\u95eefeedback server\u901a\u8fc7\u4e00\u4e2a\u4e0e\u53d1\u9001\u6d88\u606f\u7c7b\u4f3c\u7684\u4e8c\u8fdb\u5236\u63a5\u53e3\u3002<\/p>\n<p>Production\u73af\u5883\u901a\u8fc7feedback.push.apple.com:2196\u6765\u5efa\u7acb\u8fde\u63a5\uff0cDevelopment\u901a\u8fc7feedback.sandbox.push.apple.com:2196\u3002<\/p>\n<p>feedback service\u548c\u53d1\u9001\u6d88\u606f\u662f\u4e0d\u540c\u7684\u670d\u52a1\u63a5\u53e3(\u4f46\u90fd\u5c5e\u4e8eAPNs)\uff0c\u4ed6\u7684\u8fde\u63a5\u65b9\u5f0f\u548c\u53d1\u9001\u6d88\u606f\u662f\u4e00\u6837\u7684\u3002\u4e5f\u8981\u901a\u8fc7\u8bc1\u4e66\u5efa\u7acbSSL\u8fde\u63a5\uff0c\u8fde\u63a5\u540e\u4f60\u4e0d\u9700\u8981\u53d1\u9001\u4efb\u4f55\u547d\u4ee4\uff0c\u76f4\u63a5\u5f00\u59cb\u8bfb\u53d6\u6d41\u4e00\u76f4\u8bfb\u5b8c\u4e3a\u6b62\uff0c\u7136\u540eprovider\u8981\u89e3\u6790\u8bfb\u5230\u7684\u6570\u636e\u3002<\/p>\n<p>\u6570\u636e\u662f\u7531\u591a\u4e2a\u8fd9\u6837\u7684\u683c\u5f0f\u7ec4\u6210\u7684\uff1a<\/p>\n<p>| \u56db\u5b57\u8282\u65f6\u95f4 | 2\u5b57\u8282\u7684token \u957f\u5ea6 | 32\u5b57\u8282\u7684\u8bbe\u5907token |<\/p>\n<p>\u5173 \u4e8e\"\u56db\u5b57\u8282\u65f6\u95f4\"\uff1aProvider\u9700\u8981\u5224\u65ad\u5bf9\u5e94\u8bbe\u5907\u7684\u8fd9\u4e2aiOS\u5e94\u7528\u7a0b\u5e8f\u6709\u6ca1\u6709\u5728\u8be5\u65f6\u95f4\u4e4b\u540e\u91cd\u65b0\u50cfprovider\u53d1\u9001\u6ce8\u518c\u63a8\u9001\u6d88\u606f\u6240\u83b7\u5f97\u7684\u8bbe\u5907 token\u3002\u5982\u679c\u6ca1\u6709\uff0c\u5c31\u8ba4\u4e3a\u8be5\u8bbe\u5907\u5931\u6548\u4e86\uff0c\u9700\u505c\u6b62\u5411\u8be5\u8bbe\u5907\u53d1\u9001\u6d88\u606f\u3002\u5982\u679c\u6709\uff0c\u90a3\u5c31\u662f\u8fd9\u4e2a\u8bbe\u5907\u5931\u6548\u8fc7\uff0c\u4f46\u662f\u73b0\u5728\u53c8\u6709\u6548\u4e86\uff0c\u53ea\u662ffeedback service\u8fd8\u6ca1\u6765\u5f97\u53ca\u5237\u65b0\u5217\u8868\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><b>\u7b80\u5355\u901a\u77e5\u62a5\u6587<\/b><\/p>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201603\/ea571458191774.jpeg\" id=\"ematt:381\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201603\/ea571458191774.jpeg\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u6700\u524d\u97621\u4e2a\u5b57\u8282\u662f\u547d\u4ee4\u7c7b\u578b\uff0c2-3\u5b57\u8282\u662fDeviceToken\u7684\u957f\u5ea6\uff0c\u540e\u9762\u662fDeviceToken\u7684\u5177\u4f53\u503c\uff0c\u540e\u9762\u662f\u6d88\u606f\u7684\u957f\u5ea6\u548c\u6d88\u606f\u7684\u5177\u4f53\u5185\u5bb9\u3002\u53d1\u5b8c\u6d88\u606f\u540e\uff0c\u5728\u5173\u95edSocket\u524d\u8fd8\u53ef\u4ee5\u67e5\u770b\u9519\u8bef\u7684\u54cd\u5e94\uff0c\u4ee5\u4fbf\u786e\u8ba4\u6d88\u606f\u662f\u5426\u6210\u529f\u5730\u53d1\u7ed9APNS\uff0c\u9519\u8bef\u54cd\u5e94\u7684\u62a5\u6587\u5982\u4e0b\uff1a<\/p>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201603\/18281458191774.jpeg\" id=\"ematt:382\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201603\/18281458191774.jpeg\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" \/><\/a><\/p>\n<p>\u547d\u4ee4\u4e3a8\u7684\u8868\u793a\u662f\u9519\u8bef\u54cd\u5e94\u7684\u62a5\u6587\uff0cStatus\u662f\u9519\u8bef\u7801\uff0cIdentifier\u662f\u7528\u4e8e\u5b9a\u4f4d\u5177\u4f53\u7684\u54ea\u6761\u63a8\u9001\u6d88\u606f\uff0c\u8fd9\u4e2a\u662f\u589e\u5f3a\u578b\u901a\u77e5\u91cc\u7684\u4f20\u5165\u7684\u503c\uff0c\u9996\u5148\u770b\u4e0b\u82f9\u679c\u90fd\u6709\u54ea\u4e9b\u8fd4\u56de\u9519\u8bef\u7801\uff1a<\/p>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201603\/09dd1458191774.png\" id=\"ematt:383\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201603\/09dd1458191774.png\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><b>\u589e\u5f3a\u578b\u901a\u77e5\u62a5\u6587\uff08\u4f20\u5165Identifier\uff09\uff1a<\/b><\/p>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201603\/ddf91458191774.jpeg\" id=\"ematt:384\"><img loading=\"lazy\" decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201603\/ddf91458191774.jpeg\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" width=\"568\" height=\"106\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Figure 5-1&nbsp; Notification format<\/p>\n<p>The first byte in the notification format is a command value of 1. The remaining fields are as follows:<\/p>\n<p>&nbsp;&nbsp;&nbsp; Identifier\u2014An arbitrary value that identifies this notification. This same identifier is returned in a error-response packet if APNs cannot interpret a notification.<\/p>\n<p>&nbsp;&nbsp;&nbsp; Expiry\u2014A fixed UNIX epoch date expressed in seconds (UTC) that identifies when the notification is no longer valid and can be discarded. The expiry value uses network byte order (big endian). If the expiry value is positive, APNs tries to deliver the notification at least once. Specify zero (or a value less than zero) to request that APNs not store the notification at all.<\/p>\n<p>&nbsp;&nbsp;&nbsp; Token length\u2014The length of the device token in network order (that is, big endian)<\/p>\n<p>&nbsp;&nbsp;&nbsp; Device token\u2014The device token in binary form.<\/p>\n<p>&nbsp;&nbsp;&nbsp; Payload length\u2014The length of the payload in network order (that is, big endian). The payload must not exceed 256 bytes and must not be null-terminated.<\/p>\n<\/p>\n<p>&nbsp;<\/p>\n<p><b>\u6279\u91cf\u53d1\u9001<\/b><\/p>\n<p>\u5e94\u4f7f\u7528\u957f\u8fde\u63a5\uff0c\u4e00\u6b21\u8fde\u63a5\u53d1\u9001\u591a\u6761\u6570\u636e<\/p>\n<p>\u4ee5\u4e0b\u90e8\u4efd\u5185\u5bb9\u6458\u81ea\uff1a http:\/\/blog.csdn.net\/tlq1988\/article\/details\/9612237<\/p>\n<table style=\"width:100%;background-color:#CCCCCC;\" class=\"ke-zeroborder\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#000000\" border=\"0\">\n<tbody>\n<tr>\n<td>&nbsp;$pass = ''; \/\/ $pass\u662f\u4f60\u5728\u5efa\u7acb\u8bc1\u4e66\u7684\u65f6\u5019\u8f93\u5165\u7684\u5bc6\u7801<br \/>\n$ctx = stream_context_create();<br \/>\n\/\/ apns.pem\u5c31\u662f\u4f60\u7684\u8bc1\u4e66\u7684\u8def\u5f84\u4e86\uff0c\u6700\u597d\u5199\u7edd\u5bf9\u8def\u5f84<br \/>\nstream_context_set_option($ctx, 'ssl', 'local_cert', 'apns.pem');<br \/>\nstream_context_set_option($ctx, 'ssl', 'passphrase', $pass);<br \/>\n$fp = stream_socket_client('ssl:\/\/gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);<br \/>\nif(!$fp) {<br \/>\n&nbsp;&nbsp;&nbsp; print \"Failed to connect $err $errstr\";<br \/>\n&nbsp;&nbsp;&nbsp; exit();<br \/>\n} else {<br \/>\n&nbsp;&nbsp;&nbsp; print \"Connection OK\\n\";<br \/>\n}<br \/>\n$body = array('aps' =&gt; array('badge' =&gt; 1));<br \/>\nfor($i = 0; $i &lt;= 10000; $i++) {<br \/>\n&nbsp;&nbsp;&nbsp; $deviceToken = md5(time() . rand(0, 9999999)) . md5(time() . rand(0, 9999999)); \/\/ \u6a21\u62df\u4e00\u4e2aDevice Token<br \/>\n&nbsp;&nbsp;&nbsp; $body['aps']['alert'] = md5(time() . rand(0, 9999999)); \/\/ \u968f\u4fbf\u6a21\u62df\u70b9\u6570\u636e<br \/>\n&nbsp;&nbsp;&nbsp; $payload = json_encode($body);<br \/>\n&nbsp;&nbsp;&nbsp; \/\/ \u8fd9\u91cc\u662f\u7b80\u5355\u7684\u6d88\u606f\u7ed3\u6784\uff0c\u5982\u679c\u60f3\u591a\u53d1\u51e0\u4e2a\u4f46\u662f\u4e0d\u8981\u8fd4\u56de\u9519\u8bef\uff0c\u53ef\u4ee5\u7528\u8fd9\u4e2a<br \/>\n&nbsp;&nbsp;&nbsp; \/*<br \/>\n&nbsp;&nbsp;&nbsp; $msg = chr(0) . pack(\"n\", 32)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . pack('H*', str_replace(' ', '', $deviceToken))<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . pack(\"n\", strlen($payload)) . $payload;<br \/>\n&nbsp;&nbsp;&nbsp; *\/<br \/>\n&nbsp;&nbsp;&nbsp; \/\/ \u8fd9\u4e2a\u662f\u589e\u5f3a\u578b\u6d88\u606f\u683c\u5f0f\uff0c$i\u5c31\u662fIdentifier\uff0c864000\u5c31\u662fExpiry\u4e86<br \/>\n&nbsp;&nbsp;&nbsp; $msg = pack('CNNnH*', self::COMMAND_PUSH, $i, 864000, 32, $deviceToken)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . pack('n', strlen($payload))<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . $payload;<br \/>\n&nbsp;&nbsp;&nbsp; print \"sending message :\" . $payload . \"\\n\";<br \/>\n&nbsp;&nbsp;&nbsp; fwrite($fp, $msg);<br \/>\n&nbsp;&nbsp;&nbsp; \/\/ \u8fd9\u91cc\u662f\u8bfb\u53d6\u9519\u8bef\u4fe1\u606f\uff0c\u4e0d\u8981\u6ca1\u53d1\u4e00\u6761\u5c31\u8bfb\u53d6\u4e00\u6b21\uff0c\u8fd9\u6837\u82f9\u679c\u4f1a\u8ba4\u4e3a\u653b\u51fb\u800c\u7ec8\u6b62\u8fde\u63a5<br \/>\n&nbsp;&nbsp;&nbsp; \/\/fread($fp, 6);<br \/>\n}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Broken Pipe\uff0c<\/strong>\u5982\u679c\u4f60\u6709\u8fc7\u5927\u91cf\u7684\u6570\u636e\u63a8\u9001\uff0c\u5e76\u4e14\u770b\u4e0b\u4f60\u7684\u9519\u8bef\u65e5\u5fd7\u90a3\u4e48Writen&nbsp;Broken Pipe\u4f60\u4e00\u5b9a\u4e0d\u964c\u751f\u3002\u8fd9\u4e2a\u9519\u8bef\u4ea7\u751f\u7684\u539f\u56e0\u901a\u5e38\u662f\u5f53\u7ba1\u9053\u8bfb\u7aef\u6ca1\u6709\u5728\u8bfb\uff0c\u800c\u7ba1\u9053\u7684\u5199\u7aef\u7ee7\u7eed\u6709\u7ebf\u7a0b\u5728\u5199\uff0c\u5c31\u4f1a\u9020\u6210\u7ba1\u9053\u4e2d\u65ad\u3002\u53ef\u4ee5\u7b80\u5355\u7684\u7406\u89e3\u4e3a\u4f60\u5728\u5411\u4e00\u4e2a\u5df2\u7ecf\u5173\u95ed\u7684\u8fde\u63a5\u5199\u6570\u636e\u5c31\u4f1a\u629b\u51fa\u8fd9\u4e2a\u9519\u8bef\u3002<\/p>\n<p>&nbsp; &nbsp; \u7531\u4e8eBroken<br \/>\nPipe\u7684\u5173\u7cfb\uff0c\u6211\u4eec\u4e0d\u5f97\u4e0d\u91cd\u65b0\u548c\u82f9\u679c\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\uff0c\u8fd9\u4e2a\u8fde\u63a5\u8017\u65f6\u5728\u56fd\u5185.....\uff08\u4f60\u4eec\u61c2\u76843sec+\uff09\uff0c\u8fd9\u4e2a\u5e94\u8be5\u662f\u6211\u4eec\u63a8\u9001\u901f\u5ea6\u6700\u5927\u7684\u74f6\u9888\u4e86\u3002\u6709\u5f88<br \/>\n\u591a\u5f00\u53d1\u8005\u4e5f\u8bb8\u4f1a\u8ba4\u4e3a\u8fd9\u4e2a\u662f\u7531\u4e8e\u56fd\u5185\u7684\u7f51\u7edc\u73af\u5883\u5bfc\u81f4\uff0c\u56e0\u4e3a\u4ed6\u4eec\u4e60\u60ef\u7684\u201ctraceroute<br \/>\ngateway.push.apple.com\u201d\u4e00\u4e0b\uff0c\u7136\u540e\u53d1\u73b030+\u7684\u8def\u7531\u8df3\u8f6c\b\u7136\u540e\u5c31\u4f1a\u8bf4\u8fd9\u4e2a<strong>\u65ad\u5f00\u662f\u65e0\u6cd5\u907f\u514d\u7684<\/strong>\u3002\u5982\u679c\u4f60\u8fd9\u4e48\u60f3\u90a3\u4e48<strong><span style=\"color:#ff0000;\">\u4f60\u5c31\u9519\u4e86<\/span><\/strong>\u3002<\/p>\n<p>&nbsp; &nbsp; \u6211\u4eec\u7528\u5927\u91cf\uff0810W\u5de6\u53f3\uff09\u80fd\u4fdd\u8bc1\u57fa\u672c\u6b63\u786e\u7684Device Token\u6765\u505a\u6d4b\u8bd5\uff0c\u5e73\u5747\u4e00\u6b21\u8fde\u63a5\u7684\u80fd\u5199\u51653W\u5de6\u53f3\u7684\u6570\u636e\uff0c\u597d\u7684\u60c5\u51b5\u4e0b\u80fd\u4e00\u6b21\u5199\u5b8c\u8fd910W\u6570\u636e\uff01\uff01\uff01\u8fd9\u4e2a\u6d4b\u8bd5\u4e5f\u5c31\u8bc1\u660e<span style=\"color:#ff00;\">\u5e73\u51e1\u51fa\u73b0Broken Pipe\u4e0d\u662f\u7531\u4e8e\u7f51\u7edc\u539f\u56e0\u3002<\/span>\u65e2\u7136\u4e0d\u662f\u7531\u4e8e\u7f51\u7edc\u539f\u56e0\uff0c\u90a3\u4e48\u6211\u505a\u4e2a\u5927\u80c6\u7684\u5047\u8bbe\uff1a\u8fd9\u4e2a<span style=\"color:#ff0000;\"><strong>\u8fde\u63a5\u662f\u7531APNs\u4e3b\u52a8\u65ad\u5f00\u7684<\/strong><\/span>\u3002<\/p>\n<p>&nbsp; &nbsp;<br \/>\n\u90a3\u4e48\u5047\u8bbe\u8fd9\u4e2a\u731c\u60f3\u662f\u6b63\u786e\u7684\uff0c\u90a3\u82f9\u679c\u4ec0\u4e48\u65f6\u5019\u4f1a\u65ad\u5f00\u8fde\u63a5\u4e86\uff1f\u89e3\u91ca\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u53c8\u505a\u4e86\u4e00\u4e2a\u6d4b\u8bd5\uff1a\u5f80\u8fd910W\u7684Device<br \/>\nToken\u91cc\u9762\u5747\u5300\u63d2\u51651000\u4e2a\u9519\u8bef\u7684Device<br \/>\nToken\u3002\u795e\u5947\u7684\u4e8b\u60c5\u53d1\u751f\u4e86\uff0c\u53d1\u9001\u671f\u95f4\u5e73\u5747\u65ad\u5f00\u8fde\u63a5900\u6b21+\u3002\u8fd9\u4e2a\u5b9e\u9a8c\u6b63\u597d\u9a8c\u8bc1\u4e86\u6211\u4e4b\u524d\u7684\u731c\u6d4b\uff1a<strong><span style=\"color:#ff0000;\">\u4ea7\u751fBroken Pipe\u662f\u56e0\u4e3aAPNs\u670d\u52a1\u5668\u4e3b\u52a8\u65ad\u5f00\u4e86\u8fde\u63a5\uff0c\u5e76\u4e14\u662f\u7531\u4e8e\u9519\u8bef\u7684Device Token\u5f15\u8d77\u7684\uff08\u6216\u8005\u5176\u4ed6\u7684\u9519\u8bef\uff09<\/span><\/strong>\u3002\u82f9\u679c\u7684\u9519\u8bef\u7c7b\u578b\u548c\u4ee3\u7801\u7f16\u53f7\uff1a<\/p>\n<p style=\"margin-left:auto;margin-right:auto;\">\n<table class=\"graybox ke-zeroborder\" style=\"border-top-width:1px;border-top-style:solid;border-top-color:#9bb3cd;border-left-width:1px;border-left-style:solid;border-left-color:#9bb3cd;margin-bottom:4em;color:#000000;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;font-size:12px;\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\">\n<tbody>\n<tr>\n<th scope=\"col\" class=\"TableHeading_TableRow_TableCell\" style=\"text-align:left;font-weight:400;background-color:#93a5bb;padding:0.3em 0.667em;font-size:13px;color:#ffffff;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0.33em;font-weight:700;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nStatus code<\/p>\n<\/th>\n<th scope=\"col\" class=\"TableHeading_TableRow_TableCell\" style=\"text-align:left;font-weight:400;background-color:#93a5bb;padding:0.3em 0.667em;font-size:13px;color:#ffffff;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0.33em;font-weight:700;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nDescription<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n0<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nNo errors encountered<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n1<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nProcessing error<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n2<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nMissing device token<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n3<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nMissing topic<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n4<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nMissing payload<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n5<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nInvalid token size<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n6<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nInvalid topic size<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n7<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nInvalid payload size<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n8<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nInvalid token<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n10<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nShutdown<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\" style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\n255<\/p>\n<\/td>\n<td style=\"padding:0.667em;font-size:13px;vertical-align:middle;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#9bb3cd;border-right-width:1px;border-right-style:solid;border-right-color:#9bb3cd;\">\n<p style=\"margin-top:0px;margin-bottom:0px;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;\">\nNone (unknown)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp; &nbsp; \u6211\u4eec\u8fdb\u4e00\u6b65\u8ddf\u8fdb\u6d4b\u8bd5\uff0c\u6211\u4eec\u53d1\u73b0\u4e00\u4e2a\u5947\u602a\u7684\u73b0\u8c61\uff0c<span style=\"color:#ff00;\">\u65ad\u5f00\u8fde\u63a5\u7684\u65f6\u7684\u524d\u4e00\u4e2aToken\u5e76\u4e0d\u662f\u6211\u4eec\u6240\u7279\u610f\u8bbe\u7f6e\u7684\u9519\u8befToken<\/span>\u3002\u540c\u65f6\u6211\u4eec\u4e5f\u53d1\u73b0\u6d88\u606f\u9001\u8fbe\u7387\u4e5f\u53d8\u5f97\u975e\u5e38\u7684\u4f4e\uff08\u5076\u5c14\u6709\u8bbe\u5907\u80fd\u6536\u5230\uff09\u3002\u8fd9\u4e2a\u5f88\u597d\u89e3\u91ca\uff0c\u4e4b\u524d\u6211\u5c31\u6709\u6587\u7ae0\u63d0\u5230\u8fc7\uff08\u5b98\u65b9\u4e5f\u6709\u76f8\u5e94\u8bf4\u660e\uff09<span style=\"color:#ff00;\">\u5f53\u4e00\u6b21\u8fde\u63a5\u5148\u53d1\u9001\u4e00\u4e2a\u9519\u8bef\u7684Token\uff0c\u4e4b\u540e\u7684\u6709\u6548Token\u7684\u6d88\u606f\u662f\u65e0\u6cd5\u9001\u8fbe\u7684<\/span>(<a target=\"_blank\" href=\"http:\/\/blog.csdn.net\/hjq_tlq\/article\/details\/8131115\">http:\/\/blog.csdn.net\/hjq_tlq\/article\/details\/8131115<\/a>)\uff0c\u8fd9\u5c31\u5bfc\u81f4\u4e86\u9519\u8bef\u7684Token\u540e\u9762\u7684\u6b63\u786e\u7684Token\u5168\u90e8\u6ca1\u6709\u6536\u5230\uff0c\u4ece\u800c\u9001\u8fbe\u7387\u4e5f\u5c31\u660e\u663e\u4e0b\u964d\u4e86\u3002<\/p>\n<p>&nbsp; &nbsp; \u7ecf\u8fc7\u4e0a\u9762\u7684\u6d4b\u8bd5\uff0c\u5f53APNs\u63a5\u6536\u5230\u9519\u8bef\u7684Token\u7684\u65f6\u5019\u4f1a\u4e3b\u52a8\u65ad\u5f00\u8fde\u63a5\uff0c\u4f46\u662f\u65ad\u5f00\u8fde\u63a5\u4e4b\u524d\u4f1a\u67091sec\u5de6\u53f3\u7684\u5ef6\u8fdf\u3002\u90a3\u4e48\u4f60\u53ef\u4ee5\u6709\u4e0b\u9762\u8fd9\u4e2a\u4f8b\u5b50\u7406\u89e3\uff1a<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \u4f60\u8981\u53d1\u90011000\u6761\u6570\u636e\u5e76\u4e14\u7b2c20\u4e2aToken\u662f\u9519\u8bef\u7684<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \u5f53\u6b64\u6b21\u8fde\u63a5\u53d1\u5230\u7b2c20\u4e2aToken\u7684\u65f6\u5019\u82f9\u679c\u8ba4\u4e3a\u6b64\u6b21\u8fde\u63a5\u7ec8\u6b62(\u4f46\u662f\u8fde\u63a5\u5e76\u6ca1\u6709\u65ad\u5f00\uff0c\u53ea\u662fAPNs\u5c06\u629b\u5f03\u4e4b\u540e\u7684\u5185\u5bb9)\uff0c\u5e76\u4e14\u4e0d\u5904\u7406\u6b64\u6b21\u8fde\u63a5\u4e4b\u540e\u7684\u6d88\u606f<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; 1sec\u5de6\u53f3\u7684\u65f6\u95f4\u4e4b\u540e\u82f9\u679c\u4e3b\u52a8\u65ad\u5f00SSL\u8fde\u63a5\uff0c\u5982\u679c\u4f60\u7ee7\u7eed\u5fd8\u6b64\u8fde\u63a5\u5199\u6570\u636e\uff0c\u4f60\u5c06\u53ef\u4ee5\u6355\u6349\u5230Broken Pipe\u9519\u8bef<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \u6b64\u65f6\u7531\u4e8e1sec\u5de6\u53f3\u7684\u5ef6\u8fdf\uff0c\u4f60\u5df2\u7ecf\u53d1\u9001\u5230\u4e86\u7b2c123\u4e2a\u6d88\u606f<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; \u6b64\u65f6\u4ece20\u4ee5\u540e\u76f4\u81f3123\u7684\u6d88\u606f\u5c06\u5168\u90e8\u6ca1\u6709\u9001\u8fbe<\/p>\n<p>&nbsp; &nbsp; \u592a\u53ef\u6015\u4e86.....\u4f60\u7adf\u7136\u4e0d\u77e5\u9053\u662f\u4ece\u54ea\u4e00\u4e2a\u9519\u4e86\uff01\uff01\uff01\u82f9\u679c\u662fSB\u554a\uff01\u5148\u4e0d\u8981\u505a\u8fd9\u6837\u7684\u7ed3\u8bba\uff0c\u6211\u4eec\u5148\u770b\u4e00\u4e0b\u82f9\u679c\u5b98\u65b9\u6587\u6863\u6240\u7ed9\u51fa\u7684\u4e1c\u4e1c\uff1a<\/p>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201603\/83b51458191774.jpeg\" id=\"ematt:380\"><img loading=\"lazy\" decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201603\/83b51458191774.jpeg\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" width=\"644\" height=\"195\" border=\"0\" \/><\/a><\/p>\n<ul class=\"ul\" style=\"list-style-position:outside;margin:0px 0px 0.833em 1.35em;padding:0px 0px 0.5em;font-family:'Lucida Grande','Lucida Sans Unicode',Helvetica,Arial,Verdana,sans-serif;font-size:13px;\">\n<li class=\"li\" style=\"margin-top:0.583em;\">\n<p style=\"margin-top:0.667em;margin-bottom:0.833em;display:inline;\"><span style=\"color:#ff0000;\"><span style=\"font-weight:700;\">Identifier<\/span>\u2014An arbitrary value that identifies this notification. This same identifier is returned in a error-response packet<br \/>\n if APNs cannot interpret a notification.<\/span><\/p>\n<\/li>\n<li class=\"li\" style=\"margin-top:0.583em;\">\n<p style=\"margin-top:0.667em;margin-bottom:0.833em;display:inline;\"><span style=\"font-weight:700;\">Expiry<\/span>\u2014A<br \/>\n fixed UNIX epoch date expressed in seconds (UTC) that identifies when<br \/>\nthe notification is no longer valid and can be discarded. The expiry<br \/>\nvalue<br \/>\n uses network byte order (big endian). If the expiry value is positive,<br \/>\nAPNs tries to deliver the notification at least once. Specify zero (or a<br \/>\n value less than zero) to request that APNs not store the notification<br \/>\nat all.<\/p>\n<\/li>\n<li class=\"li\" style=\"margin-top:0.583em;\">\n<p style=\"margin-top:0.667em;margin-bottom:0.833em;display:inline;\"><span style=\"font-weight:700;\">Token length<\/span>\u2014The length of the device token in network order (that is, big endian)<\/p>\n<\/li>\n<li class=\"li\" style=\"margin-top:0.583em;\">\n<p style=\"margin-top:0.667em;margin-bottom:0.833em;display:inline;\"><span style=\"font-weight:700;\">Device token<\/span>\u2014The device token in binary form.<\/p>\n<\/li>\n<li class=\"li\" style=\"margin-top:0.583em;\">\n<p style=\"margin-top:0.667em;margin-bottom:0.833em;display:inline;\"><span style=\"font-weight:700;\">Payload length<\/span>\u2014The length of the payload in network order (that is, big endian). The payload must not exceed 256 bytes and must&nbsp;<em>not<\/em>&nbsp;be null-terminated.<\/p>\n<\/li>\n<li class=\"li\" style=\"margin-top:0.583em;\">\n<p style=\"margin-top:0.667em;margin-bottom:0.833em;display:inline;\"><span style=\"font-weight:700;\">Payload<\/span>\u2014The notification payload.<\/p>\n<\/li>\n<\/ul>\n<p>&nbsp; &nbsp;<br \/>\nPS\uff1a\u8fd9\u91cc\u82f9\u679c\u5230\u662f\u505a\u4e86\u4ef6\u597d\u4e8b\uff0c\u8fd9\u4e2a\u6d88\u606f\u7ed3\u6784\u5728\u65e9\u4e9b\u7684\u6587\u6863\u4e2d\u663e\u793a\u7684\u662f5-2 Enhanced Notification<br \/>\nFormat\uff0c\u800c\u4e4b\u524d\u76845-1\u662fNotification<br \/>\nFormat\u3002\u533a\u522b\u5728\u4e8e\u4e4b\u524d\u76845-1\u4e2d\u7684\u6d88\u606f\u7ed3\u6784\u4e3a\u7b80\u5355\u6d88\u606f\u7ed3\u6784\uff0c\u6ca1\u6709Identifier\u548cExpiry\u5b57\u6bb5\u5e76\u4e14Command\u4e3a0\u3002\u73b0\u5728\u76f4\u63a5\u628a\u7b80\u5355\u7684<br \/>\n\u6d88\u606f\u4f53\u7ed3\u6784\u7ed9\u53bb\u6389\u4e86\uff0c\u8fd9\u6837\u53ef\u4ee5\u5f3a\u5236\u5f00\u53d1\u8005\u52a0\u4e0aIdentifier\uff0c\u4ece\u800c\u5f97\u5230\u8fd4\u56de\u503c\u3002<\/p>\n<p>&nbsp; &nbsp;<br \/>\n\u4e3a\u4e86\u65b9\u4fbf\u6211\u76f4\u63a5\u628a\u5b98\u65b9\u6587\u6863\u7c98\u8fc7\u6765\u4e86\u54c8\uff1a\uff09\u6211\u4eec\u9700\u8981\u6ce8\u610f\u7684\u662fIdentifier\u8fd9\u4e2a\u4e1c\u4e1c\u3002\u6ca1\u9519\uff0c\u8fd9\u4e2a\u5c31\u662f\u82f9\u679c\u7528\u6765\u63d0\u4f9b\u7684\u7ed9\u7b2c\u4e09\u65b9\u76844\u552f\u4e00\u6807\u793a\uff0c\u5982\u679c\u9e1f\u8bed\u4e0d<br \/>\n\u662f\u5f88\u597d\u7684\u8bdd\u4ed6\u540e\u9762\u7684\u90a3\u4e2a\u6ce8\u91ca\u5927\u81f4\u5c31\u662f\u8bf4\uff1a\u4e00\u4e2a\u6d88\u606f\u7684\u552f\u4e00\u6807\u8bc6\u3002\u5982\u679c\u82f9\u679c\u670d\u52a1\u5668\u4e0d\u80fd\u89e3\u91ca\u8fd9\u4e2a\u6d88\u606f\uff0c\u90a3\u4e48\u5c06\u5728\u9519\u8bef\u4e2d\u8fd4\u56de\u8fd9\u4e2a\u552f\u4e00\u6807\u793a\u3002<\/p>\n<p>&nbsp; &nbsp; \u53ef\u6076\u7684\u82f9\u679c\u5e76\u6ca1\u6709\u8bf4\u660e\u8fd9\u4e2a\u4f1a\u6709\u5ef6\u8fdf\uff0c\u4ee5\u53ca\u600e\u4e48\u786e\u4fdd\u6211\u4eec\u80fd\u6536\u5230\u8fd9\u4e2a\u9519\u8bef\u3002\u6211\u4eec\u73b0\u5728\u91c7\u7528\u7684\u662f\u6bcf\u53d1\u9001100\u6761\u6d88\u606f\uff0c\u5c31\u68c0\u67e5\u4e00\u4e0b\uff08read\uff09\u662f\u5426\u6709\u5931\u8d25\u7684\u3002\u5982\u679c\u4f60\u6293\u5230\u8fd9\u4e2a\u9519\u8bef\uff0c\u90a3\u4e48\u679c\u65ad\u65ad\u5f00\u8fde\u63a5\uff0c\u5e76\u4e14\u91cd\u65b0\u53d1\u9001\u8fd9\u6761\u9519\u8bef\u4ee5\u540e\u7684Token\uff0c\u8fd9\u6837\u5c31\u80fd\u4fdd\u8bc1\u6d88\u606f\u57fa\u672c\u80fd\u9001\u8fbe\u3002<\/p>\n<p>&nbsp; &nbsp; \u54e6\uff0c\u987a\u4fbf\u8bf4\u4e00\u4e0b\u5982\u4f55\u5f97\u5230\u9519\u8bef\u53cd\u9988\uff0c\u5982\u679c\u4f60\u53d1\u9001\u7684\u65f6\u5019\u52a0\u4e0a\u4e86Identifier\uff0c\u90a3\u4e48\u6b64\u65f6\u4f60\u4e00\u5b9a\u6709\u4e00\u4e2a\u548cAPNs\u7684\u8fde\u63a5\u5427\uff08\u5e9f\u8bdd\uff0c\u6ca1\u8fde\u63a5\u600e\u4e48write\uff09\uff0c\u90a3\u4e48\u4f60\u53ea\u8981read\u5c31\u597d\u4e86\uff0c\u5982\u679c\u6709\u5c31\u80fd\u8bfb\u5230\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6570\u636e\uff1a\uff09<\/p>\n<p>&nbsp; &nbsp; \u6709\u4e00\u4e2a\u4e5f\u9700\u8981\u63d0\u4e00\u4e0b\uff0c\u5c31<strong><span style=\"color:#ff0000;\">\u662fAPNs\u7684FeedBack\u529f\u80fd\u4e5f\u4e00\u5b9a\u8981\u7528\u4e0a<\/span><\/strong>\uff0c\u8fd9\u4e2a\u80fd\u5e2e\u52a9\u4f60\u66f4\u597d\u7684\u5254\u9664\u9519\u8bef\u7684Token\u3002<\/p>\n<p>&nbsp; &nbsp; \u5f53\u4f60\u7684Token\u57fa\u672c\u4e3a\u6b63\u786e\u7684\u65f6\u5019\uff0c\u5982\u679c\u8fd8\u6709\u5927\u91cf\u7684Broken Pipe\u51fa\u73b0\uff0c\u4f60\u53ef\u4ee5\u7ed9\u6211\u7559\u8a00\uff0c\u6211\u4eec\u4e00\u8d77\u7814\u7a76\u5230\u5e95\u54ea\u91cc\u51fa\u95ee\u9898\u4e86\uff1a\uff09<\/p>\n<p>&nbsp;<\/p>\n<p>\u9644\uff1a http:\/\/www.oschina.net\/translate\/http2-protocol-for-apns?cmp<\/p>\n<p>&nbsp;<br \/>\n<b>\u5176\u5b83\uff1a<\/b><\/p>\n<p>2015\u5e7412\u670817\u65e5\u8d77\uff0c\u53d1\u5e03 \u201c\u57fa\u4e8e HTTP\/2 \u7684\u5168\u65b0 APNs \u534f\u8bae\u201d,iOS \u7cfb\u7edf\u4ee5\u53ca OS X \u7cfb\u7edf\uff0c\u7edf\u4e00\u5c06\u6700\u5927<br \/>\nplayload \u5927\u5c0f\u63d0\u5347\u52304KB\u3002\u53c2\u8003\u6587\u6863\uff1aApple Push Notification Service Update 12-17 2015\n  <\/p>\n<p>\u3000\u3000\u65b0\u65e7 APNs \u534f\u8bae\u5de5\u4f5c\u793a\u610f\u56fe\u5bf9\u6bd4 <\/p>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201703\/34ba1490066748.jpeg\" id=\"ematt:523\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201703\/34ba1490066748.jpeg\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" \/><\/a><\/p>\n<p><b>&nbsp;&nbsp;&nbsp; HTTP \/ 2<\/b><br \/>\n&nbsp;<a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201703\/62bf1490066916.jpg\" id=\"ematt:524\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201703\/62bf1490066916.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" width=\"480\" border=\"0\" \/><\/a><br \/>\n&nbsp;&nbsp;<br \/>\nVersion Old \/ socket connect<br \/>\n&nbsp; <br \/>\n<a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201703\/134c1490066921.jpg\" id=\"ematt:525\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201703\/134c1490066921.jpg\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" width=\"480\" border=\"0\" \/><\/a><br \/>\n\u53c2\u8003\uff1a<br \/>\n <a href=\"https:\/\/developer.apple.com\/library\/content\/documentation\/NetworkingInternet\/Conceptual\/RemoteNotificationsPG\/APNSOverview.html\" target=\"_blank\">https:\/\/developer.apple.com\/library\/content\/documentation\/NetworkingInternet\/Conceptual\/RemoteNotificationsPG\/APNSOverview.html<\/a><br \/>\n<a href=\"https:\/\/developer.apple.com\/library\/content\/documentation\/NetworkingInternet\/Conceptual\/RemoteNotificationsPG\/CommunicatingwithAPNs.html#\/\/apple_ref\/doc\/uid\/TP40008194-CH11-SW2\" target=\"_blank\">https:\/\/developer.apple.com\/library\/content\/documentation\/NetworkingInternet\/Conceptual\/RemoteNotificationsPG\/CommunicatingwithAPNs.html#\/\/apple_ref\/doc\/uid\/TP40008194-CH11-SW2<\/a><\/p>\n<p>APNS\u67b6\u6784\u56fe\uff1a<\/p>\n<p><a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201708\/df411502782378.jpeg\" id=\"ematt:546\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201708\/df411502782378.jpeg\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" \/><\/a><\/p>\n<p>\n<a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201603\/83b51458191774.jpeg\" id=\"ematt:380\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u5b9e\u73b0provider\u5411APNS\u63a8\u9001\u6d88\u606f<\/p>\n<p>\u5728\u901a\u8fc7provider\u5411APNS\u53d1\u9001\u6d88\u606f\u4e4b\u524d\uff0c\u6211\u4eec\u9996\u5148\u9700\u8981\u4e86\u89e3\u9700\u8981\u53d1\u9001\u7684\u683c\u5f0f\uff0cAPNS\u7684\u4fe1\u606f\u7ed3\u6784\u5305\u5982\u4e0b\u56fe\uff1a<br \/>\n<a target=\"_blank\" href=\"\/notes\/content\/uploadfile\/201603\/59b21458198252.png\" id=\"ematt:385\"><img loading=\"lazy\" decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201603\/59b21458198252.png\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" width=\"573\" height=\"91\" border=\"0\" \/><\/a><\/p>\n<p>\n\u4e0a\u56fe\u663e\u793a\u7684\u8fd9\u4e2a\u6d88\u606f\u4f53\u5c31\u662f\u6211\u4eec\u7684\u670d\u52a1\u5668\uff08Provider\uff09\u53d1\u9001\u7ed9APNS\u670d\u52a1\u5668\u7684\u6d88\u606f\u7ed3\u6784\uff0cAPNS\u9a8c\u8bc1\u8fd9\u4e2a\u7ed3\u6784\u6b63\u786e\u5e76\u63d0\u53d6\u5176\u4e2d\u7684\u4fe1\u606f\u540e\uff0c\u518d\u5c06\u6d88\u606f\u63a8\u9001\u5230\u6307\u5b9a\u7684\u8bbe\u5907\u3002\u8fd9\u4e2a\u7ed3\u6784\u4f53\u5305\u62ec\u4e03\u4e2a\u90e8\u5206:<\/p>\n<p>\u7b2c\u4e00\u4e2a\u90e8\u5206\u662f\u547d\u4ee4\u6807\u793a\u7b26;<\/p>\n<p>\u7b2c\u4e8c\u90e8\u5206\u662f\u4e00\u4e2a\u8868\u793a\u8fd9\u4e2a\u901a\u77e5\u7684\u4e00\u4e2a\u8868\u793a\u4f4d\uff0c\u5982\u679capns\u4e0d\u80fd\u89e3\u91ca\u8be5\u901a\u77e5\uff0c\u5c31\u8fd4\u56de\u4e00\u4e2a\u9519\u8bef\u5305\uff1b<\/p>\n<p>\u7b2c\u4e09\u90e8\u5206\u662f\u4e00\u4e2a\u4ee5\u79d2\u6807\u8bc6\u7684\u65f6\u95f4\u503c\uff0c\u5b83\u6807\u8bc6\u901a\u77e5\u662f\u5426\u6709\u6548\uff0c\u6807\u8bc6\u7684\u901a\u77e5\u65f6\u95f4\u4e0eUNIX\u4e4b\u5dee\u4e0e\u5f53\u524d\u65f6\u95f4\u4e0eUNIX\u65f6\u95f4\u4e4b\u5dee\uff0c\u5982\u679c\u5927\u4e8e\u96f6\uff0cAPNS\u6700\u5c11\u901a\u77e5\u4e00...<\/p>\n<p> <a href=\"https:\/\/www.xiaobo.li\/notes\/archives\/488\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[283],"tags":[],"class_list":["post-488","post","type-post","status-publish","format-standard","hentry","category-technologys"],"_links":{"self":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/comments?post=488"}],"version-history":[{"count":0,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/488\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/media?parent=488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/categories?post=488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/tags?post=488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}