Take Baidu map as an example:
< A Href = "Http://itunes.com/#/baidu map" > Baidu Map </ A > <! -- ITunes --> < A Href = "Itms: // itunes.com/#/baidu map" > Baidu Map </ A > <! -- ITunes then jump to App Store (ios5) to iTunes (ios4) --> < A Href = "Itms-apps: // itunes.com/#/baidu map" > Baidu Map </ A > <! -- App Store --> < A Href = "Http://itunes.apple.com/app/id452186370" > Baidu Map </ A > <! -- App Store --> < A Href = "Itms: // itunes.apple.com/app/id452186370" > Baidu Map </ A > <! -- ITunes then jump to App Store (ios5) to App Store (ios4) --> < A Href = "Itms-apps: // itunes.apple.com/app/id452186370" > Baidu Map </ A > <! -- App Store -->
All of the above methods can be implemented, the difference is that the first jump to iTunesProgram, The second and fifth will jump to the iTunes program first on ios5, then to the App Store, and then to iTunes on ios4, and the other to the app store. Other solutions will jump directly to the app store.
Another point is that using the HTTP protocol will cause a redirect. You will see that the browser loads the URL first and then jumps to the corresponding program. The itms and itms-apps protocols will not.
AboveCodeIt was tested on iPhone 4S (ios5.1), iPhone 4 (ios4.3), and iPad (ios5.1.1.
Conclusion:
We recommend that you use the following method for redirect. The reason is: the behavior of each IOS version is consistent (at least the ones I tested are consistent), and there is no redirect process, so the experience is better:
<AHref= "Itms-apps: // itunes.apple.com/app/id452186370">Baidu Map</A>
References:
- Technical Q & A qa1633
- Technical Q & A qa1629
- Apple URL scheme reference
- Http://stackoverflow.com/questions/433907/how-to-link-to-apps-on-the-app-store