IOS Push Notification 集成笔记

原理

APNS:Apple Push Notification Service

摘录raywenderlich.com的一张图:
APNS

  1. An app enables push notifications. The user has to confirm that he wishes to receive these notifications.
  2. The app receives a “device token”. You can think of the device token as the address that push notifications will be sent to.
  3. The app sends the device token to your server.
  4. When something of interest to your app happens, the server sends a push notification to the Apple Push Notification Service, or APNS for short.
  5. APNS sends the push notification to the user’s device.

Certificate(认证)

需要将自己的app在Apple官方认证,流程参见:parse.com/tutorial 不要被那冗长的过程吓倒哦 :)

第三方服务选型

全能型(声称“为App提供一站式后台服务”)。目前觉得,没有必要用这么全能的服务,虽然这些服务都免费。
parse.com (国外的)
leancloud.cn (国内的)

仅推送服务。国内有多家提供该服务的平台,让人眼花(见评论文章 )。最终选择了极光推送,主要因为wealon原来公司项目用的是这个。

IM消息 与 推送

极光推送等提供的服务是“向所有/部分用户发一条通知/广告”等,相当于村委会“大喇叭”的作用。而融云等提供的则是即时通讯服务,是“点对点”的消息,相当于“打电话”。融云的服务似乎更复杂一些。
另外,IM消息的推送(如微信/qq那样的收到一条消息就“叮叮咚”)也是用的APNS这条路。(简单看了一下融云的文档,也要求上传一个认证的文件[跟极光推送要求上传的文件一样],从这一点可以看出来是APNS)。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值