diff --git a/Source/common/SNTConfigurator.m b/Source/common/SNTConfigurator.m index 713bb803..e8ecc49f 100644 --- a/Source/common/SNTConfigurator.m +++ b/Source/common/SNTConfigurator.m @@ -37,6 +37,8 @@ } @interface SNTConfigurator () +@property(readonly, nonatomic) NSUserDefaults *defaults; + /// Keys and expected value types. @property(readonly, nonatomic) NSDictionary *syncServerKeyTypes; @property(readonly, nonatomic) NSDictionary *forcedConfigKeyTypes; @@ -296,6 +298,10 @@ - (instancetype)initWithSyncStateFile:(NSString *)syncStateFilePath _syncStateFilePath = syncStateFilePath; _syncStateAccessAuthorizerBlock = syncStateAccessAuthorizer; + // This is used to keep KVO on changes, but we use `CFPreferences*` for reading. + _defaults = [NSUserDefaults standardUserDefaults]; + [_defaults addSuiteNamed:@"com.northpolesec.santa"]; + _configState = [self readForcedConfig]; [self cacheStaticRules];