小记:Bmob云端代码测试APNS推送功能 #代码片段

 1 function onRequest(request, response, modules) {
 2 var push = modules.oPush;
 3 push.send({
 4     "data":{
 5         "where": {
 6           "objectId": "ab2fa8d8d2"//ab2fa8d8d2为测试设备的objectId
 7         },
 8         "data": {
 9           "alert": "Willie Hayes injured by own pop fly."
10         }
11       }
12   },function(err,data){
13      //回调函数
14      response.send(data)
15   });
16 } 

 

posted on 2015-12-03 16:38  HowMacist  阅读(273)  评论(0编辑  收藏  举报

导航