Pushwoosh is awesome. It's a great service. It's affordable. It works. And the Customer Service is outstanding.

We're building a live service for Android and iOS on Unity3d and needed a quick, simple push notification service. Pushwoosh quickly rose to the top with their Unity3d plugin, remote API (for PNs to individual devices) and simple integration. Add to that incredible and responsive customer service and they're the obvious choice.

Farrell Edwards

VP Product Development

XacFAQ, Inc.


Native iOS SDK

Download SDK Download Sample

As per May 14th updated Pushwoosh SDK no longer performs automatic push notifications registration.

If you wish to force old behavior add Pushwoosh_AUTO key to the Info.plist with the value YES.

Also 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

And skip to the step 3.3.

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

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

1. Add Pushwoosh.framework to your project.

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

3.1. Add the following code to the didFinishLaunchingWithOptions function.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
	//lots of your initialization code

	//-----------PUSHWOOSH PART-----------
	// set custom delegate for push handling, in our case - view controller
	PushNotificationManager * pushManager = [PushNotificationManager pushManager];
	pushManager.delegate = self;
	// handling push on app start
	[[PushNotificationManager pushManager] handlePushReceived:launchOptions];
	// make sure we count app open in Pushwoosh stats
	[[PushNotificationManager pushManager] sendAppOpen];
	// register for push notifications!
	[[PushNotificationManager pushManager] registerForPushNotifications];

3.2. Add the following code to your UIApplicationDelegate (same file as above).

// system push notification registration success callback, delegate to pushManager
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
	[[PushNotificationManager pushManager] handlePushRegistration:deviceToken];

// system push notification registration error callback, delegate to pushManager
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
	[[PushNotificationManager pushManager] handlePushRegistrationFailure:error];

// system push notifications callback, delegate to pushManager
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
	[[PushNotificationManager pushManager] handlePushReceived:userInfo];

3.3. To handle push notifications add the following function to your UIApplicationDelegate (the same file as two steps above)

#import <Pushwoosh/PushNotificationManager.h>

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

Add Security.framework and StoreKit.framework to your project to prevent linker errors.

If you would like to hide notification alerts when the app is in the foreground, simply set Pushwoosh_SHOW_ALERT value to NO in your Info.plist

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

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 address block is assigned to Apple, so you can specify that range in your firewall rules.

Push Notifications SDK API: