测试已测试 | ✗ |
Lang语言 | SwiftSwift |
许可证 | MIT |
Released最后发布 | 2017年6月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
Maintained by Prashant.
VerloopSDK 可通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile:
pod "VerloopSDK"
然后,运行以下命令:
$pod install
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
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let deviceTokenString = deviceToken.reduce("", {$0 + String(format: "%02X", $1)})
Verloop.sharedInstance.updateDeviceToken(withDeviceToken: deviceTokenString);
}
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
if Verloop.sharedInstance.isVerloopNotif(wihtNotif: userInfo) {
Verloop.sharedInstance.handleNotif(withNotif: userInfo)
}
}
Verloop.sharedInstance.showConversation()
Verloop, [email protected]
VerloopSDK 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。