1

I am trying to send a push notification from one iOS device to another using the BAASBOX service. This is the code I am currently using:

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

This works for everything except the badge number. My problem is the badge number only accepts an integer literal. I can't even use a "let" constant in there. Is there any way around this or do I have to figure out another method of updating the badge number?

Thanks!

0 Answers0