1

So, we are working on iOS push notifications for vendors that make apps and I think i am seeing two different ways that it can be sent to us. I am just wanting to know if this is a true or am i going down the wrong path.

I see that they can either A take the DeviceToken for push (NSObject) and Base64 Encode it and passes it to us to send. OR they could take the NSObject and HEX string it and pass it to us and not do the Base64 Encoding.

is this true? is it separate logic for handling when trying to send to Apple?

Thanks ahead of time guys!

HexBlit
  • 1,172
  • 1
  • 13
  • 31

1 Answers1

1

Basically, you are correct. A hexadecimal number is definitely not the same as base64-encoded data. Theoretically, there is an infinite number of other possible encodings you could use to send the token to your server, but those two are probably among the most popular.

Base64 uses more characters for encoding so it needs less space, and it is kind of a de-facto standard for sending binary data over the network, so that's what I would opt for.

Ole Begemann
  • 135,006
  • 31
  • 278
  • 256