AppDelegate.m 中
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{ [UMessage registerDeviceToken:deviceToken]; NSString *tokenStr = [[[[deviceToken description] stringByReplacingOccurrencesOfString: @"<" withString: @""] stringByReplacingOccurrencesOfString: @">" withString: @""] stringByReplacingOccurrencesOfString: @" " withString: @""]; self.device_token = tokenStr; NSLog(@"%@",tokenStr); }
以上这篇iOS umeng 获取deviceToken的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。