我正在尝试从我的 iphone 获取设备令牌。在阅读了stackoverflow中的帖子后,我已经做到了。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeAlert ];
}
(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSLog(@"didRegisterForRemoteNotificationsWithDeviceToken: %@", deviceToken);
}
我在 didRegisterForRemoteNotificationsWithDeviceToken 中设置了一个断点,但它并没有就此停止。我如何确保它被调用?
抱歉这个菜鸟问题..需要一些指导...