您的通行证包不包含图标。
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.
您也不应该在 pass 包中包含 p12 或 PEM 格式的证书。我强烈建议您撤销此证书并重新颁发另一个证书。
修复这些问题后,您的 pass 仍然无法加载,因为您的 pass.json 有一个 authenticationToken 键,但缺少一个 webServiceURL。您应该添加一个有效的webServiceURL 或删除authenitcationToken 键。
您的最后一个问题是passTypeIdentifier 键。这应该与用于签署您的通行证的证书的名称相匹配。在这种情况下,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"
}]
}
}
更新
您的 pass 仍然失败,因为 passTypeIdentifier 与您用来签署 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.
在十六进制编辑器中查看您的签名文件,看起来您现在使用的是 App Developer 证书而不是 Pass Type ID 证书。