AppDelegate.m 中
1
2
3
4
5
6
7
8
|
- (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的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持服务器之家。
原文链接:http://blog.csdn.net/kaiccy/article/details/78624837