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
F5892949: D8806.id29864.diff
Thu, Apr 17, 8:42 AM
F5890978: D8806.id.diff
Thu, Apr 17, 6:53 AM
F5879650: D8806.id30042.diff
Thu, Apr 17, 1:58 AM
F5858967: D8806.id29923.diff
Wed, Apr 16, 3:01 PM
Unknown Object (File)
Wed, Apr 16, 1:49 AM
Unknown Object (File)
Tue, Apr 15, 6:23 AM
Unknown Object (File)
Thu, Mar 27, 2:52 AM
Unknown Object (File)
Mar 16 2025, 4:35 AM
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
Lint Not Applicable
Unit
Tests Not Applicable

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")