iOSApp.SetDidOpenURLScript
--------------------------

Sets the script to be run when the app received an URL request.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [iOSApp](component_iOSApp.md) | [11.1](newinversion111.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "iOSApp.SetDidOpenURLScript"; FileName; ScriptName ) 

**MBS**( **"iOSApp.SetDidOpenURLScript";** /\* Sets the script to be run when the app received an URL request. \*/  
**$FileName**; /\* The database file name where the script is located.e.g. "test.fmp12" \*/   
**$ScriptName**) /\* The script name.e.g. "MyScript" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| FileName | The database file name where the script is located. | "test.fmp12" |
| ScriptName | The script name. | "MyScript" |

### Result

Returns OK or error.

### Description

Sets the script to be run when the app received an URL request.  
You need to call [iOSApp.InstallOpenURLHandler](iOSAppInstallOpenURLHandler.md) once to install functionality and have script be triggered later.  
Script parameter will be the URL.  
### Examples

Installs URL open handler:

 Set Variable \[ $r ; Value: MBS ("[iOSApp.InstallOpenURLHandler](iOSAppInstallOpenURLHandler.md)") \]   
Set Variable \[ $r ; Value: MBS ("iOSApp.SetDidOpenURLScript"; Get(FileName); "URLArrived") \]  
### See also

- [iOSApp.InstallOpenURLHandler](iOSAppInstallOpenURLHandler.md)
- [iOSApp.SetDidOpenURLEvaluate](iOSAppSetDidOpenURLEvaluate.md)

### Release notes

- **Version 11.1**
    - Added functions for iOS applications to catch URL requests: [iOSApp.InstallOpenURLHandler](https://www.mbsplugins.eu/iOSAppInstallOpenURLHandler.shtml), [iOSApp.LastURL](https://www.mbsplugins.eu/iOSAppLastURL.shtml), [iOSApp.SetDidOpenURLEvaluate](https://www.mbsplugins.eu/iOSAppSetDidOpenURLEvaluate.shtml) and [iOSApp.SetDidOpenURLScript](https://www.mbsplugins.eu/iOSAppSetDidOpenURLScript.shtml).

### Blog Entries

- [MBS FileMaker Plugin 11.1](https://www.mbsplugins.de/archive/2021-03-16/MBS_FileMaker_Plugin_111/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.1pr1](https://www.mbsplugins.de/archive/2021-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 27th January 2021 , last changed 27th January 2021

  
[iOSApp.SetDidOpenURLEvaluate](iOSAppSetDidOpenURLEvaluate.md) - [iOSApp.SetDidReceiveMemoryWarningEvaluate](iOSAppSetDidReceiveMemoryWarningEvaluate.md)

[HTML Version](iOSAppSetDidOpenURLScript.shtml)