Passbook gem let's you create pkpass for passbook iOS 6
TODO : push the gem to rubygems.org
Configure it with config/initializers/passbook.rb
Passbook.configure do |passbook|
passbook.p12_cert = Rails.root.join("cert.p12")
passbook.p12_password = 'cert password'
end
Please refer to apple iOS dev center for how to build cert and json
pass = Passbook::PKPass.new 'your json data'
pass.addFile 'Path to your file'
pkpass_path = pass.create
send_file pkpass_path, type: 'application/vnd.apple.pkpass', disposition: 'attachment', filename: "pass.pkpass"
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request