ryantenney / passkit4j

Java library for generating Apple Passbook (.pkpass) files

Home Page:http://www.ryantenney.com/passkit4j/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can see the Passbook on my Computer just fine - but not on the iPhone

poornerd opened this issue · comments

I have a sample created with Passk.it and it works fine when I email it to the iPhone.

I tried your sample and made the following changes:

  • commented out the webserviceURL & authenticationToken (since I do not have one)
  • added my teamIdentifier and passTypeIdentifier that I got from Apple when I created the Pass Type Identifier

I can preview the Pass on my Mac, but If I email it to my phone, it won't load. I can't download it in Safari either - even though the mime type is set.

How can I figure out what is wrong?

It has to be the certificates...(right?) can you point me to a blog post that shows exactly what you did? Maybe I am doing something wrong?

ok, so I finally loaded it into the iPhone Simulator in XCode, and saw this message:
04.01.13 02:19:07,410 MobileSafari[93124]: Invalid data error reading card pass.com.poornerd.demo/120008724128441019. value in field balance has both a numberStyle and a currencyCode. It should be one or the other

That fixed it. I had to comment out this line of the Example! you might want to fix it

            .passInformation(
                new StoreCard()
                    .primaryFields(
                        new NumberField("balance", "remaining balance", 25)
                            //.currencyCode("USD")
                    )

Thanks for looking into this! Nowhere in their documentation does it state that numberStyle and currencyCode can't both be included, so I had provided a default value for numberStyle. I fixed that and just released version 1.0.1, which will be available from Maven central within a few hours.