This question already has an answer here:
The above code is always returning false
if {(UIApplication.shared.canOpenURL(URL(string:"comgooglemaps://")!))}
I guess this a problem found in iOS10. I am trying to open google maps app if there in one installed or try to open apple maps so wanted to use canOpenURL . are there any alternatives
Add this to your Info.plist and then try calling canOpenURL.
Edit:
The correct key to be used in the app's plist file is
LSApplicationQueriesSchemes
and notUIDefaultLaunchStoryboard
as stated by Apple's documentation.Original answer:
From Apple's documentation:
You can read more about it here.