推送ios没有title参数,将title和body放到alert里面,推送过去之后是字符串,这个 怎么解决
public static void pushByAlias(String title,String message,List<String> alias){
Map<String, Object> map = new HashMap<String, Object>();
map.put("title", title);
map.put("body", message);
JSONObject jsonObject = JSONObject.fromObject(map);
System.out.println("++++++++++++++++++++++++++++++"+jsonObject);
PushPayload payload =PushPayload.newBuilder()
.setPlatform(Platform.android_ios())
.setAudience(Audience.alias(alias))
.setMessage(Message.newBuilder()
.setMsgContent(message)
.addExtra("from", "JPush").build())
.setNotification(Notification.newBuilder()
.addPlatformNotification(IosNotification.newBuilder()
.setAlert(jsonObject)
.build())
.addPlatformNotification(AndroidNotification.newBuilder()
.setTitle(title)
.setAlert(message)
.build())
.build())
.build();
sendPush(payload);
}
推送给ios后,ios接收到的是字符串,不是json,怎么解决