Push notifications are really useful on iPhone devices, especially on older iOS versions. The best feature, is that it uses the Apple servers, and the message handling is built into the API, so you don’t have to implement your own polling system. Here is a great and complete tutorial about it:
Programming Apple Push Notification Services
However there is trick for decoding device token from the suppiled NSData.
You can find the solution here: (Stackoverflow.com)
NSString *deviceToken = [[webDeviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
deviceToken = [deviceToken stringByReplacingOccurrencesOfString:@" " withString:@""];