Latest 0.1.2
Homepage https://github.com/verloop/verloop_ios
License MIT
Platforms ios 10.0
Authors

CI Status
Version
License
Platform

Installation

VerloopSDK is available through CocoaPods. To install
it, simply add the following line to your Podfile:

    pod "VerloopSDK"

Then, run the following command:

    $pod install

Usage

  1. Initialise Verloop in application:didFinishLaunchingWithOptions.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let notificationSettings = UIUserNotificationSettings(types: [UIUserNotificationType.badge, UIUserNotificationType.sound, UIUserNotificationType.alert], categories: nil)
    application.registerUserNotificationSettings(notificationSettings)

    let config = VerloopConfig.init(subDomain: "name.stage", token: "test");
    config.name = "testName"
    config.email = "testEmail"
    config.msisdn = "testNumber"
    Verloop.sharedInstance.register(withConfig: config);
    return true
}
  1. Update the device token in application:didRegisterForRemoteNotificationsWithDeviceToken
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    let deviceTokenString = deviceToken.reduce("", {$0 + String(format: "%02X", $1)})
    Verloop.sharedInstance.updateDeviceToken(withDeviceToken: deviceTokenString);
}
  1. Handle notification
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
    if Verloop.sharedInstance.isVerloopNotif(wihtNotif: userInfo) {
        Verloop.sharedInstance.handleNotif(withNotif: userInfo)
    }
}
  1. Start live chat
    Verloop.sharedInstance.showConversation()

Author

Verloop, [email protected]

License

VerloopSDK is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "VerloopSDK",
    "version": "0.1.2",
    "summary": "This SDK allows you to integrate Verloop into your app.",
    "description": "Verloop is a Customer Support and Engagement automation platform. iOS SDK allows you to integrate Verloop into your app and serve customers an improved and faster experience.",
    "homepage": "https://github.com/verloop/verloop_ios",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Verloop": "[email protected]"
    },
    "source": {
        "git": "https://github.com/verloop/verloop_ios.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "VerloopSDK/Verloop/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This