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

      1. <legend id='ppQab'><style id='ppQab'><dir id='ppQab'><q id='ppQab'></q></dir></style></legend>
      2. <tfoot id='ppQab'></tfoot>

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

      3. 如果安装了应用程序,如何以编程方式检查?

        时间:2023-10-03

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

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

                • 本文介绍了如果安装了应用程序,如何以编程方式检查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发一个 iPhone 应用程序,它将在企业中安装少量第三方应用程序.我有关于捆绑 ID 的信息.有没有办法使用一些系统 API 来检查应用程序是否已经安装?目前应用程序再次安装,覆盖当前安装.我需要以某种方式防止这种情况.(如果应用程序已经安装,Apple 的 AppStore 应用程序会禁用安装选项.)

                  I am developing an iPhone application which will install few third party applications in an enterprise. I have the information about the bundle IDs. Is there a way to check if the application is already installed, using some system APIs? Currently the application gets installed again, overwriting the current installation. I need to prevent this some how. (Apple's AppStore application disables the installation option if the app is already installed.)

                  推荐答案

                  我认为这是不可能直接实现的,但如果应用程序注册了 uri 方案,您可以对此进行测试.

                  I think this is not possible directly, but if the apps register uri schemes you could test for that.

                  一个 URI 方案例如是 Facebook 应用程序的 fb://.您可以在应用程序的 info.plist 中注册它.[UIApplication canOpenURL:url] 会告诉你某个 url 是否会打开.因此,如果测试 fb:// 是否会打开,将表明安装了一个注册了 fb:// 的应用程序 - 这对 facebook 应用程序来说是一个很好的提示.

                  A URI scheme is for example fb:// for the facebook app. You can register that in the info.plist of your app. [UIApplication canOpenURL:url] will tell you if a certain url will or will not open. So testing if fb:// will open, will indicate that there is an app installed which registered fb:// - which is a good hint for the facebook app.

                  // check whether facebook is (likely to be) installed or not
                  if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]]) {
                      // Safe to launch the facebook app
                      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"fb://profile/200538917420"]];
                  }
                  

                  这篇关于如果安装了应用程序,如何以编程方式检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在椭圆形或圆形上裁剪 UIImage? 下一篇:如何在当前 UITableViewController 上方添加一个 UIView

                  相关文章

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

                    1. <tfoot id='dnXMh'></tfoot>

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

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