voltmx.notificationContentExtension Namespace
The voltmx.notificationContentExtension Namespace enables you to add support for Notification Content app extensions in your iOS app. With Notification Content app extensions, your app can display a custom user interface for its notifications. For more information about what Notification Content app extensions are and what you can use them for, refer the Apple developer documentation.
You can add a Notification Content extension to your app in the same way that you add any other type of iOS app extension. For more details, refer App Extension for iOS.
Before your Notification Content extension can be used, your app must set the callback functions that provide the Notification Content app extension with its functionality. It does this by invoking the voltmx.notificationContentExtension.setExtensionsCallbacks function.
Properties
The voltmx.notificationContentExtension Namespace contains the following properties.
voltmx.notificationContentExtension .view
Holds the current extension view.
Syntax
voltmx.notificationContentExtension.view;
Example
Type
UIView
Read/Write
Read only.
Platform Availability
iOS.
Functions
The voltmx.notificationContentExtension Namespace provides the following function.
voltmx.notificationContentExtension.setExtensionsCallbacks
Sets a notification content extension with various states as callback events.
Syntax
Input Parameters
callbacks
Contains an object with key-value pairs where the key specifies the extension state and the value is a callback function. The following are the possible keys.
Key | Description |
---|---|
didReceiveNotification | The app received a notification. |
didReceiveNotificationResponse | The user tapped one of the notification’s actions. |
loadView | Loads a view that the controller manages. |
viewDidAppear | A view was just displayed. |
viewDidDisappear | A view just removed from the view hierarchy. |
viewDidLoad | The controller has loaded its view hierarchy into memory. |
viewWillAppear | A view is about to be displayed. |
viewWillDisappear | A view is about to be removed from the view hierarchy. |
Example: didReceiveNotification
Example: didReceiveNotificationResponse
Example: loadView
Example: viewDidAppear
Example : viewDidLoad
Example: viewWillAppear
Example: viewDidDisappear
Example: viewWillDisappear
Return Values
None.
Platform Availability
iOS.