Safari无法下载存折文件.pkpass [英] Safari cannot download passbook file .pkpass

查看:121
本文介绍了Safari无法下载存折文件.pkpass的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网页上有一个链接,该链接应使用户能够从链接下载存折文件,但是,在iPhone上的Safari中单击链接时,出现以下错误消息:

I've got a link on a web page that should enable users to download a passbook file from a link, however when clicking on the link in Safari on an iPhone, I get the following error message:

Safari cannot download this file.

我在此处已阅读类似的问答,并且MIME类型设置为application/vnd.apple.pkpass.可以在Windows手机上下载该文件.

I have read similar Q&As on here, and the MIME type is set to application/vnd.apple.pkpass. The file can be downloaded on a Windows phone.

关于这种情况以及如何解决此问题的任何建议,以便用户可以访问存折文件?

Any suggestions on why this is the case and how to resolve this so users can access the passbook file?

pkpass包含以下文件:

The pkpass contains the following files:

icon.png
logo.png
strip.png
manifest.json
pass.json
signature

manifest.json的示例:

An example of the manifest.json:

{
  "icon.png": "fa6b59072ae5c8163c903d8c8b5f2e4a45fbd49b",
  "logo.png": "3165c9be22cbf76e2b3118972dabaef8918390f5",
  "strip.png": "5d15c45f543e8088c227fc54a6c01d1f9f0b1db3",
  "pass.json": "0f536b34a6b73a7799aae43ff9861dde45a6dfc6"
}

pass.json的示例:

An example of the pass.json:

{
    "passTypeIdentifier":"pass.com.XXXX.sampleticket",
    "formatVersion":1,
    "serialNumber":"TIC1000000518",
    "description":"XXXX",
    "organizationName":"XXXX",
    "teamIdentifier":"W9XR4FBDD4",
    "logoText":"Dragon Bay",
    "foregroundColor":"rgb(0,0,0)",
    "backgroundColor":"rgb(255,255,0)",
    "labelColor":"rgb(0,0,0)",
    "voided":false,
    "eventTicket":{
        "headerFields":[],
        "primaryFields":[],
        "secondaryFields":[{"key":"activity",
            "label":"11/20/2015 12:00 AM",
            "value":"One Day at the Museum"
            }],
        "auxiliaryFields":[],
        "backFields":[{
            "key":"terms",
            "label":"Terms & Conditions",
            "value":"XXXX"
        },
        {
            "key":"contact",
            "label":"XXXX",
            "value":"XXXX"
        },
        {
            "key":"legal",
            "label":"Legal",
            "value":"XXXX"
        },
        {
            "key":"notes",
            "changeMessage":"%@","label":"Notes","value":""
        },
        {
            "key":"lastUpdated",
            "label":"Last Updated",
            "dateStyle":"PKDateStyleMedium",
            "timeStyle":"PKDateStyleShort",
            "isRelative":false,
            "value":"2016-01-08T19:00Z"
        }]
    },
    "barcode":{
        "format":"PKBarcodeFormatPDF417",
        "message":"1000000518",
        "messageEncoding":"UTF-8",
        "altText":"1000000518"
    },
    "authenticationToken":"0123456789ABCDEF",
    "webServiceURL":"XXXX/passbook.svc"
}

推荐答案

我已将webServiceURL更改为使用@PassKit提到的https,此问题已解决.

I changed the webServiceURL to use https as mentioned by @PassKit and the issue was resolved.

这篇关于Safari无法下载存折文件.pkpass的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆