ios - No response for Device token request on the simulator -


i newbie iphone technology,right m working application need implement push notification.

i followed link :

http://mobiforge.com/developing/story/programming-apple-push-notification-services#comment-7850

also,used following code :

 nslog(@"registering push notifications...");     [[uiapplication sharedapplication]   registerforremotenotificationtypes:  (uiremotenotificationtypealert |   uiremotenotificationtypebadge |    uiremotenotificationtypesound)];  - (void)application:(uiapplication *)app didregisterforremotenotificationswithdevicetoken:(nsdata *)devicetoken  {     nsstring *str = [nsstring stringwithformat:@"device token=%@",devicetoken];     nslog(str); }  - (void)application:(uiapplication *)app didfailtoregisterforremotenotificationswitherror:(nserror *)err  {      nsstring *str = [nsstring stringwithformat: @"error: %@", err];     nslog(str);     }  - (void)application:(uiapplication *)application didreceiveremotenotification:(nsdictionary *)userinfo  {     (id key in userinfo)   {         nslog(@"key: %@, value: %@", key, [userinfo objectforkey:key]);     }     } 

thing is,when run program,i should device token in debugger window,as per code,instead getting error :

" error in registration. error: error domain=nscocoaerrordomain code=3010 "remote notifications not supported in simulator" userinfo=0x6e055a0 {nslocalizeddescription=remote notifications not supported in simulator} "

how should solve problem?

kindly me out.

thank you.

because simulator doesn't support it... in example displays device identifier in console. console displaying feedback device. isn't console getting information, device sending information back. so, because console displays information on mac doesn't mean mac capable of directly getting information. must sent device. try running on device.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -