Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme's description of the behaviour of mobile apps. #72

Closed
uji opened this issue Feb 12, 2023 · 6 comments
Closed

Readme's description of the behaviour of mobile apps. #72

uji opened this issue Feb 12, 2023 · 6 comments

Comments

@uji
Copy link

uji commented Feb 12, 2023

README say

The MetaMask extension provider is synchronously injected, while the MetaMask mobile provider is asynchronously injected.

But #38 (comment) gave different answer.

Mobile is different because we don't provide MetaMask through a browser extension, we offer a separate app. Apps can't talk directly to each other, so if you have a dapp open in iOS Chrome, iOS Safari, Android Chrome, Android Firefox, etc., the site can't know that you have MetaMask installed, because no such script is injected on the page like it is in the browser on desktop.

I thought that the latter was probably correct and that the README (and MetaMask Docs) should be amended.

@mcmire
Copy link
Contributor

mcmire commented Feb 13, 2023

Would it make more sense if we changed the wording to something like this?

The MetaMask extension provider is synchronously injected, while the MetaMask mobile provider (only available when accessing a dapp inside of the mobile app) is asynchronously injected.

@uji
Copy link
Author

uji commented Feb 13, 2023

@mcmire
It looks good. 👍

[nit]
I think you may want to write that deeplink is recommended as a countermeasure in case the presence of window.ethereum cannot be detected.

@mcmire
Copy link
Contributor

mcmire commented Feb 13, 2023

@uji We could certainly remind people about deeplinking as a way of bypassing the need to detect the provider. That would assume your dapp is so simple that you don't need to connect to the user's wallet at all -- you just want to spawn an action in MetaMask, such as a payment request. Is that use case what you had in mind?

@uji
Copy link
Author

uji commented Feb 15, 2023

@mcmire I was thinking of use cases that connect to the user's wallet.
In this case, I thought I needed to transition to the browser inside of the mobile app using deeplink.
Is this a correct understanding?

@mcmire
Copy link
Contributor

mcmire commented Feb 15, 2023

@uji Hmm, I'm not sure I'm quite understanding. Are you wanting to link from somewhere outside of the mobile app to your dapp inside of the mobile app?

@uji
Copy link
Author

uji commented Feb 18, 2023

@mcmire
I want to use MetaMask Ethereum provider in a Dapp running in browsers outside of the MetaMask mobile app(such as Google chrome).
windows.ethereum isn't injected those browsers, so I thought I needed to use deeplink to transition to the MetaMask mobile app browser.

@uji uji closed this as completed Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants