iOS接受不到消息内容

dawei2
2019-10-09 10:15 251 0

你好,我用文档给出的代码发送消息,iOS能接收到,但只能接受到alter,.setMessage(Message.content(MSG_CONTENT))的值获取不到。就是通知里面只有标题没有内容

payload = PushPayload.newBuilder()
.setPlatform(Platform.ios())
.setAudience(Audience.all())
.setNotification(Notification.newBuilder()
.addPlatformNotification(IosNotification.newBuilder()
.setAlert(entity.getTitle())
.setBadge(5)
.setSound("happy")
.addExtras(map)
.build())
.build())
.setMessage(Message.content(MSG_CONTENT))
.setOptions(Options.newBuilder()
.setApnsProduction(false)
.build())
.build();

1个回答

热门排序