canOpenURL not working in ios 10

info.plist, ios, ios10, openurl, swift

Solution

Add this to your Info.plist and then try calling canOpenURL.

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>comgooglemaps</string>
</array>

Problem

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

Original source

Related problems