Safari IOS 无法打开 PkPass 但 Mac Safari 打开
Safari IOS Fails to open PkPass but Mac Safari opens
Safari IOS 下载 pkpass 失败,但是 mac Safari 成功打开,
我收到以下错误...
示例可在此处找到。http://home.shortkut.co/api/public/PassbookCoupon.pkpass/
我也传递了正确的内容类型。
内容类型:application/vnd.apple.pkpass
Content-Disposition:附件;文件名=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"}
}
我做错了什么?
更新:Url: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/icon@2x.png/icon@3x.png
将 icon.png 图片添加到捆绑包中,应该没问题。
Safari IOS 下载 pkpass 失败,但是 mac Safari 成功打开, 我收到以下错误...
示例可在此处找到。http://home.shortkut.co/api/public/PassbookCoupon.pkpass/ 我也传递了正确的内容类型。 内容类型:application/vnd.apple.pkpass Content-Disposition:附件;文件名=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"}
}
我做错了什么?
更新:Url: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/icon@2x.png/icon@3x.png
将 icon.png 图片添加到捆绑包中,应该没问题。