stringbyre" />
當前位置:名人名言大全網 - 端午節短信 - union-push-IOs-IOs如何獲取設備的DeviceToken?

union-push-IOs-IOs如何獲取設備的DeviceToken?

方法1:將以下語句添加到didregisterforremote notification swithdevicetoken中。

NSLog(@“% @”,[[[[device token description]stringByReplacingOccurrencesOfString:@ " & ltwith string:@ " "]string:@ " " > stringbyreplacingoccurrences of stringwith string:@ " "]stringbyreplacingocurrences of string:@ " " with string:@ " "]);

方法二:打開diddfinishlaunching with Options:ns dictionary *)Launch Options中的UMessage的日誌,然後查找deviceToken的字段。

//對於日誌

[UMessage setLogEnabled:是];

無論哪種方式,您都可以在控制臺獲得測試設備的DeviceToken字符串,長度為64。