我的Json
{
aps = {
alert = {
body = "This is a testing message !!!";
title = Notification;
};
};
data = "{\"push_type\":6,\"badge\":1,\"alert\":\"This is a testing message !!!\",\"sound\":\"default\",\"content-available\":\"1\",\"is_login\":2}";
"gcm.message_id" = "0:1494478903994917%6c350cc06c350cc0"; }
我想得到push_type 就像这里一样。
我的代码是:
NSDictionary *data=[[userInfo valueForKey:@"data"] valueForKey:@"push_type"]];
运行此行后发生错误push_type不是键值编码投诉...
你能帮助我在哪里错了,或者我怎样才能实现这一点,请给我举个例子,链接谢谢!