hi i am new to iOS so please help me ..
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
NSDictionary *segueDictionary = [userInfo valueForKey:@"aps"];
NSLog(@"%@",userInfo);
NSString * string=[[NSString alloc]initWithFormat:@"%@",[segueDictionary valueForKey:@"vendor_data"]];}
the output is
{
aps = {
alert = "Get Upto 50% Off ";
sound = default;
"vendor_data" = {
cat = "Baby & kids";
"closing_hours" = "09:00 PM";
latitude = "28.57089323";
longitude = "77.32666539";
"offer_desc" = "Get Upto 50% Off On All Kids Clothing.";
"offer_id" = 1128;
"offer_in_percentage" = "Get Upto 50% Off ";
"offer_item_name" = Lilliput;
"offer_valid_upto" = "2015-10-30";
"opening_hours" = "10:00 AM";
"phone_no" = "*********";
pincode = 0;
rating = 0;
"sub_category" = "Clothing,Footwear";
title = "Offer Of The Day";
"vendor_address" = "***********";
"vendor_id" = "lliputkids.com";
"vendor_location" = "*****";
"vendor_name" = Lilliput;
"vendor_type" = shop;
};
};
}
this coming from push notification data
NSString * string = {
cat = "Baby & kids";
"closing_hours" = "09:00 PM";
latitude = "28.57089323";
longitude = "77.32666539";
"offer_desc" = "Get Upto 50% Off On All Kids Clothing.";
"offer_id" = 1128;
"offer_in_percentage" = "Get Upto 50% Off ";
"offer_item_name" = Lilliput;
"offer_valid_upto" = "2015-10-30";
"opening_hours" = "10:00 AM";
"phone_no" = "********";
pincode = 0;
rating = 0;
"sub_category" = "Clothing,Footwear";
title = "Offer Of The Day";
"vendor_address" = "shop.no- 6, sun market";
"vendor_id" = "illiputkids.com";
"vendor_location" = "*******";
"vendor_name" = Lilliput;
"vendor_type" = shop;}
this data is in string format but i want in dictionary format i am getting data in string format. so please help me Thanks in advance