每当我尝试通过按“添加”按钮安装手动打包的存折应用程序时,标题中都会出现错误。我可以成功安装使用“signpass”工具打包的存折应用程序,但我现在需要在 unix 服务器上创建动态包。
我一直在尝试使用来自网络的各种包手动打包我的存折应用程序,每个包都给我同样的错误。这是我尝试过的几个包: https://github.com/maater/TCSH-PKPass https://github.com/devartis/passbook https://github.com/pcperini/PyPKPass
这是创建和压缩的 pass.json(请注意,teamIdentifier 和 passTypeIdentifier 都已填充):
{
"formatVersion" : 1,
"passTypeIdentifier" : "pass.votizen.membership",
"serialNumber" : "ASDF",
"webServiceURL" : "https://www.votizen.com/passbook/",
"authenticationToken" : "AUTH_TOKEN",
"teamIdentifier" : "MY_TEAM_IDENTIFIER",
"organizationName" : "Matthew Snider",
"description" : "Your voter registration card",
"logoText" : "VOTIZEN",
"labelColor": "#B7B0A8",
"foregroundColor" : "#5F6062",
"backgroundColor" : "#FCFAF5",
"generic" : {
"headerFields": [
{
"key" : "reg_date",
"label": "VOTER SINCE",
"value" : "2002"
}
],
"primaryFields" : [
{
"key" : "party",
"label": "REGISTERED PARTY",
"value" : "Democrat"
}
],
"secondaryFields" : [
{
"key" : "election",
"label" : "NEXT ELECTION",
"value" : "November 6, 2012"
},
],
"auxiliaryFields" : [
{
"key" : "polling_place",
"label" : "POLLING PLACE",
"value" : "268 E Julian Street, San Jose, CA 95112",
"textAlignment" : "PKTextAlignmentLeft"
}
],
"backFields" : [
{
"key" : "elections",
"label" : "ELECTIONS YOU VOTED IN",
"value" : "2010 General\n2008 General\n2008 Primary\n2004 General"
},
{
"key" : "polling",
"label" : "DIRECTIONS TO YOUR POLLING PLACES",
"value" : "https://maps.apple.com/maps?q=268+E+Julian+Street,+San+Jose,+CA+95112"
},
{
"key" : "website",
"label" : "Powered by Votizen",
"value" : "https://www.votizen.com/"
}
]
}
}
我按照苹果上的步骤生成我的 Pass Type ID 证书,下载并安装在我的 Keychain Access 中。然后我将其导出为“Certificates.p12”并运行以下命令以生成 certificate.pem 和 key.pem:
set P12 = Certificates.p12
sef PASSWORD = MY_PASSWORD
openssl pkcs12 -passin pass:$PASSWORD -in "$P12" -clcerts -nokeys -out certificate.pem
openssl pkcs12 -passin pass:$PASSWORD -in "$P12" -nocerts -out key.pem -passout pass:$PASSWORD
创建清单文件后,我运行:
openssl smime -passin pass:$PASSWORD -binary -sign -certfile wwdr.pem -signer certificate.pem -inkey key.pem -in manifest.json -out signature xs-outform DER
我通过将 Apple 全球开发者关系证书颁发机构导出为隐私增强邮件文件来创建 wwdr.pem。
我在某处读到您需要安装 Apple Root Certificate Authority(我有),所以这里是我已安装的证书列表:
- Apple 应用程序集成证书颁发机构 Apple 根 CA
- Apple 根证书颁发机构申请全球开发者关系
- 认证机构
- com.apple.idms.appleid.prd.4f3756614a59746e554a36344e6b55426b64576441413d3d
- com.apple.ubiquity.peer-uuid.207240B0-758A-4C1E-B173-D1B70FF03533
- com.apple.ubiquity.peer-uuid.C5D1968F-8923-48E4-A09D-8C9AE485A88B
- com.apple.ubiquity.ssl-cert.C5D1968F-8923-48E4-A09D-8C9AE485A88B
- iPhone 开发者:Matthew Snider 通行证类型 ID:
- pass.votizen.membership
显然,我正在使用的证书或我打包它的方式有问题。我不知道我做错了什么。我希望有人有一个想法。