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

[Bug]: iPad detecting as desktop #892

Open
christopherferreira9 opened this issue Jun 19, 2024 · 0 comments
Open

[Bug]: iPad detecting as desktop #892

christopherferreira9 opened this issue Jun 19, 2024 · 0 comments
Labels
Bug Triage Issues to be triaged in the next session

Comments

@christopherferreira9
Copy link
Collaborator

christopherferreira9 commented Jun 19, 2024

SDK

Web

Provide environment information

  • iPad OS

From a quick look it seems that in PlatfformManager.ts the isMobile helper looks like:

isMobile() {
    const browser = Bowser.parse(window.navigator.userAgent);

    return (
      browser?.platform?.type === 'mobile' ||
      browser?.platform?.type === 'tablet'
    );
 }

When checking this directly in the developer console for Safari, the userAgent comes up "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15" which may lead to Bowser to think it's a desktop browser instead of a mobile browser.
Screenshot 2024-06-19 at 10 26 46

MetaMask SDK Version

0.20.5

MetaMask Mobile app Version

All

What browser are you using? (if relevant)

Safari

How are you deploying your application? (if relevant)

No response

Describe the Bug

iPad Safari is currently being detected as a desktop instead of a mobile device and thus presents the QR code for scanning instead of deeplinking to MetaMask. The mobile wallet is not adapted to work on mobile devices even though it works similar to an iPhone.

Expected Behavior

Trying to connect will deeplink to MetaMask

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

No response

To Reproduce

  • Open a dapp in Safari on an iPad
  • Tapp Connect
  • See issue
@christopherferreira9 christopherferreira9 added the bug Something isn't working label Jun 19, 2024
@christopherferreira9 christopherferreira9 self-assigned this Jun 19, 2024
@christopherferreira9 christopherferreira9 added Bug Triage Issues to be triaged in the next session and removed bug Something isn't working labels Jun 19, 2024
@christopherferreira9 christopherferreira9 removed their assignment Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Triage Issues to be triaged in the next session
Projects
None yet
Development

No branches or pull requests

1 participant