The Apple Push Notification API allows applications to provide various types of push notifications to devices, such as sounds (audible alerts), alerts (displaying an alert on the screen), and badges (displaying an image or number on the application icon). Push notifications require network connectivity.
The client library libclientrt wraps the Apple Push Notification API in the file SUPPushNotification.h.
In addition to using the Apple Push Notification APIs in a client application, you must configure the push configuration on the server. This is performed under Server Configuration > Messaging > Apple Push Configuration in Sybase Control Center. You must configure the device application name (for push), the device certificate (for push), the Apple gateway, and the gateway port.
The following API methods abstract the Unwired Server, resolve the push-related settings, and register with an Apple Push server, if required. You can call these methods in the "applicationDidFinishLaunching" function of the client application:
@interface SUPPushNotification : NSObject { } +(void)setupForPush:(UIApplication*)application; +(void)deviceTokenForPush:(UIApplication*)application deviceToken:(NSData *)devToken; +(void)pushRegistrationFailed:(UIApplication*)application errorInfo:(NSError *)err; +(void)pushNotification:(UIApplication*)application notifyData:(NSDictionary *)userInfo; +(void)setupForPush:(UIApplication*)application
+(void)deviceTokenForPush:(UIApplication*)application deviceToken:(NSData *)devToken
+(void)pushRegistrationFailed:(UIApplication*)application errorInfo: (NSError *)err
+(void)pushNotification:(UIApplication*)application notifyData:(NSDictionary *)userInfo