Joke Collection Website - Public benefit messages - Union-push-IOs-how does IOs get the DeviceToken of the device?
Union-push-IOs-how does IOs get the DeviceToken of the device?
Method 1: add the following statement to didregisterforremote notification swithdevicetoken.
NSLog(@“% @”, [[[[device token description]stringByReplacingOccurrencesOfString:@ " & ltwith string:@ " "] string:@ " " > stringbyreplacingoccurrences of stringwith string:@ " "]stringbyreplacingocurrences of string:@ " " with string:@ " "]);
Method 2: Open the log of UMessage in diddfinishlaunching with options: nsdictionary *) launchoptions, and then find the field of deviceToken.
//For logs
[usage setlogenabled: Yes];
Either way, you can get the DeviceToken string of the test device on the console, which is 64 in length.
- Related articles
- Can I change the short message number of the bank on my mobile phone?
- How to Enter Long Names in vivo Phone Address Book
- Will ems be taxed if it passes 1000? How to judge whether EMS is taxed?
- What verification code is issued by Tik Tok verification code?
- How to query the content of mobile phone short messages and how to recover the content of mobile phone short messages?
- Teachers' performance evaluation is very simple.
- Please eat.
- What should I do if I lose the online reservation verification code for the driver's license test?
- Can Liaoning Fuxin's provident fund buy a house in Chifeng Aqi?
- 139 is there a charge for sending text messages to the mailbox?