1

I am trying to create a pass for Passbook. I have it all set up with the JSON file and the images, and the pass looks great. However when I scan the code the iPhone says "No pass available for this code". I have added my pass.pkpass on Amazon server but it doesn't work. This is part of the JSON file:

"barcode" : {
  "message" : "https://s3.amazonaws.com/folderPass/pass.pkpass",
  "format" : "PKBarcodeFormatPDF417",
  "messageEncoding" : "iso-8859-1"
},

Don't try it as it is not on at the moment. Anyway my folderPass access is "everyone", and when it was on I tried accessing the link from another Browser not logged in to amazon and it does download the file, so it seams that the permissions are right. Any ideas?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Alessandro
  • 4,000
  • 12
  • 63
  • 131
  • Does the pass open on your iPhone if you browse to the link directly? I'm trying to establish if the pass is valid. – Tomas McGuinness Jun 28 '15 at 12:08
  • It shows the pass file and shows the "Open In..." menu. I can open the pass on the Mac and it displays correctly. If I put the link on safari on the iPhone It gives me no option to add it to passbook, just the Open In menu – Alessandro Jun 28 '15 at 12:10
  • If I follow the link on safari on the Mac it downloads the pass.pkpass file – Alessandro Jun 28 '15 at 12:13
  • I tried with a functioning pass that does download and it works, so it is probably the server – Alessandro Jun 28 '15 at 12:23

1 Answers1

1

Your pass needs to be served in a way that it is "scannable".

See this queston for the criteria. How to built and print a scannable Pass for Passbook in iOS7

For S3, edit the Content-Type header to read application/vnd.apple.pkpass


Update

Your pass is not valid because it does not contain an icon.

Jun 28 21:08:59 pfr MobileSafari[1870] <Warning>: Invalid data error reading pass pass.com.Ugo.Rietmann/5930493008. Pass does not contain icon.png/icon@2x.png/icon@3x.png
Jun 28 21:08:59 pfr MobileSafari[1870] <Warning>: PassBook Pass download failed: The pass cannot be read because it isn’t valid.

Add an icon.png to your .pkpass bundle and you should find that the pass loads.

Community
  • 1
  • 1
PassKit
  • 12,231
  • 5
  • 57
  • 75
  • Did this, the pass downloads, but then at complete shows the same error – Alessandro Jun 28 '15 at 12:34
  • Do you have a working URL that we can replicate your problem with? – PassKit Jun 28 '15 at 12:36
  • Thanks @PassKit. That was great. How did you find this information? – Alessandro Jun 28 '15 at 13:14
  • P.S. weird because my bundle is created with no error on the Mac – Alessandro Jun 28 '15 at 13:14
  • Hook the device up to Xcode and view the console logs as you attempt to install the pass. Technically there is nothing 'wrong' with your JSON or Manifest, but the Signpass tool is crude and will not detect if you are missing a mandatory item such as the icon. – PassKit Jun 28 '15 at 13:16
  • Do you know how to update it as well? I was reading something on "webServiceURL" : "https://www.myserver.com/pathto/service", "authenticationToken" : "PZ8GL23T24JEB41X6U", – Alessandro Jun 28 '15 at 13:19
  • Step 1 - read the manual (all of it), and implement all 5 endpoints listed in the Passbook Web Service Reference. Step 2 - Build an APNS server (or use a third party service) to catch the device token when the pass registers and to initiate a push when you have new content to send. Step 3 - If you completed step one successfully, your web service will receive a request for updated serials, and then for the updated pass. – PassKit Jun 28 '15 at 13:37