Sharing Passbook Passes .pkpass

萝らか妹 提交于 2019-12-03 20:34:21

Safari should recognise these.

I think you probably need to add the MIME type to your web server, so it knows how to present the file to visitors.

Edit: the MIME type you need to add to your web server is application/vnd.apple.pkpass

Passbook is only availiable on the iPhone 5 or phone users that have upgraded is iOS6. It is also available on the latest OS X Mountain Lion 10.8.2 release.

If the person doesn't have any of these, when they see it in their email, it will just show the .pkpass file as is. If they have Passbook on their device, it will do some graphical markup to it and they can click to add it to Passbook.

The MIME type has to be supported by your email server, but since you received the pass, it appears your server supports it, or doesn't care. In my case, we had issues with Amazon Web Services Simple Email Services as their WebAPI wasn't accepting files of type:

application/vnd.apple.pkpass

Which has been remedied.

https://forums.aws.amazon.com/thread.jspa?messageID=384277

To download a passbook file in Safari (mobile and desktop), you have add the correct mimetype to your server. To do so, you can simply create an .htaccess file (or edit the existing one) and append the following line:

AddType application/vnd.apple.pkpass .pkpass

This will do the magic. After this change, if you'll click on a link <a href="..."> that points to a .pkpass file using Safari mobile on your iPhone it will automatically open it with Passbook.

Ev.

I think that the pkpass files will only be recognised by:

  • Devices running iOS6 and above (i.e. with the passbook App installed)
  • Safari on OSX 10.8.2 (or above)

Edit: Google Chrome Version 23.0.1271.91 and above on iOS6 now also supports direct download of .pkpass files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!