Enabling Passbook pkpass is useful for Safari on Mountain Lion

Apparently Mountain Lion 10.8.2 Safari "supports" Passbook pass, as it will browse and offer to sync ".pkpass" files with iCloud for a user-configured iPhone to load into Passbook.

However, I did not find any documentation on how to force the browser to download such a file, except that the user explicitly downloads such a file.

Ideally, there will be a <link rel="alternate" type="application/vnd.apple.pkpass"> or similar tag so that a supporting (and appropriately configured) browser can pick it up and offer it. I cannot find mention of such a function.

In addition, the user will need to "click here" to download pkpass and hope that they know what it is and what to do with it. Otherwise, it is an opaque blob in the download folder.

Obviously, I do not want to explicitly sniff the User-agent for iOS 6 or OS X 10.8.2 and higher, as this will also not check if the user has been configured with iCloud, and also excludes support for PassWallet and similar Android applications, etc. ., as well as other supporting browsers.

+8
safari ios osx-mountain-lion passbook
source share
2 answers

The obvious solution is to include an Accept header for the content type vnd.apple.pkpass. This is the intent of this heading.

This is not in the hands of a single developer, unfortunately.

Microsoft does this for the .Net Framework, where they send this information as part of the User-Agent. This allows you to determine if the .NET Framework is installed on the guest machine.

OS X Lion should include this header in all issued browser requests, and iOS devices should also send it.

Currently, the best option you will have is the one you have outlined. If the UserAgent is for iOS or OS X Lion, you can conclude that it is supported. This is not ideal, but the best you can do now.

+2
source share

The server needs to send the header "Content-type: application / vnd.apple.pkpass" with the pkpass file.

-one
source share

All Articles