I just created an app and a pass, so I can add the pass to the PassBook in iPod, but I cannot share the pass by email or link from web server. From the documentation I read from Apple, I need to add a MIME type as application/vnd.apple.pkpass
. However, I don't understand clearly what steps should I do. I don't know how to use MIME type.
How should I add this MIME type in order to use pass from my web service?
Apache
Add the following line to either:
.htaccess
in the directory serving your .pkpass, ormime.types
file, orhttpd.conf
or virtuatl server .conf
fileThen restart Apache (not required if adding to .htaccess
)
AddType application/vnd.apple.pkpass pkpass
nginx
Add the following line to your mime.types
file and restart nginx
application/vnd.apple.pkpass pkpass;
IIS
.pkpass
application.vnd.pkpass
n the MIME text boxIf you are serving your file via a script and are not able to edit your web server config you could add the following line before any content is sent:
PHP
header('Content-Type: application/vnd.apple.pkpass');
C#
WebClient client = new WebClient();
client.Headers.Add("Content-Type", "application/vnd.apple.pkpass");