NSCFString 0x2749a0 valueForUndefinedKey this class is not key value coding-compliant for the key push_type

By vky

My 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"; }

I want to get push_type like here it is 6.

My code is:

NSDictionary *data=[[userInfo valueForKey:@"data"] valueForKey:@"push_type"]];

After run this line an error occur push_type is not key value coding complaints…

Could you please help me where i am wrong,or how can i achieve this,please refer me an example,link thanks!

Source: Stack Overflow


Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273