0
我不知道如何用下面的应用程序委托方法替换“方法”。如何调用此方法注册设备
视图 - 控制
[(AppDelegate *)[[UIApplication sharedApplication] delegate] method];
的appdelegate
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken {
TUPushHelper * helper = [[TUPushHelper alloc] initWithTokenData:devToken];
[helper registerDevice];
}
请问应用程序必须启动才能注册设备?我正试图设置一个switch语句来立即注销设备和注册设备。 – 2013-03-26 15:46:46
这将在您的应用首次发布时完成。用户将被提示关于推送通知,他将允许\拒绝他们。 此外,您无法以编程方式取消注册远程通知,因为这样做没有意义。注册并不意味着您确实收到通知。 – 2013-03-26 15:50:25