Created
September 16, 2013 08:31
-
-
Save moosan63/6577999 to your computer and use it in GitHub Desktop.
gem houstonのpush試作
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'houston' | |
content_type :json, :charset => 'utf-8' | |
APN = Houston::Client.development | |
APN.certificate = File.read("./your/cert-file/path") | |
token = "<device-token>" | |
notification = Houston::Notification.new(device: token) | |
notification.alert = "Hello, World!" | |
notification.badge = 57 | |
notification.sound = "sosumi.aiff" | |
notification.content_available = true | |
notification.custom_data = {foo: "bar"} | |
APN.push(notification) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment