2012-09-11 41 views

回答

0

當你的應用程序正在運行的所有通知發送到應用程序委託:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo

+0

類型你'registerForRemoteNotificationTypes註冊其中:' – Bastian

+0

的NSDictionary * apsDic = [USERINFO valueForKey:@ 「APS」] ; NSString * alertStr = [apsDic valueForKey:@「alert」]; NSLog(@「alertstring =%@」,alertStr); NSString * msgStr = [userInfo valueForKey:@「m」]; NSLog(@「messtring =%@」,msgStr); NSNumber * badgeNum = [apsDic valueForKey:@「badge」]; NSLog(@「Badge Number =%@」,badgeNum); NSLog(@「Badge Number =%@」,badgeNum);我正在寫這段代碼 – 012346

+0

,這不是我的問題。當你啓動你的應用程序時,你使用'registerForRemoteNotificationTypes:'調用了哪些類型的註冊? – Bastian