尝试使用SBNotificationHub';将我的ios客户端连接到通知中心;s法
我尝试使用SBNotificationHub将ios客户端连接到通知中心 从WindowsAzureMessaging尝试使用SBNotificationHub';将我的ios客户端连接到通知中心;s法,ios,swift,azure,push-notification,Ios,Swift,Azure,Push Notification,我尝试使用SBNotificationHub将ios客户端连接到通知中心 从WindowsAzureMessaging func registerNative(withDeviceToken deviceToken: Data!, tags: Set<AnyHashable>!) 如何从通知中心接收测试消息 func application(_ application: UIApplication, didRegisterForRemote
func registerNative(withDeviceToken deviceToken: Data!, tags: Set<AnyHashable>!)
如何从通知中心接收测试消息
func application(_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let hub = SBNotificationHub.init(connectionString: "right or wrong data doesn't mean", notificationHubPath: "it always register successfuly")
do {
_ = try hub?.unregisterAll(withDeviceToken: deviceToken)
NSLog("unregistered everything")
_ = try hub?.registerNative(withDeviceToken: deviceToken, tags: nil)
} catch {
alertMessage(message: "Fail to register")
}
}