Safari IOS无法下载pkpass howerver mac safari成功打开它,
我收到以下错误...
样本可以在这里找到.. http://home.shortkut.co/api/public/PassbookCoupon.pkpass/
我还传递了正确的内容类型。
内容类型:application / vnd.apple.pkpass
内容处置:附件; filename = pass.pkpass
我的pass.json看起来如下...
{
"passTypeIdentifier":"pass.co.shortkut.home",
"formatVersion":1,
"serialNumber":"01927847623423234234",
"description":"Shalimar 20 Coupon",
"organizationName":"Shortkut.co",
"teamIdentifier":"*******",
"logoText":"Home.Shortkut.co",
"foregroundColor":"rgb(255,255,255)",
"backgroundColor":"rgb(0,0,0)",
"coupon":
{"headerFields":[],
"primaryFields":[{"key":"discount","label":"Discount","numberStyle":"PKNumberStylePercent","value":0.01}],
"secondaryFields":[],
"auxiliaryFields":[],
"backFields":[]},
"barcode": {"format":"PKBarcodeFormatPDF417","message":"01927847623423234234","messageEncoding":"UTF-8","altText":"01927847623423234234"}
}
我究竟做错了什么?
已更新:网址:http://home.shortkut.co/api/public/PassbookCoupon.pkpass/
最佳答案
您的问题是您的.pkpass捆绑包不包含图标。
Apr 27 15:36:51 iPhone Chrome[620] <Warning>: Invalid data error reading pass pass.co.shortkut.home/01927847623423234234. Pass does not contain icon.png/[email protected]/[email protected]
将icon.png图像添加到捆绑包中,您就可以了。