nomad-cli / houston

Apple Push Notifications; No Dirigible Required
http://nomad-cli.com
MIT License
2.93k stars 229 forks source link

How to send dictionary object in alert body #57

Closed chinamty closed 10 years ago

chinamty commented 10 years ago

Hi, I want have a test with Localized Formatted Strings with APNS. But it seems that I can only send string object in alert body. How to send dictionary such like

"alert" : {
    "loc-key" : "GAME_PLAY_REQUEST_FORMAT",
    "loc-args" : [ "Jenna", "Frank"]
}

Thanks a lot.

sideshow commented 10 years ago

You can just do this;

Houston::Notification.new(:alert => {
   "loc-key" => "GAME_PLAY_REQUEST_FORMAT", 
   "loc-args" => [ "Jenna", "Frank"]
})
chinamty commented 10 years ago

Thanks a lot.