My name is Gabriel Hernan Vion, I am a young game developer from Argentina. I work in a small digital agency called Quadramma as Interactive Designer.

I was using Unity3d to make an application for a client which needed to have Push Notifications in order to send useful information to their users. As it was my first time working with iOS systems I didn't know where to start. So I googled the problem and tried several different approaches to it, but non of them seemed to work correctly. After dealing with intricate solutions and wasting a lot of time failing I came a across Pushwoosh... And it was Amazing! I couldn't believe how easy it seemed to be!

No tricky coding, no weird systems or plug-ins, no tedious configurations or hours of testing! It was wonderful! Just follow four simple steps and you are good to go! Easy as that!

And if you happen to have any kind of problem, their caring customer support service will provide the assistance that you need.

I am definitely recommending Pushwoosh to my co-workers. And I am planing on using it on my future projects.

Gabriel Hernan Vion

Interactive Designer

Quadramma

READ TESTIMONIAL

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 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: