can-open-url
  • 18 May 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

can-open-url

  • Dark
    Light
  • PDF

Tests if the given URL/URI can be opened by the current device.

If yes, the first output is triggered.

If not, the second output is triggered.

If there's an error in testing the URL, the third output is triggered.

Note that on iOS, you need to define the potential URL/URI schemes your app might use explicity in the Application query schemes section of your app's Build Settings. Otherwise, the flow function will report that the URL/URI cannot be opened even if a suitable app exists on the device.

Input arguments

Label Key Type Required? Default Description
URL to test url String Yes URL/URI to test if it can be opened.

Output arguments

Number of outputs: 3

Label Key Type Description
Can open? canOpen Boolean true if the URL can be opened, false if it cannot.

Events

No events.

Errors

Label Code Description
Test failed testFailed Thrown when the test could not be completed. On iOS, this is likely to be caused by the tested URI scheme missing from the Application query schemes section of your app's Build Settings.

Was this article helpful?

What's Next