如何从浏览器打开iOS应用程序?

每当用户在浏览器中打开我的应用程序的链接时,我必须打开我的iOS应用程序。 我已经使用了一个像myApp://但是我想打开我的应用程序,甚至当用户从浏览器打开一个http链接。 就像pinterest。 即使我打开像http://www.pinterest.com/pseudoamber/这样的常规http链接,并使用URLscheme,也可以像pinterest://www.pinterest.com/pseudoamber/这样的pinterest://www.pinterest.com/pseudoamber/打开应用程序。 我的应用程序打开myApp://www.myapp.com现在我想打开我的应用程序,当用户打开这样的http链接http://www.myapp.com

任何人请帮助

这里是一个使用jQuery的例子:

 $(document).ready(function() { var user_agent_header = navigator.userAgent; if(user_agent_header.indexOf('iPhone')!=-1 || user_agent_header.indexOf('iPod')!=-1 || user_agent_header.indexOf('iPad')!=-1){ setTimeout(function() { window.location="myApp://www.myapp.com";}, 25); } });