Pushwoosh is well-documented and very easy to integrate. It is nice to have a reliable cross-platform plugin for Unity3D. We love that we can use the Pushwoosh API via our own server to customize push notifications as needed.

Chad Antonson

Purple Penguin

READ TESTIMONIAL

Native iOS SDK

Download SDK Download Sample

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

1. For the truly seamless integration all you have to do is to 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/pushwoosh-sdk-samples/tree/master/iPhone

NOTE: Simulator is not able neither to subscribe nor receive push notifications. Push Notifications SDK supports iOS 4.0 and higher.


Note: If your device is connected to the Internet via WiFi, and messages don’t get through to the device, please make sure APNs ports are not blocked by your firewall.

Push providers, iOS devices, and Mac computers are often behind firewalls. To send notifications, you will need to allow inbound and outbound TCP packets over port 2195. Devices and computers connecting to the push service over Wi-Fi will need to allow inbound and outbound TCP packets over port 5223.

The IP address range for the push service is subject to change; the expectation is that providers will connect by hostname rather than IP address. The push service uses a load balancing scheme that yields a different IP address for the same hostname. However, the entire 17.0.0.0/8 address block is assigned to Apple, so you can specify that range in your firewall rules.


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;

//gets apn payload from the notification
- (NSDictionary *) getApnPayload:(NSDictionary *)pushNotification;

//gets user data from the push payload
- (NSString *) getCustomPushData:(NSDictionary *)pushNotification;

//send geolocation to the server for the geo pushes
- (void) sendLocation: (CLLocation *) location;

@end