How to get device token in iOS 13 with Xamarin?

前端 未结 7 1862
悲&欢浪女
悲&欢浪女 2020-12-11 03:31

Our RegisteredForRemoteNotifications code broke because the token was retrieved with:

deviceToken.ToString().Trim(\'<\').Trim(\'>\').Replace(\" \", \"\         


        
相关标签:
7条回答
  • 2020-12-11 04:13

    You can use a more simplified version:

    var bytes = deviceToken.ToArray();
    var token = BitConverter.ToString(bytes).Replace("-", "");
    
    0 讨论(0)
提交回复
热议问题