Skip to content

Instantly share code, notes, and snippets.

@justinplatz
Created August 5, 2015 00:05
Show Gist options
  • Select an option

  • Save justinplatz/1a730234089e4decaade to your computer and use it in GitHub Desktop.

Select an option

Save justinplatz/1a730234089e4decaade to your computer and use it in GitHub Desktop.
@IBAction func alertButtonTapped(sender: AnyObject) {
var payload =
["debug":true,
"aps":
["alert":"Ping From \(userName)",
"badge":"1",
"sound":"default"]
]
let appDel = UIApplication.sharedApplication().delegate! as! AppDelegate
var pushChannel = chan + "push"
appDel.client?.publish(
"test",
toChannel: pushChannel,
mobilePushPayload: payload as [NSObject : AnyObject],
withCompletion: nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment