Client Libraries

Code iOS/Objective C

We recommend using Cocoapods to integrate with ZeroPush on the client side.

Inbox Installation

To install the ZeroPush Pod, add the following to your Podfile

pod 'ZeroPush', '~> 1.1.0'

and install the Pods

$> pod install

This will add the ZeroPush source to your Pods project in the xcworkspace.

Alternatively, if your project does not use Cocoapods, you can add ZeroPush from source. It can downloaded from our GitHub page:

Settings 3 Configuration

After the client library has been installed, add the following to your AppDelegate.

// In your application delegate
- (void)applicationDidBecomeActive:(UIApplication *)application
    [ZeroPush engageWithAPIKey:@"your-zeropush-auth-token" delegate:self];
    [[ZeroPush shared] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert |
                                                           UIRemoteNotificationTypeBadge |

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)tokenData
    // Call the convenience method registerDeviceToken, this helps us track device tokens for you
    [[ZeroPush shared] registerDeviceToken:tokenData];

    // This would be a good time to save the token and associate it with a user that you want to notify later.
    NSString *tokenString = [ZeroPush deviceTokenFromData:tokenData];
    NSLog(@"%@", tokenString);
updated on Sun Feb 2 17:30:04 2014