【发布时间】:2010-10-29 14:53:01
【问题描述】:
我正在开发苹果推送通知服务。现在我已经按照苹果 APNS 指南中的建议实现了代表方法。但这也意味着必须将从 APNS 收到的设备令牌发送到提供商服务器。
我真的对这件事感到困惑。
因为当我启动应用程序时,它问我是否要注册远程通知,但后来它再也没有显示过类似的东西。当时我没有代码来处理这个设备令牌。但是现在即使我删除并重新安装了整个应用程序,它也不会显示类似的内容。
任何帮助将不胜感激。 我的代码是这样的
- (void)viewDidLoad {
[super viewDidLoad];
//registring for remote notifications
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge |UIRemoteNotificationTypeSound)];
}
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
NSLog(@"Device token is %@", deviceToken)
}
【问题讨论】:
-
您能否告诉您的解决方案,以便对问题的其他查看者有所帮助。
标签: ios objective-c apple-push-notifications