JPush 环境一致,setAlias 返回 0,收不到推送
情况是这样的。目前是IOS端。我集成了JMessage和JPush,按照文档说明,我只加了JMessage.framework这个框架,然后使用的是代码来设置appkey,我的开发和发布证书都是正常的,客户端setAlias也返回的0,初始化代码也用的JMessage那一套。
- (void)initJPush:(NSDictionary *)launchOptions
{
[JMessage addDelegate:self withConversation:nil];
[JMessage setupJMessage:launchOptions
appKey:JMESSAGE_APPKEY
channel:CHANNEL apsForProduction:NO
category:nil];
[JPUSHService registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge |
UIUserNotificationTypeSound |
UIUserNotificationTypeAlert)
categories:nil];
[self registerJPushStatusNotification];
}
现在的问题是接收不到消息
{
"platform":"all",
"audience":{"alias" : [ "5e41111aa06b4ce7a8f59b29d921b8d1" ]},
"notification":{
"android":{
"title":"管理员",
"builder_id":1,
"extras":{
"date":"2015-12-31T08:57:45.5670651+08:00",
"attach":0,
"type":"message",
"id":"1",
"title":"管理员"
},
"alert":"测试消息推送"
},
"ios":{
"sound":"default",
"extras":{
"date":"2015-12-31T08:57:45.5670651+08:00",
"attach":0,
"type":"message",
"id":"1",
"title":"管理员"
},
"alert":"测试消息推送"
}
},
"options":{
"time_to_live": 60,
"apns_production": false
}
}