i am working on creating a coupon for ipassbook using passsource.com, does anybody know how iphone determines which application to open based on the url?
I created a sample coupon with passsource.com API and it redirected me to the following URL
http://www.passsource.com/create.php?data=eNortjIxsVIKCUpyyzRIiwox1Q4Jjig38rNwNw73145wtkiqLE43zYsIsSjxjYxyDHZ1tVWyBlwwl9EPgQ,,&template_id=2
Asking to send this to the user, if the user opens this URL in the iphone it opens passbook application. I did not understand how? I even verified particular headers but none specific.
I tried chrome’s Override user-agent setting to see what actually happens.
User agent for iphone ios6 is
Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5If i modify the user-agent as above, the file with .pkpass extension is getting downloaded instead of opening the page. I assume safari will have mime-type mapping to ipassbook for opening files with.pkpass extension