Created
June 29, 2011 19:27
-
-
Save amrox/1054686 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// don't do this | |
deviceToken = [[[[deviceToken description] | |
stringByReplacingOccurrencesOfString: @"<" withString: @""] | |
stringByReplacingOccurrencesOfString: @">" withString: @""] | |
stringByReplacingOccurrencesOfString: @" " withString: @""]; | |
// do this | |
NSString* deviceTokenStr = [[[[deviceToken description] | |
stringByReplacingOccurrencesOfString: @"<" withString: @""] | |
stringByReplacingOccurrencesOfString: @">" withString: @""] | |
stringByReplacingOccurrencesOfString: @" " withString: @""]; | |
// also parsing the output of the description method is usually a bit sketchy, but I think | |
// it's ok in this case. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment