ios - 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;
}
解决方案
感谢您通过电子邮件发送。看了包装,好像你的图标文件有问题。
iPhone 像这样报告这个错误:
无效数据错误读取 pass.com./0000000。通行证不包含 icon.png/icon@2x.png/icon@3x.png
我建议你的图标文件名小写,所以 icon.png 而不是 Icon.png。我也会包含@3x 大小的文件。
推荐阅读
- javascript - 是否可以将 HTML 元素及其所有值添加到 localStorage?
- visual-studio-2017 - 单步执行 Linq 查询时打开浏览器窗口 - “找不到源”
- javascript - 使用javascript更改json结果的键和值
- charts - 谷歌图表 - 如何从条形图中删除注释?
- c# - OPC UA:如何打开服务器文件以在 OPC UA 中写入原始数据?
- javascript - 为什么 JavaScript eval 函数会为 number 属性抛出异常?
- java - 与字符串列表的多对多关系?可能吗?
- php - 用于过滤具有多个组合扩展名的文件的模式
- javascript - 在 PHP 中向 AJAX 发送大量参数
- android - Android AudioRecord 缓冲区在有意义的值之前以多个 0 开头