SoFunction
Updated on 2025-03-04

iOS umeng method to get deviceToken

middle

- (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);
}

The above method to get deviceToken in iOS umeng is all the content I share with you. I hope you can give you a reference and I hope you can support me more.