时间:2022-08-20 08:09:21 | 栏目:iOS代码 | 点击:次
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); }