PHP 7.4.33
Preview: RCTDevSettings.h Size: 3.39 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-native/React/CoreModules/RCTDevSettings.h
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#import <React/RCTBridge.h>
#import <React/RCTBridgeProxy.h>
#import <React/RCTDefines.h>
#import <React/RCTEventEmitter.h>
#import <React/RCTInitializing.h>

@protocol RCTPackagerClientMethod;

/**
 * An abstraction for a key-value store to manage RCTDevSettings behavior.
 * The default implementation persists settings using NSUserDefaults.
 */
@protocol RCTDevSettingsDataSource <NSObject>

/**
 * Updates the setting with the given key to the given value.
 * How the data source's state changes depends on the implementation.
 */
- (void)updateSettingWithValue:(id)value forKey:(NSString *)key;

/**
 * Returns the value for the setting with the given key.
 */
- (id)settingForKey:(NSString *)key;

@end

@protocol RCTDevSettingsInspectable <NSObject>

/**
 * Whether current jsi::Runtime is inspectable.
 * Only set when using as a bridgeless turbo module.
 */
@property (nonatomic, assign, readwrite) BOOL isInspectable;

@end

@interface RCTDevSettings : RCTEventEmitter <RCTInitializing>

- (instancetype)initWithDataSource:(id<RCTDevSettingsDataSource>)dataSource;

@property (nonatomic, readonly) BOOL isHotLoadingAvailable;
@property (nonatomic, readonly) BOOL isRemoteDebuggingAvailable;
@property (nonatomic, readonly) BOOL isDeviceDebuggingAvailable;

/**
 * Whether the bridge is connected to a remote JS executor.
 */
@property (nonatomic, assign) BOOL isDebuggingRemotely;

/*
 * Whether shaking will show RCTDevMenu. The menu is enabled by default if RCT_DEV=1, but
 * you may wish to disable it so that you can provide your own shake handler.
 */
@property (nonatomic, assign) BOOL isShakeToShowDevMenuEnabled;

/**
 * Whether performance profiling is enabled.
 */
@property (nonatomic, assign, setter=setProfilingEnabled:) BOOL isProfilingEnabled;

/**
 * Whether hot loading is enabled.
 */
@property (nonatomic, assign, setter=setHotLoadingEnabled:) BOOL isHotLoadingEnabled;

/**
 * Enables starting of profiling sampler on launch
 */
@property (nonatomic, assign) BOOL startSamplingProfilerOnLaunch;

/**
 * Whether the element inspector is visible.
 */
@property (nonatomic, readonly) BOOL isElementInspectorShown;

/**
 * Whether the performance monitor is visible.
 */
@property (nonatomic, assign) BOOL isPerfMonitorShown;

/**
 * Toggle the element inspector.
 */
- (void)toggleElementInspector;

/**
 * Set up the HMRClient if loading the bundle from Metro.
 */
- (void)setupHMRClientWithBundleURL:(NSURL *)bundleURL;

/**
 * Register additional bundles with the HMRClient.
 */
- (void)setupHMRClientWithAdditionalBundleURL:(NSURL *)bundleURL;

#if RCT_DEV_MENU
- (void)addHandler:(id<RCTPackagerClientMethod>)handler
    forPackagerMethod:(NSString *)name __deprecated_msg("Use RCTPackagerConnection directly instead");
#endif

@end

@interface RCTBridge (RCTDevSettings)

@property (nonatomic, readonly) RCTDevSettings *devSettings;

@end

@interface RCTBridgeProxy (RCTDevSettings)

@property (nonatomic, readonly) RCTDevSettings *devSettings;

@end

// In debug builds, the dev menu is enabled by default but it is further customizable using this method.
// However, this method only has an effect in builds where the dev menu is actually compiled in.
// (i.e. RCT_DEV or RCT_DEV_MENU is set)
RCT_EXTERN void RCTDevSettingsSetEnabled(BOOL enabled);

Directory Contents

Dirs: 1 × Files: 57
Name Size Perms Modified Actions
- drwxr-xr-x 2025-03-28 11:04:43
Edit Download
2.08 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
1.79 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
563 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
1.40 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
17.27 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
313 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
11.61 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
354 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
1.34 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
560 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
7.79 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
747 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
4.75 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
273 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
3.97 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
285 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
1.10 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
305 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
10.95 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
360 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
9.44 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
2.81 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
19.67 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
3.39 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
18.50 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
287 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
1.66 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
557 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
7.44 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
1.87 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
6.37 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
618 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
3.05 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
418 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
1.31 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
281 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
4.42 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
355 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
3.02 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
665 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
2.39 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
15.07 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
319 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
2.71 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
2.16 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
27.56 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
321 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
988 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
481 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
6.00 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
1.03 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
12.10 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
448 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
9.24 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
1.07 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
6.25 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
3.01 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).