Does APNS or GCM device tokens have any special characters in them? we are trying to do server side validation of the tokens and need to know if we should just check for a-z0-9 and eliminate everything else?

有帮助吗?

解决方案

APNS device tokens are 32 bytes in binary format. If you choose to represent them as 64 hexadecimal characters, then they would contain just the hexadecimal characters (0 to 9 and A to F).

As for GCM Registration IDs, even though Google don't give any rules regarding possible characters, from what I observed, they use only 64 characters - A to Z, a to Z, 0 to 9, '-' and '_'.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top