1

我正在尝试使用 BAASBOX 服务从一台 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)
    })

这适用于除徽章编号之外的所有内容。我的问题是徽章编号只接受整数文字。我什至不能在那里使用“让”常量。有什么办法可以解决这个问题,还是我必须找出另一种更新徽章编号的方法?

谢谢!

4

0 回答 0