[英]'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.