Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试使用SBNotificationHub';将我的ios客户端连接到通知中心;s法_Ios_Swift_Azure_Push Notification - Fatal编程技术网

尝试使用SBNotificationHub';将我的ios客户端连接到通知中心;s法

尝试使用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

我尝试使用SBNotificationHub将ios客户端连接到通知中心 从WindowsAzureMessaging

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")
        }
    }