Unable to create NFC-Capable PKPass for Apple Wallet

1k Views Asked by At

I have successfully generated a .pkpass file, but it gives following error when trying to open the file:
"The pass “Sample.pkpass” could not be opened."

If I open a prepackaged pkpass from here, it opens successfully. Furthermore, if I use the signpass tool to repackage one of the example folders, it will open successfully.

If I alter my pass.json file to declare:

    "barcode" : {
    "message" : "123456789",
    "format" : "PKBarcodeFormatPDF417",
    "messageEncoding" : "iso-8859-1"
  }

instead of:

 "nfc" : {
    "message" : "04:9B:95:D1:70:00:00",
  }

Then the pass will open successfully and I can add it to Wallet. Alternatively, I can remove the "nfc" and "barcode" portions altogether and the resulting pkpass will open successfully. It seems to be something about the "nfc" declaration in particular that is not right.

According to here and here, I am using the correct key names for an nfc card. I've also tried including "encryptionPublicKey," which is listed as optional.

The whole concept of an NFC Pass in Wallet is elusive, even though it's been in use for years by companies like Hilton for use as a Digital Room Key.

I've requested an "NFC Certificate" from Apple using this form, but who knows how much time that will take, whether it will be approved, or what I am supposed to do with the cert if I did receive it. Also, the goal does not involve ApplePay at all; I just want a pass to present as an NFC card for Door Access with an NFC reader, which should be 100% doable.

Any support or guidance is greatly appreciated.

Additional Reference:
https://tranzer.com/blogs/how-to-create-your-own-wallet-passes-pkpass/


UPDATE: changing the "nfc":{...} to "nfcs":[{...}] has allowed me to save and successfully open the PKPASS file, however, it still does not show as an NFC-capable pass.

I decided to try including "encryptionPublicKey" This post was helpful for that: Apple Wallet NFC encryptionPublicKey

Even after including the encryptionPublicKey, the pass is still not recognized as NFC-capable.

I see references to "enabling the developer setting," ( Generate & Sign an NFC-enabled .pkpass file without encryptionPublicKey ) but I do not see any explanations for where or how to do that. Is it another key in the JSON file?

There has to be some way to test this functionality as a genuine developer without jumping through hoops and buying special hardware.

0

There are 0 best solutions below