frozon / passbook

Passbook gem let's you create pkpass for passbook iOS 6
MIT License
234 stars 66 forks source link

Push notification passphrase #52

Closed avinoth closed 8 years ago

avinoth commented 8 years ago

Support Push notification passphrase as config attribute. Merge last-modified header feature from #26

frozon commented 8 years ago

LGTM if you could also review @lgleasain

rmosolgo commented 8 years ago

:+1: I was getting an error from apple for not including this header, but updating to this branch worked for me.

I also ran into the passphrase issue, but I worked around it by using Grocer's notification API directly:

    pusher = Grocer.pusher(
      certificate: Passbook.notification_cert,
      passphrase:  Passbook.p12_password,
      gateway: Rails.env.test? ? "localhost" : "gateway.push.apple.com",
    )

    PassbookDevice.find_each do |device|
      notification = Grocer::PassbookNotification.new(device_token: device.push_token)
      pusher.push(notification)
    end

Thanks for pushing this fix, I hope it can be merged soon!

avinoth commented 8 years ago

@frozon Changed the way empty passphrase is handled, brought down the version bump and squashed the commits. :+1:

frozon commented 8 years ago

Thanks for your work on it