Please sign in to comment.
Add RCTDevSettings module
Summary: This decouples non-UI logic from RCTDevMenu into a new module RCTDevSettings. **Motivation**: This allows developers to change dev settings without depending on the built-in dev menu, e.g. if they want to introduce their own UI, or have other devtools logic that doesn't depend on an action sheet. It also introduces the RCTDevSettingsDataSource protocol for storing dev tools preferences. This could allow a developer to implement alternative behaviors, e.g. loading the settings from some other config, changing settings based on the user, deciding not to persist some settings, or something else. The included data source implementation, RCTDevSettingsUserDefaultsDataSource, uses NSUserDefaults and is backwards compatible with the older implementation, so **no workflows or dependent code will break, and old saved settings will persist.** The RCTDevMenu interface has not changed and is therefore also backwards-compatible, though some methods are now deprecated. In order to ensure that RCTDevSettings Closes #11613 Reviewed By: mmmulani Differential Revision: D4571773 Pulled By: javache fbshipit-source-id: 25555d0a6eaa81f694343e079ed02439e5845fbc
- Loading branch information...
Showing with 1,099 additions and 832 deletions.
- +1 −0 Libraries/WebSocket/RCTWebSocketExecutor.m
- +2 −2 React/CxxBridge/RCTCxxBridge.mm
- +11 −15 React/Executors/RCTJSCExecutor.mm
- +19 −34 React/Modules/RCTDevMenu.h
- +387 −0 React/Modules/RCTDevMenu.m
- +0 −763 React/Modules/RCTDevMenu.mm
- +109 −0 React/Modules/RCTDevSettings.h
- +537 −0 React/Modules/RCTDevSettings.mm
- +15 −12 React/Profiler/RCTPerfMonitor.m
- +18 −6 React/React.xcodeproj/project.pbxproj
Oops, something went wrong.