MetaMask / MetaMask/metamask-mobile

[Bug] `allowLinkOpen` should always try to open URLs

Open
#6,563 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

MetaMask is unable to open external applications that are not registered in the Info.plist.

**For example: Opening google maps will not work.**

Since the introduction of `LSApplicationQueriesSchemes` handling in React-Native `>0.60` `canOpenURI` will throw if a scheme is not specified in the Info.plist file. This is due to the fact that `canOpenURI`'s capabilities were restricted due to Russian Banking App collecting data by querying hundreds of apps.

However, opening external applications will still work. The calling app will just not know whether an application for that scheme is installed or not. But that's not important for MetaMask mobile anyway.

https://github.com/MetaMask/metamask-mobile/blob/d192935301e880ff53f9fc56063bc3a31696d774/app/util/browser/index.ts#L135-L146

I will add a proposal on how to change the code

Contributor guide

Open the contributing guide

Research direction

The relevant entry point is app/util/browser/index.ts at lines 135-146. Read the allowLinkOpen flow and its canOpenURI handling first. Done means external URLs are attempted even when their schemes are not listed in Info.plist.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.