Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/100.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
如何使用BAASBOX发送iOS推送通知徽章号码_Ios_Swift_Push Notification_Badge_Baasbox - Fatal编程技术网

如何使用BAASBOX发送iOS推送通知徽章号码

如何使用BAASBOX发送iOS推送通知徽章号码,ios,swift,push-notification,badge,baasbox,Ios,Swift,Push Notification,Badge,Baasbox,我正在尝试使用BAASBOX服务将推送通知从一个iOS设备发送到另一个iOS设备。这是我当前使用的代码: BAAClient.sharedClient().postPath("push/message", parameters: ["message":"\(currentUser) followed you!","users":[otherusername],"content-available":1, "badge" :999], success: { (object:AnyObjec

我正在尝试使用BAASBOX服务将推送通知从一个iOS设备发送到另一个iOS设备。这是我当前使用的代码:

    BAAClient.sharedClient().postPath("push/message", parameters: ["message":"\(currentUser) followed you!","users":[otherusername],"content-available":1, "badge" :999], success: { (object:AnyObject!) in
        print("Pushed")
        }, failure: { (error:NSError!) in
            print("Push Failed")
            print(error)
    })
这适用于除徽章号码以外的所有情况。我的问题是徽章号码只接受整数文字。我甚至不能用“let”常量。有没有办法解决这个问题,或者我必须想出另一种方法来更新徽章号码

谢谢