Push and local notifications are a key factor that make the experience better for consumers - they never have to stay in your app or keep the window open as they will get a proactive notification as soon as a reply or notice is available.

Note: In order to enable push notifications, you must also configure them within the LiveEngage UI. See instructions.

  1. This method passes the user info of a remote push notification to the SDK:
public func handlePush(userInfo: [NSObject : AnyObject])
  1. Register device token on LPMesssagingSDK instance:
public func registerPushNotifications(token token: NSData, notificationDelegate: LPMessagingSDKNotificationDelegate? = nil, alternateBundleID: String? = nil)

Note: this method pass the Device Token to the SDK, the actual registration ocurrs only after showConversation method is called.

  1. Will add custom behavior if LivePerson Push Notification was touched
<LPMessagingSDKNotificationDelegate> optional func LPMessagingSDKNotification(didReceivePushNotification notification: LPNotification)
  1. Will hide/show the In-App Push Notification
<LPMessagingSDKNotificationDelegate> optional func LPMessagingSDKNotification(shouldShowPushNotification notification: LPNotification) -> Bool
  1. Override LPMessagingSDK - In-App Push Notification
<LPMessagingSDKNotificationDelegate> optional func LPMessagingSDKNotification(customLocalPushNotificationView notification: LPNotification) -> UIView
  1. Add Custom Tap Behavior to LPMessagingSDK - In-App Notification
<LPMessagingSDKNotificationDelegate> optional func LPMessagingSDKNotification(notificationTapped notification: LPNotification)

Note: This method is override when using a Custom View for the In-App Notification (LPMessagingSDKNotification(customLocalPushNotificationView)

The proprietary SDK notification is only for display purposes, interacting with it will launch the Application, but won't navigate to the Conversation Window/ViewController, for a fully interactive notification host app needs to provide the implementation.

Configuring Push Notifications

Follow the instructions below to set up your certificate and key file to enable push notifications.

Note: Before you begin the setup, you must ensure your LiveEngage account is configured and connected to the SDK.

  1. Enter your LiveEngage account through this Login URL.

    You will need the following info from your LivePerson account team:

    • LiveEngage account number

    • User ID (must be an administrator user)

    • Password

  2. Within LiveEngage, navigate to Campaigns, and click Data Sources.

campaigns

  1. Then select Manage under Mobile App management.

app

  1. Click Add new to associate your app with the LiveEngage account.

keymanagement

  1. Select your platform as iOS, enter your app’s name, and then click Create app. Then, upload your app certificate and key file in the appropriate locations. For more information on your app certificate, please click here.
If you are using a development certificate you should uncheck the Production checkbox and add DEV postfix to the Mobile app name.For example, if your app Bundle ID is AppId, your mobile app name should be "AppId-Dev". If you are using a production certificate you should leave the production checkbox checked and insert to the Mobile App name your App Bundle ID as it is.

Note: there is a 50 character limit for your Bundle ID

newapp

  1. Click Close to complete the process.