我想從我的iphone獲取設備令牌。在閱讀帖子後,我已經完成了這個工作。獲取示例設備令牌
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeAlert ];
}
(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSLog(@"didRegisterForRemoteNotificationsWithDeviceToken: %@", deviceToken);
}
我已經把didRegisterForRemoteNotificationsWithDeviceToken斷點,但沒有就此止步。我如何確保它被調用?
對不起,noob問題。需要在此方面的指導...
找到完整的教程教程 - http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part -12 – 2013-05-03 03:39:50
適用於您應用的Eanble推送通知(意味着將通知服務添加到您的供應配置文件)。然後重試。 – NSUserDefault 2013-05-03 03:47:39