Skip to content

Instantly share code, notes, and snippets.

@martinnormark
Created January 22, 2015 22:45
Show Gist options
  • Save martinnormark/f2ccbd85db1b633c8526 to your computer and use it in GitHub Desktop.
Save martinnormark/f2ccbd85db1b633c8526 to your computer and use it in GitHub Desktop.
Query the Apple Push Notification Feedback service using Houston (Nomad-CLI)
#!/usr/bin/env ruby
require 'houston'
certificate = 'cert.pem'
passphrase = ''
client = Houston::Client.production
client.certificate = File.read(@certificate)
client.passphrase = @passphrase
feedbackDevices = client.unregistered_devices
puts "Feedback exists for #{feedbackDevices.length} device(s)"
feedbackDevices.each do |device|
puts "{ token: #{device[:token]}, timestamp: #{device[:timestamp]} }"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment