Mac Os X Push Notification SDK

To integrate Pushwoosh into your application you need to do simple following steps:

1. For the truly seamless integration simply add Push NotificationsSDK to your project!

2. In your Info.plist add the following key Pushwoosh_APPID with your Pushwoosh Application ID string value

3. To handle push notifications add the following function to your App Delegate.m file

#import "PushNotificationManager.h"

- (void) onPushAccepted:(PushNotificationManager *)pushManager withNotification:(NSDictionary *)pushNotification {
	NSLog(@"Push notification received");
}

That’s it! Easy, isn’t it?

You might need to add -ObjC flag to the Linker Flags in your project. See this guide on how to do that: http://developer.apple.com/library/mac/#qa/qa1490/_index.html

See the sample project here: https://github.com/shaders/push-notifications-sdk/tree/master/SDK%20Sample%20Projects/Mac



Push Notifications SDK API:

@protocol PushNotificationDelegate

@optional
//By default this method displays alert and calls onPushAccepted if user has pressed OK button.
//If this method is implemented in the App Delegate, "onPushAccepted" method will not be called and notification alert will not be displayed
- (void) onPushReceived:(PushNotificationManager *)pushManager withNotification:(NSDictionary *)pushNotification onStart:(BOOL)onStart;

//user pressed OK on the push notification alert
- (void) onPushAccepted:(PushNotificationManager *)pushManager withNotification:(NSDictionary *)pushNotification;
@end

@interface PushNotificationManager

//Initializes Push Notifications Manager
+ (void)initializeAppCode:(NSString *)appCode appName:(NSString *)appName;

//Sends tags to server. Accepts dictionary of tags names/values
- (void) setTags: (NSDictionary *) tags;

//Returns push notifications token
- (NSString *) getPushToken;

@end