iOS Question App.CanOpenUrl() ??

ilan

Expert
Licensed User
Longtime User
hi

i want to open a link from my app using a button.
so before i open the url i am checking if app can open url like this:

B4X:
    Dim link As String = "https://www.youtube.com/watch?v=TR0svC5KVeE"
    If App.CanOpenURL(link) Then App.OpenURL(link)

but the app doesnot open the url so i put in the if condition an else condition and log("cannot open")

and i get in logs cannot open so that means for me that the app cannot open the url

BUT if i remove the check and directly call App.OpenURL(link) the app does open the URL
so what could be the reason that in the check i get a "cannot open url" but when i remove the check it does open the url?

thanx, ilan


EDIT: i also get that warning in the logs: (but again when i remove the check it does open the url!!!)

-canOpenURL: failed for URL: "youtube://www.youtube.com/watch?v=TR0svC5KVeE" - error: "This app is not allowed to query for scheme youtube"
 
Top