xtremelabs / xl-passbook-ruby

Apache License 2.0
16 stars 10 forks source link

Downloading pass in Safari #16

Closed Sjors closed 11 years ago

Sjors commented 11 years ago

I'm not sure if this is related to Rails 4 or something else. I'm able to download a pass on my Mac, but when I try to download it on my iPhone I get a popup telling me that it can't download it.

Server log:

Started GET "/addresses/35/pass.pkpass" for 192.168.1.53 at 2013-05-18 18:26:04 +0200
Processing by PassesController#find_or_create as PKPASS
  Parameters: {"mime_type"=>"", "pass_type_id"=>"...", "address_id"=>"35"}
  Address Load (0.5ms)  SELECT "addresses".* FROM "addresses" WHERE "addresses"."id" = $1 LIMIT 1  [["id", "35"]]
  Pass Load (0.4ms)  SELECT "passes".* FROM "passes" WHERE "passes"."address_id" = $1 ORDER BY "passes"."id" ASC LIMIT 1  [["address_id", 35]]
  Rendered text template (0.0ms)
Sent data eDk1TncwK2JWbEI2THFlTUhnQkV5RW1BUEwxdllMWW5lVTZ4MWQ3UTY4eDI2czJi.pkpass (0.5ms)
Completed 200 OK in 9ms (Views: 6.0ms | ActiveRecord: 0.9ms)

I commented out the pass type id.

The link looks like this: <a href="/addresses/35/pass.pkpass" mimetype="application/vnd.apple.pkpass"> <img alt="Passbook" src="/images/passbook.png"></a>

I added the mime-type in a few extra places just in case .I'm using the standard example pass, with only the teamIdentifier and passTypeIdentifier set to my own.

I also noticed that after 10 minutes, the pass I downloaded on my Macbook still hasn't shown up on the device. This could suggest that there is something wrong with the pass that my Macbook doesn't mind but the iPhone does.

Any idea what might be going wrong or how I can further debug this?

xtreme-andrei-dinin commented 11 years ago

plug the device through USB and look at the console for the device in XCode. The console shows the real error. Hope that helps. Thank you for finding the other problem in Rails4. I'll look at it in a couple of days, its the long weekend in Canada :)

Sjors commented 11 years ago

Thanks, that was really helpful.