Page MenuHomePhabricator

[native] Prevent simulators from attempting to open the barcode scanner
ClosedPublic

Authored by rohan on Aug 14 2023, 8:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 5:44 PM
Unknown Object (File)
Sun, Oct 27, 9:00 AM
Unknown Object (File)
Oct 10 2024, 7:57 AM
Unknown Object (File)
Sep 27 2024, 1:58 PM
Unknown Object (File)
Sep 27 2024, 1:58 PM
Unknown Object (File)
Sep 27 2024, 1:58 PM
Unknown Object (File)
Sep 27 2024, 1:58 PM
Unknown Object (File)
Sep 27 2024, 1:51 PM
Subscribers

Details

Summary

Launching the barcode scanner on a simulator crashes the entire app (this is because it is not a compatible platform.

We should prevent this from being accessed in the simulator.

Addresses ENG-4647

Depends on D8805

Test Plan

Confirmed that the scanner no longer is launched when on a simulator.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

rohan edited the test plan for this revision. (Show Details)
rohan retitled this revision from [native] Prevent emulators from attempting to open the barcode scanner to [native] Prevent simulators from attempting to open the barcode scanner.
rohan requested review of this revision.Aug 14 2023, 9:07 AM
This revision is now accepted and ready to land.Aug 14 2023, 9:16 AM
native/profile/linked-devices-header-right-button.react.js
27 ↗(On Diff #29864)

The whole navigation object doesn't need to be here. That object changes rather often; in contrast, the simple function navigate changes rarely. It would be much better to only pass in the navigate function

native/utils/url-utils.js
81 ↗(On Diff #29864)

Now that we're exporting this, I think it might be helpful to rename it to deviceIsEmulator... dev feels ambiguous (could refer to "dev mode")