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

fix(web): prevent unsupported operation error in isPhysicalDevice() on web #307

Merged

Conversation

mohitrajsinha
Copy link
Contributor

@mohitrajsinha mohitrajsinha commented Oct 3, 2024

Added a check for kIsWeb in the DeviceInfoService to bypass the isPhysicalDevice() check on web platforms, since the app doesn't support QR code scanning on the web. Now the method will return false when running on the web, avoiding the unsupported operation error that occurs when trying to run device checks.

  • Imported kIsWeb to detect web platform.
  • Updated isPhysicalDevice() to return false for the web platform.
  • Ensured backward compatibility with iOS and Android platforms.

Closes #296

…n web

Added a check for kIsWeb in the DeviceInfoService to bypass the isPhysicalDevice() check on web platforms, since the app doesn't support QR code scanning on web. Now the method will return false when running on web, avoiding the unsupported operation error that occurs when trying to run device checks.

- Imported 'kIsWeb' to detect web platform.
- Updated isPhysicalDevice() to return false for web platform.
- Ensured backward compatibility with iOS and Android platforms.
Copy link
Contributor

@ethan-tbd ethan-tbd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work!

@ethan-tbd ethan-tbd merged commit 5855b3a into TBD54566975:main Oct 7, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

Fix isPhysicalDevice check in web environment
2 participants