首页 > 解决方案 > How to fix issue regarding pkpass not working after dragging to ios simulator?

问题描述

I am currently creating a passcard for my app but unfortunately, it is not working. Passcard is not showing in the simulator when dragging it or event downloading it from my email. My pass.json codes are below.

"formatVersion" : 1,
"passTypeIdentifier" : "pass.com.example",
"serialNumber" : "0000000",
"teamIdentifier" : "xxxxxxxx",
"barcode" : {

"message" : "123456789",
"format" : "PKBarcodeFormatPDF417",
"messageEncoding" : "iso-8859-1",
 },

"organizationName" :  "companyname",
"description" : "companytagline",
"logoText" : "companyname",
"foregroundColor" : "rgb(255,255,255)",
"backgroundColor":  "rgb(0,100,0)",
"generic" : {
"auxiliaryFields" : [
{
    "key" : "patientName",
    "label" : "NAME",
    "value" : "Retail Pharmacy 1, Test Patient"
    },

{
    "key" : "gender",
    "label" : "GENDER",
    "value" : "Female"
    }
],

}

} 

This is what I have in my Terminal

hopprlabs-iMac:Desktop developer1$ ./signpass -p healthpass.raw/
 2019-02-19 10:10:39.483 signpass[2096:231781] {
".DS_Store" = df2fbeb1400acda0909a32c1cf6bf492f1121e07;
"Icon.png" = 295cb779e5e185efefd6c5e9a2a94c3352e51b2a;
"Icon@2x.png" = 987db966ddc28a72d6bfd15a6565d191be06d0f0;
"pass.json" = 3e66cf17f758939547932654c3394e42470d1c94;
"thumbnail.png" = 2a616d4490d1e12d81ddb0610df6b992ad79aeca;
}

标签: iospassbookwallet

解决方案


感谢您通过电子邮件发送。看了包装,好像你的图标文件有问题。

iPhone 像这样报告这个错误:

无效数据错误读取 pass.com./0000000。通行证不包含 icon.png/icon@2x.png/icon@3x.png

我建议你的图标文件名小写,所以 icon.png 而不是 Icon.png。我也会包含@3x 大小的文件。


推荐阅读