Delegate Methods

Default Handling of Remote Notifications

Netmera automatically handles all UIApplicationDelegate methods related to remote notifications. You don’t need to implement these methods in your App Delegate unless your app has special use cases that require custom logic.

Custom Implementation (If Needed)

If your app needs custom handling for remote notification delegate methods, you can implement them in your UIApplicationDelegate. You can then add your specific logic inside those methods. For more details on the delegate methods related to push notifications, check the: UI Application Delegate Protocol Referencearrow-up-right.

Accessing Notification Data

To retrieve the remote notification payload, use the [Netmera recentPushObject] or Netmera.recentPushObject() method. This method returns a NetmeraPushObject instance, which contains the notification data. You can call this method within your UIApplicationDelegate methods to access the data of the received notification.

Push Delegate Methods

Netmera iOS SDK provides delegate protocols to customize and observe push notification behavior.

There are two delegate protocols:

  • NetmeraPushDelegate → Customize how push notifications are presented and handled

  • NetmeraPushLifecycleDelegate → Listen to push lifecycle events

To enable these callbacks, set the delegates in your AppDelegate:

Netmera.setPushDelegate(self)
Netmera.setPushLifecycleDelegate(self)

NetmeraPushDelegate

NetmeraPushDelegate allows you to customize how push notifications are presented and handled in your app.

With this delegate you can control:

  • Web view presentation

  • Foreground notification presentation

  • URL opening behavior


NetmeraPushLifecycleDelegate

NetmeraPushLifecycleDelegate allows you to observe push lifecycle events, such as receiving or opening a push notification.

Last updated

Was this helpful?