To make mobile apps working with other WalletConnect support apps, Mask Network mobile app need to know how to handle specific URL & link opening event sent from webview.
Part 2: Problem to Solve
Now we have 2 kinds of URLs to handle:
External URLs needs to open in separate SFSafariViewController on iOS (like "arweave.net" links form file-service plugin)
Universal links need app native to call system URL handling (like WalletConnect link). Tried to open sample universal links in separate SFSafariViewController on iOS, the system redirects to App Store page of the wallet apps, not the wallet apps themselves. This means we have to tell the app native that such kind of links MUST be handled by openUrl, not by webview
Part 3: Expected Behavior
[ ] In the webshim-manifest.json, change the external uri to two maps like:
{
"external-uri": ["^https?://arweave\\.net"],
"universal-link": ["^wc:", "^https://metamask.app.link/wc?", "^https://rnbwapp.com/wc?", "^https://www.mathwallet.org/wc?"]
(Maybe in universal-link we could use a simple regex like "^(https://(*)*/wc?)", since the format is fixed defined by WalletConnect)
}
[ ] On the mobile side, for "external-uri" URLs, open them in separate webview. For "universal-link" URLs, use "OpenUrl/Intent" native API to tell the system to handle them
Catalogue
Part 1: Introduction and Background
To make mobile apps working with other WalletConnect support apps, Mask Network mobile app need to know how to handle specific URL & link opening event sent from webview.
Part 2: Problem to Solve
Now we have 2 kinds of URLs to handle:
openUrl
, not by webviewPart 3: Expected Behavior
[ ] In the
webshim-manifest.json
, change theexternal uri
to two maps like:[ ] On the mobile side, for "external-uri" URLs, open them in separate webview. For "universal-link" URLs, use "OpenUrl/Intent" native API to tell the system to handle them