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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mohitrajsinha
Copy link

@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.
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
1 participant