Tag Archive for 'push notifications'

PHP library for iOS push notifications

Implementing Apple Push Notification service on client-side iOS devices is an easy process, however server-side could be tricky until now. The apns-php is an all-in-one solution for server side push message sending, and it also features a great documentation about registration process as well.

Push notifications on iPhone

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:@""];