简体   繁体   English

检测是否从另一个应用程序中安装了iOS应用程序

[英]Detect if iOS app is installed from within another app

I have a button on my iOS app that will launch a third party app via deeplinking, but if said app is not installed, the button will not do anything. 我的iOS应用程序上有一个按钮,该按钮将通过深度链接启动第三方应用程序,但是如果未安装该应用程序,则该按钮将无任何作用。

How can I check if the app is installed first, if not, prompt the user to download it? 如何检查是否先安装了该应用程序,如果未安装,则提示用户下载该应用程序?

Button code: 按钮代码:

@IBAction func didTapEdmodo(sender: AnyObject) {
    UIApplication.sharedApplication().openURL(NSURL(string: "edmodo://")!)
}

You can call canOpenURL: to check. 您可以调用canOpenURL:进行检查。 Note that you need to declare the URL scheme in your info.plist before you can make the request. 请注意,在发出请求之前,需要在info.plist中声明URL方案。 This is done using the LSApplicationQueriesSchemes key. 这是使用LSApplicationQueriesSchemes键完成的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有一种方法可以通过Javascript检测是否在(Android \\ iOS)设备上安装了特定应用程序? - Is there a way to detect if a specific app is installed on (Android\iOS) device from Javascript? 检测从iOS安装的本机应用Google Chrome浏览器 - Detect native app installed from iOS Google Chrome Browser 检测是否已在Java中使用JavaScript安装了应用 - Detect if an app has been installed on iOS in JavaScript 检测iOS中安装的应用程序版本? - Detect which version of an app is installed in iOS? 是否可以从iOS中的当前应用检测到另一个应用? - Is it possible to detect another application from the current app in iOS? 检测是否在iPad或iPhone(iOS6和iOS7)上安装了应用 - Detect if an app is installed on iPad or iPhone (iOS6 & iOS7) 检测是否未安装DropBox应用 - Detect if DropBox app is not installed 如何检测iOS应用程序已重新安装(从XCode)或升级(从AppStore) - How to detect an iOS App has been re-installed (from XCode) or upgraded (from AppStore) 如何检查用户是否从另一个应用程序安装了我的应用程序? iOS(统一) - How to check if a user installed my app from my another app? iOS (Unity) 如何检测是从应用商店还是从MDM商店安装了应用? - How to detect if app was installed from the app store or from MDM store?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM