我正在用普什诺特语作我的发言。 斜体是,每当申请装上时,就会产生该装置。 因此,在我的服务器中,我有许多重复装置标记。
我是否需要在把装置添加到数据库之前检查该装置,还是想一去做一些与安装有关的错误?
在我使用的法典部分之后。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// launchOptions has the incoming notification if we re being launched after the user tapped "view"
NSLog( @"didFinishLaunchingWithOptions:%@", launchOptions );
// [self.viewController handleDidReceiveRemoteNotification:userInfo];
// other setup tasks here....
[[UIApplication sharedApplication]
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)];
// [self updateWithRemoteData]; // freshen your app!
// RESET THE BADGE COUNT
application.applicationIconBadgeNumber = 0;
// ...
// call the original applicationDidFinishLaunching method to handle the basic view setup tasks
[self applicationDidFinishLaunching:application];
return YES;
}
- (void)application:(UIApplication *)app
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken {
[self sendDeviceTokenToRemote:devToken]; // send the token to your server
}
谁能帮助? 我如何在服务器上储存独特的装置标识?
thanks, Nikil