Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Device Token example for Push Notifications

I need to pass through server auth method, which needs deviceToken for registration. But I have only simulators, and can't take tokens from them, and I want to send to server false token (like 000 000 000) But I don't know how many digits are there in device token. Can anyone help me out with a sample device token?

like image 828
Arthur Avatar asked Jun 13 '15 16:06

Arthur


2 Answers

Device token is of 32 Bytes. Sample device token is provided for your reference from raywenderlich

740f4707 bebcf74f 9b7c25d4 8e335894 5f6aa01d a5ddb387 462c7eaf 61bb78ad
like image 195
iYoung Avatar answered Oct 19 '22 06:10

iYoung


Apple Local and Remote Notification Programming Guide clearly states:

"Important: APNs device tokens are of variable length. Do not hardcode their size."

The may currently have 32 bytes but hardcoding that will make your app break in the future!

like image 28
fpg1503 Avatar answered Oct 19 '22 05:10

fpg1503