forked from SelfControlApp/selfcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SCConstants.m
75 lines (64 loc) · 2.27 KB
/
SCConstants.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//
// SCConstants.m
// SelfControl
//
// Created by Charlie Stigler on 3/31/19.
//
#import "SCConstants.h"
OSStatus const AUTH_CANCELLED_STATUS = -60006;
@implementation SCConstants
+ (NSArray<NSString*>*)systemSoundNames {
static NSArray<NSString*>* soundsArr = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
soundsArr = @[@"Basso",
@"Blow",
@"Bottle",
@"Frog",
@"Funk",
@"Glass",
@"Hero",
@"Morse",
@"Ping",
@"Pop",
@"Purr",
@"Sosumi",
@"Submarine",
@"Tink"];
});
return soundsArr;
}
+ (NSDictionary<NSString*, id>*)defaultUserDefaults {
static NSDictionary<NSString*, id>* defaultDefaultsDict = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
defaultDefaultsDict = @{
@"Blocklist": @[],
@"BlockAsWhitelist": @NO,
@"HighlightInvalidHosts": @YES,
@"VerifyInternetConnection": @YES,
@"TimerWindowFloats": @NO,
@"BadgeApplicationIcon": @YES,
@"BlockDuration": @1,
@"MaxBlockLength": @1440,
@"WhitelistAlertSuppress": @NO,
@"GetStartedShown": @NO,
@"EvaluateCommonSubdomains": @YES,
@"IncludeLinkedDomains": @YES,
@"BlockSoundShouldPlay": @NO,
@"BlockSound": @5,
@"ClearCaches": @YES,
@"AllowLocalNetworks": @YES,
// if the user has checked the box to "send crash reports to third-party developers", we'll default Sentry on
// otherwise it defaults off, but we'll still prompt to ask them if we can send data
@"EnableErrorReporting": @([SCMiscUtilities systemThirdPartyCrashReportingEnabled]),
@"ErrorReportingPromptDismissed": @NO,
@"SuppressLongBlockWarning": @NO,
@"SuppressRestartFirefoxWarning": @NO,
@"FirstBlockStarted": @NO,
@"V4MigrationComplete": @NO
};
});
return defaultDefaultsDict;
}
@end