4
我試圖在推送通知中使用Malcom API發送自定義參數,但是我無法從iOS應用程序讀取它們。使用具有自定義參數的Malcom API發送推送通知
例捲曲:
curl -u user:pass -H "Content-Type: application/json" -X POST -d '{ "notification": { "applicationCode": "appUDID", "environment": "SANDBOX", "message": "Message", "udids": [ "00c93096526860d932ba1bf116e752b8f2689675" ], "notificationCustomization": { "customfield": [ {"entry": { "key":"new_id", "value": "25" }} ], "badge": 5 } } }' http://api.mymalcom.com/v3/notification/push
iOS的代碼(AppDelegate中):
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
[MalcomLib didReceiveRemoteNotification:userInfo active:[MalcomLib getAppActive]];
}
用戶信息包含以下信息:
{
aps = {
alert = "Message";
badge = 5;
};
notificationId = 521726;
}
你知道我在哪裏可以讀取這些參數?