<tfoot id='chpgA'></tfoot>
    <i id='chpgA'><tr id='chpgA'><dt id='chpgA'><q id='chpgA'><span id='chpgA'><b id='chpgA'><form id='chpgA'><ins id='chpgA'></ins><ul id='chpgA'></ul><sub id='chpgA'></sub></form><legend id='chpgA'></legend><bdo id='chpgA'><pre id='chpgA'><center id='chpgA'></center></pre></bdo></b><th id='chpgA'></th></span></q></dt></tr></i><div id='chpgA'><tfoot id='chpgA'></tfoot><dl id='chpgA'><fieldset id='chpgA'></fieldset></dl></div>

      <legend id='chpgA'><style id='chpgA'><dir id='chpgA'><q id='chpgA'></q></dir></style></legend>
    1. <small id='chpgA'></small><noframes id='chpgA'>

      • <bdo id='chpgA'></bdo><ul id='chpgA'></ul>

    2. 从 UIWebView 可靠地打开 App Store 链接

      时间:2023-10-22
      <i id='Pk2oE'><tr id='Pk2oE'><dt id='Pk2oE'><q id='Pk2oE'><span id='Pk2oE'><b id='Pk2oE'><form id='Pk2oE'><ins id='Pk2oE'></ins><ul id='Pk2oE'></ul><sub id='Pk2oE'></sub></form><legend id='Pk2oE'></legend><bdo id='Pk2oE'><pre id='Pk2oE'><center id='Pk2oE'></center></pre></bdo></b><th id='Pk2oE'></th></span></q></dt></tr></i><div id='Pk2oE'><tfoot id='Pk2oE'></tfoot><dl id='Pk2oE'><fieldset id='Pk2oE'></fieldset></dl></div>

              <tbody id='Pk2oE'></tbody>

            <small id='Pk2oE'></small><noframes id='Pk2oE'>

              • <bdo id='Pk2oE'></bdo><ul id='Pk2oE'></ul>
              • <legend id='Pk2oE'><style id='Pk2oE'><dir id='Pk2oE'><q id='Pk2oE'></q></dir></style></legend>
                <tfoot id='Pk2oE'></tfoot>
                本文介绍了从 UIWebView 可靠地打开 App Store 链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个应用程序可以在 UIWebView 中显示网页.它显示的页面可能包含指向 App Store 上其他 iPhone 应用程序的链接.

                I have an app that will display web pages within a UIWebView. The pages it shows may contain links to other iPhone apps on the App Store.

                在台式计算机上的普通浏览器中,单击这些 App Store 链接将引导我通过一些 URL 重定向,最终打开 iTunes 并将我带到该应用程序的页面.

                In a normal browser on a desktop computer, clicking these App Store links would take me through a number of URL redirects and eventually end up opening iTunes and taking me to the page for that App.

                有没有办法确保在我的 UIWebView 中点击 App Store 链接时,iPhone 上的 App Store 应用会打开并显示该应用?

                Is there a way to ensure that when an App Store link is clicked inside my UIWebView that the App Store app on the iPhone will open and show the app?

                我在测试中看到的是,有几种类型的链接可以生成 App Store 页面,它们是:

                What I've been seeing in my tests is that there are several types of links that can result in an App Store page, those being:

                • phobos 链接 - phobos.apple.com/etc 等
                • itunes.com/app/appname 链接
                • 推荐/附属链接
                • 任何我不知道的事情

                当我在桌面浏览器中打开这些链接中的任何一个时,它们都会起作用并最终打开 iTunes.当我从 iPhone 中打开这些链接中的任何一个时,UIWebView 会经历许多重定向,最终会发生以下两种情况之一:

                When I open any of these links in a desktop browser they will work and eventually open iTunes. When I open any of these links from within the iPhone the UIWebView goes through a number of redirects and eventually one of two things will happen:

                • 重定向无法正常工作,我最终得到一个页面确实无法加载方法调用
                • 重定向工作,iTunes 应用程序打开,应用程序名称搜索完成,然后我从 iTunes 收到一条消息,说明它无法连接到商店.

                我唯一能够打开 App Store 应用程序的方法是使用直接 iTunes 链接到该应用程序,而无需任何推荐或重定向.

                The only time I've been able to get the App Store app to open is by using a direct iTunes link to the app without any referral or redirects.

                显然,对于推荐或附属链接,我不想去掉推荐 ID 或附属 ID.如果点击的是他们的链接,我不应该剥夺他们的推荐.

                Obviously for referral or affiliate links, I do not want to strip out the referral ID or affiliate ID. I shouldn't deprive them of a referral if it was their link that is clicked.

                所以任何帮助将不胜感激.

                So any help would be greatly appreciated.

                谢谢.

                推荐答案

                我找到了这个技术问答 回答了我的问题:

                I found this Technical Q&A from Apple that answers my question:

                基本要点是这样的:

                正确构建的 phobos.apple.com 链接将直接重定向到 App Store 应用.itunes.apple.com 链接必须转换为 phobos 链接.必须使用 NSURLConnection 遍历推荐/附属链接,最终生成的 URL 将是可以使用的 phobos 链接.

                phobos.apple.com links constructed properly will redirect directly to the App Store app. itunes.apple.com links must be converted into phobos links. referral/affiliate links must be traversed using NSURLConnection and the final resulting URL will be a phobos link that can be used.

                感谢你们的帮助.

                这篇关于从 UIWebView 可靠地打开 App Store 链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何通过“下拉和释放"刷新 UIWebView手势? 下一篇:带有嵌入式 UIWebView 的 Facebook-ios-sdk

                相关文章

              • <i id='VYCrK'><tr id='VYCrK'><dt id='VYCrK'><q id='VYCrK'><span id='VYCrK'><b id='VYCrK'><form id='VYCrK'><ins id='VYCrK'></ins><ul id='VYCrK'></ul><sub id='VYCrK'></sub></form><legend id='VYCrK'></legend><bdo id='VYCrK'><pre id='VYCrK'><center id='VYCrK'></center></pre></bdo></b><th id='VYCrK'></th></span></q></dt></tr></i><div id='VYCrK'><tfoot id='VYCrK'></tfoot><dl id='VYCrK'><fieldset id='VYCrK'></fieldset></dl></div>

                  <tfoot id='VYCrK'></tfoot>
                  1. <small id='VYCrK'></small><noframes id='VYCrK'>

                      <bdo id='VYCrK'></bdo><ul id='VYCrK'></ul>
                  2. <legend id='VYCrK'><style id='VYCrK'><dir id='VYCrK'><q id='VYCrK'></q></dir></style></legend>