can-open-url
- 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
can-open-url
- Updated on 18 May 2022
- 1 Minute to read
-
DarkLight
-
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?