支持中心 > 热门问题

ios 推送的消息体只显示 “body”

提交于: 2017-10-30 16:59:54

 

YWMessageBodyCustomize

传自定义消息体

 

contorlParams 也设置了 ,但是推送通知栏显示的只有 “body”这个词

 

 

 

 

YWP2PConversation *conv = [YWP2PConversation fetchConversationByPerson:[[YWPerson alloc] initWithPersonId:personId] creatIfNotExist:YES baseContext:self.IMCore];

    NSDictionary *controlParameters = @{kYWMsgCtrlKeyPush:@{kYWMsgCtrlKeyPushKeyHowToPush:@{kYWMsgCtrlKeyPushKeyHowToPushKeyTitle:@"发现一条消息",kYWMsgCtrlKeyPushKeyHowToPushKeySound:@"",kYWMsgCtrlKeyPushKeyHowToPushKeyData:@"新的消息"} .problem } .problem } .problem ;;

    [conv asyncSendMessageBody:body controlParameters:controlParameters progress:^(CGFloat progress, NSString *messageID) {

        NSLog(@"消息发送进度:%lf", progress);

    } .problem completion:^(NSError *error, NSString *messageID) {

        if (error.code == 0) {

            NSLog(@"发送成功");

        } .problem else {

            NSLog(@"发送失败");

        } .problem

    } .problem ];

 

 

 

发送消息的代码如上

另一台账号设备可以收到推送,但是推送的内容 只显示 body

Q: 秋**猪 - 2017-10-30 16:59:54


 


 

返回
顶部