Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions React/CoreModules/RCTDevSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
*/
- (id)settingForKey:(NSString *)key;

// [TODO(macOS ISS#2323203)
/**
* Returns all keys that are overridden
*/
- (NSArray<NSString *> *)overridenKeys;
// ]TODO(macOS ISS#2323203)

@end

@interface RCTDevSettings : RCTEventEmitter
Expand Down
9 changes: 9 additions & 0 deletions React/CoreModules/RCTDevSettings.mm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ - (id)settingForKey:(NSString *)key
return _settings[key];
}

// [TODO(macOS ISS#2323203)
- (NSArray<NSString *> *)overridenKeys
{
return [_settings allKeys];
}
// ]TODO(macOS ISS#2323203)

- (void)_reloadWithDefaults:(NSDictionary *)defaultValues
{
NSDictionary *existingSettings = [_userDefaults objectForKey:kRCTDevSettingsUserDefaultsKey];
Expand Down Expand Up @@ -475,6 +482,8 @@ - (void)jsLoaded:(NSNotification *)notification

@implementation RCTDevSettings

RCT_EXPORT_MODULE() // TODO(macOS ISS#2323203)

- (instancetype)initWithDataSource:(id<RCTDevSettingsDataSource>)dataSource
{
return [super init];
Expand Down