Custom Protocol Scheme association
Custom Protocols feature allows you to associate specific custom protocol with your app so that when users open links with this protocol, your app is launched to handle them. This can be particularly useful to connect your desktop app with your web app. In this guide, we'll walk through the steps to implement custom protocols in Wails app.
Set Up Custom Protocol Schemes Association:
To set up custom protocol, you need to modify your application's wails.json file. In "info" section add a "protocols" section specifying the protocols your app should be associated with.
For example:
{
"info": {
"protocols": [
{
"scheme": "myapp",
"description": "My App Protocol",
"role": "Editor"
}
]
}
}
| Property | Description |
|---|---|
| scheme | Custom Protocol scheme. e.g. myapp |
| description | Windows-only. The description. |
| role | macOS-only. The app’s role with respect to the type. Corresponds to CFBundleTypeRole. |