didRegisterForRemoteNotificationsWithDeviceToken(_:)
, call ASAPP.enablePushNotifications(with deviceToken: Data)
.
To enable push notifications using an arbitrary string that uniquely identifies the device and current user, call ASAPP.enablePushNotifications(with uuid: String)
.
ASAPP.disablePushNotifications(failure:)
. The failure handler will be called in the event of an error. Make sure you call this function before you change or clear ASAPP.user
to prevent the customer receiving push notifications that are not meant for them.
application(_:didReceiveRemoteNotification:[fetchCompletionHandler:])
and pass the userInfo
dictionary to ASAPP.canHandleNotification(with:)
to determine if the push notification was triggered by ASAPP. If the function returns true
, you can then pass userInfo
to: ASAPP.createChatViewControllerForPushing(fromNotificationWith:)
.