简体   繁体   English

即使我的iOS设备中没有Google地图,“ canOpenURL”也返回true?

[英]'canOpenURL' returning true even when I don't have google maps in my iOS device?

I have GoogleMaps SDK in my app but don't have google maps iOS app in my device but still UIApplication.shared.canOpenURL(URL(string:"comgooglemaps://")!) returns true instead of false . 我的应用程序中装有GoogleMaps SDK,但设备上没有Google Maps iOS应用程序,但UIApplication.shared.canOpenURL(URL(string:"comgooglemaps://")!)返回true而不是false

How can I handle this problem? 我该如何解决这个问题?

Any Help. 任何帮助。

yes. 是。 it can. 它可以。

if ANY installed app claims it can handle the url scheme 'comgooglemaps' 如果任何已安装的应用声称可以处理url方案'comgooglemaps'

there is no 1 to 1 fixed relationship for urls to apps. 应用程式的网址没有一对一的固定关系。 any app(s) can claim any protocol 任何应用都可以声明任何协议


you cant really avoid this im afraid. 您不能真正避免这种恐惧。 not if you use urls. 如果您使用网址则不会。 you can look at DocumentControllers or ActivityItems to share with user interaction 您可以查看DocumentControllers或ActivityItems与用户互动分享

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

相关问题 即使未安装应用程序,canOpenURL 也会为自定义 URL 方案返回 true - canOpenURL returning true for custom URL scheme even if app is not installed 当我的MKTileOverlay集中没有图块时,使MapView显示普通的Apple Maps - Make MapView display normal Apple Maps when I don't have a tile in my MKTileOverlay set 如何禁用canOpenURL? 我不希望我的UIWebView打开官方应用程序 - how do I disable canOpenURL? I don't want my UIWebView to open up the official app 有没有一种方法可以设置iOS模拟器默认值,以便在重置设备时不必重置键盘和Facebook? - Is There a Way to Setup iOS Simulator Defaults so I Don't Have to Reset Keyboard & Facebook When I Reset the Device? 在设备上运行时没有childNodes - Don't have childNodes when running on device iOS canOpenURL返回true,但未安装应用程序(facebook) - iOS canOpenURL returns true, but app is not installed(facebook) 当我的字符串中没有表情符号时,NSString崩溃 - NSString crash when I don't have emoji in my string 适用于iOS的Google Maps SDK:不支持小端序位图 - Google Maps SDK for iOS: don't support little endian bitmaps AngularJS和Google Maps-iOS上无法识别标记上的链接 - AngularJS and Google Maps - Links on Markers don't recognized on iOS 谷歌地图Javascript API在IOS设备上无效 - Google maps Javascript API doesn`t work on IOS device
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM