Permalink
Browse files

Update README.md

Updated the wiki by adding the information how to convert a string into a hexadecimal string. I was doing it wrong before and it took me quite some time to find my stupid error, so I hope this information might help others not to make the same mistake.

By the way, thanks a lot for publishing this very useful module!
  • Loading branch information...
1 parent 1ec14c8 commit 37e709d24b8aa53a740e28c252f31222b56c1d9c @kaalita committed Nov 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.md
View
@@ -54,7 +54,7 @@ Create a new connection to the gateway server using a dictionary of options. The
**Important:** In a development environment you must set `gateway` to `gateway.sandbox.push.apple.com`.
### Sending a notification
-To send a notification first create a `Device` object. Pass it the device token as either a hexadecimal string, or alternatively as a `Buffer` object containing the token in binary form.
+To send a notification first create a `Device` object. Pass it the device token as either a hexadecimal string (note: you can use .toString(16) to convert a regular string into a hexadecimal string), or alternatively as a `Buffer` object containing the token in binary form.
var myDevice = new apns.Device(token);

1 comment on commit 37e709d

@argon
argon commented on 37e709d Nov 19, 2012

Could you please clarify the problem you were having? .toString(16) on a number would produce the hexadecimal representation. But on a string it will do nothing.

Please sign in to comment.