Skip to content

Push notifications

Before you begin

Register for remote notifications

Either at startup, or at the desired point in your application flow, register your app for remote notifications.

The SDK provides a wrapping method that simplifies integration. Simply call the following method:

[SohaSDK requestPushNotification];
By calling this method, the wrapped code will be executed, and any necessary integration steps will be handled internally. This method will take care of registering for remote push notifications and handling the notification center's delegate

Access the registration token

Implement the application(_:didRegisterForRemoteNotificationsWithDeviceToken:) method to retrieve the APNs token, and then call SohaSDK registerDeviceToken:

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    [SohaSDK registerDeviceToken:deviceToken];
}