简体   繁体   中英

'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 .

How can I handle this problem?

Any Help.

yes. it can.

if ANY installed app claims it can handle the url scheme '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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM