9
9
10
10
#import < objc/runtime.h>
11
11
12
- #import " RCTBridge+Private.h"
13
- #import " RCTBridgeModule.h"
14
- #import " RCTEventDispatcher.h"
15
- #import " RCTLog.h"
16
- #import " RCTProfile.h"
17
- #import " RCTReloadCommand.h"
18
- #import " RCTUtils.h"
12
+ #import < FBReactNativeSpec/FBReactNativeSpec.h>
13
+ #import < React/RCTBridge+Private.h>
14
+ #import < React/RCTBridgeModule.h>
15
+ #import < React/RCTEventDispatcher.h>
16
+ #import < React/RCTLog.h>
17
+ #import < React/RCTProfile.h>
18
+ #import < React/RCTReloadCommand.h>
19
+ #import < React/RCTUtils.h>
19
20
20
21
#import < React/RCTDevMenu.h>
21
22
23
+ #import " CoreModulesPlugins.h"
24
+
22
25
static NSString *const kRCTDevSettingProfilingEnabled = @" profilingEnabled" ;
23
26
static NSString *const kRCTDevSettingHotLoadingEnabled = @" hotLoadingEnabled" ;
24
27
static NSString *const kRCTDevSettingIsInspectorShown = @" showInspector" ;
30
33
static NSString *const kRCTDevSettingsUserDefaultsKey = @" RCTDevMenu" ;
31
34
32
35
#if ENABLE_PACKAGER_CONNECTION
33
- #import " RCTPackagerClient.h"
34
- #import " RCTPackagerConnection.h"
36
+ #import < React/ RCTPackagerClient.h>
37
+ #import < React/ RCTPackagerConnection.h>
35
38
#endif
36
39
37
40
#if RCT_ENABLE_INSPECTOR
38
- #import " RCTInspectorDevServerHelper.h"
41
+ #import < React/ RCTInspectorDevServerHelper.h>
39
42
#endif
40
43
41
44
#if RCT_DEV
@@ -110,7 +113,7 @@ - (void)_reloadWithDefaults:(NSDictionary *)defaultValues
110
113
111
114
@end
112
115
113
- @interface RCTDevSettings () <RCTBridgeModule, RCTInvalidating> {
116
+ @interface RCTDevSettings () <RCTBridgeModule, RCTInvalidating, NativeDevSettingsSpec > {
114
117
BOOL _isJSLoaded;
115
118
#if ENABLE_PACKAGER_CONNECTION
116
119
RCTHandlerToken _reloadToken;
@@ -437,10 +440,18 @@ - (void)jsLoaded:(NSNotification *)notification
437
440
});
438
441
}
439
442
443
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModuleWithJsInvoker : (std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
444
+ {
445
+ return std::make_shared<facebook::react::NativeDevSettingsSpecJSI>(self, jsInvoker);
446
+ }
447
+
440
448
@end
441
449
442
450
#else // #if RCT_DEV
443
451
452
+ @interface RCTDevSettings () <NativeDevSettingsSpec>
453
+ @end
454
+
444
455
@implementation RCTDevSettings
445
456
446
457
- (instancetype )initWithDataSource : (id <RCTDevSettingsDataSource>)dataSource
@@ -462,12 +473,35 @@ - (id)settingForKey:(NSString *)key
462
473
- (void )reload
463
474
{
464
475
}
465
- - (void )reloadWithReason
476
+ - (void )reloadWithReason : (NSString *)reason
477
+ {
478
+ }
479
+ - (void )onFastRefresh
480
+ {
481
+ }
482
+ - (void )setHotLoadingEnabled : (BOOL )isHotLoadingEnabled
483
+ {
484
+ }
485
+ - (void )setIsDebuggingRemotely : (BOOL )isDebuggingRemotelyEnabled
486
+ {
487
+ }
488
+ - (void )setProfilingEnabled : (BOOL )isProfilingEnabled
466
489
{
467
490
}
468
491
- (void )toggleElementInspector
469
492
{
470
493
}
494
+ - (void )addMenuItem : (NSString *)title
495
+ {
496
+ }
497
+ - (void )setIsShakeToShowDevMenuEnabled : (BOOL )enabled
498
+ {
499
+ }
500
+
501
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModuleWithJsInvoker : (std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
502
+ {
503
+ return std::make_shared<facebook::react::NativeDevSettingsSpecJSI>(self, jsInvoker);
504
+ }
471
505
472
506
@end
473
507
@@ -485,3 +519,7 @@ - (RCTDevSettings *)devSettings
485
519
}
486
520
487
521
@end
522
+
523
+ Class RCTDevSettingsCls (void ) {
524
+ return RCTDevSettings.class ;
525
+ }
0 commit comments