Iphone Remote Notifications For Provider

Provider  Push notifications:

Production environment:gateway.push.apple.com port 2195; 

Development environment: gateway.sandbox.push.apple.com port 2195


  • You must compose the notification payload
    • An alert message to display to the user
    • A number to badge the application icon with
    • A sound to play
  • You are responsible for supplying the badge number to be displayed on the application icon.
  • You should regularly connect with the feedback web server and fetch the current list of those devices that have repeatedly reported failed-delivery attempts. Then you should cease sending notifications to the devices associated with those applications. 


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

Simple Format

简单的notification格式:

 

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

Enhanced Format

增强版的notification格式

 


Identifier:唯一标识notification

Expiry:过时的标识。正值:APN至少尝试发送notification; 0或负值:APN丢弃notification

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

Format error

包错误或不完整时,APN returns an error-response packet prior to disconnecting

APN的错误反馈包的格式:

 

 

 

Codes in error-response packet

Status code

Description

0

No errors encountered

1

Processing error

2

Missing device token

3

Missing topic

4

Missing payload

5

Invalid token size

6

Invalid topic size

7

Invalid payload size

8

Invalid token

255

None (unknown)

 

The Feedback Service

Providers 需要周期性查询 the feedback service 获取所有应用的 device tokens, Device tokens从 topic获取;

Production feedback service:feedback.push.apple.com  port2196;

Sandbox feedback service:feedback.sandbox.push.apple.com, port 2196

使用 TLS (or SSL)建立连接,一旦建立连接,仅需读取所有feedback service所有数据,数据格式:


Timestamp:应用不在设备上的时间,从1970开始的秒数

 

posted @ 2011-04-26 10:08  simalone  阅读(398)  评论(1编辑  收藏  举报