Safari cannot download this file (Passbook Pass)

4.1k views Asked by At

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

1

There are 1 answers

3
PassKit On BEST ANSWER

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/[email protected]/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.