1

I am using passkit(java). i am created passes and try to install from safari.

when i am download passes from mac mini safari, it download and show the passes. but when download passes from iphone6 and iphone4 safari, it show error "safari cannot download this file".

i am also change htaccess.

You can access the pass here: http://103.14.127.126/devesh/test.html

PassKit
  • 12,231
  • 5
  • 57
  • 75
user3492899
  • 21
  • 1
  • 7

1 Answers1

4

Your pass bundle does not contain an icon.

Nov 28 17:34:28 pfr MobileSafari[2127] <Warning>: Invalid data error reading pass M5AULVCSR9.pass.egratify.gift/9128232779653468419. Pass does not contain icon.png/icon@2x.png/icon3x.png
Nov 28 17:34:28 pfr MobileSafari[2127] <Warning>: PassBook Pass download failed: The pass cannot be read because it isn’t valid.

You also should not be including your certificate in p12 or PEM format in the pass bundle. I would strongly recommend that you revoke this certificate an reissue another.

enter image description here

Once you fix these, your pass will still fail to load because your pass.json has an authenticationToken key, but is missing a webServiceURL. You should either add a valid webServiceURL or remove the authenitcationToken key.

Your final problem is the passTypeIdentifier key. This should match the name of the certificate used to sign your pass. In this case, pass.egiftfy.giftCupon.

{
    "formatVersion": 1,
    "serialNumber": "9128232779653468419",
    "passTypeIdentifier": "M5AULVCSR9.pass.egratify.gift",
    "authenticationToken": "1234567890987653",
    "description": "Devesh kumar",
    "teamIdentifier": "M5AULVCSR9",
    "organizationName": "OrgName",
    "logoText": "Devesh kumar ka pass",
    "foregroundColor": "rgb(255,255,255)",
    "backgroundColor": "rgb(0,255,0)",
    "barcode": {
        "format": "PKBarcodeFormatQR",
        "message": "ABCDEFG",
        "messageEncoding": "UTF-8"
    },
    "storeCard": {
        "primaryFields": [{
            "key": "balance",
            "label": "balance",
            "value": "100",
            "currencyCode": "EUR"
        }]
    }
}

Update

You pass is still failing because the passTypeIdentifier does not match the certificate you have used to sign the pass.

Nov 28 19:14:33 pfr MobileSafari[2127] <Warning>: Invalid data error reading pass pass.egratify.gift/9128232779653468419. The passTypeIdentifier or teamIdentifier provided may not match your certificate, or the certificate trust chain could not be verified.

Looking at your signature file in a hex editor, it looks like you are now signing with an App Developer certificate and not a Pass Type ID certificate.

PassKit
  • 12,231
  • 5
  • 57
  • 75
  • Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackoverflow.com/rooms/66210/discussion-on-answer-by-passkit-safari-cannot-download-this-file-passbook-pass). – Taryn Dec 04 '14 at 13:03
  • 1
    @PassKit - Can you share with us how you manage to get those debug messages from MobileSafari ? - It would help others diagnose problems with their .pkpass files - Thanks! – Fiach Reid Sep 21 '15 at 17:16
  • Just hook your phone up to a Mac running Xcode and look in the console log for the device. – PassKit Sep 24 '15 at 11:17