我通過didRegisterForRemoteNotificationsWithDeviceToken
方法獲得了設備令牌。我想用另一種方法使用設備令牌。我嘗試了這種方式,如何在doRegisterForRemoteNotificationsWithDeviceToken以外的方法中使用設備標記?
在didRegisterForRemoteNotificationsWithDeviceToken
方法:
str = [NSString stringWithFormat:@"%@",deviceToken];
// str is the NSString which is declared in the appDelegate.h file as global variable
在didReceiveRemoteNotification
方法:
NSLog(@"Device Token : %@",str);
當我做這樣的Device Token
正在恢復爲 「nosniff」。
如何將此設備令牌存儲在全局變量中並將其用於其他類或其他方法中。
這是打開應用程序啓動屏幕,但所有空白的視圖控制器不加載,是否有任何替代的例子,你可以給我,因爲我有e嘗試了這一點,但 - >應用程序啓動 - > DidfinishlaunchwithOption調用 - >初始視圖控制器不呼籲viewdidload如果我把這[[UIapplication sharedApplication] setDelegate:self]完成啓動 –