-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTSHelpers.m
More file actions
35 lines (27 loc) · 977 Bytes
/
Copy pathTSHelpers.m
File metadata and controls
35 lines (27 loc) · 977 Bytes
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
//
// TSHelpers.m
// TimeStamp
//
// Created by Awais Hussain on 1/31/14.
// Copyright (c) 2014 Awais Hussain. All rights reserved.
//
#import "TSHelpers.h"
#import "TSCategoryStore.h"
@implementation TSHelpers
+ (void)registerDefaults {
// NSDictionary* defaults = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"app.runBefore", nil];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"app.runBefore"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
+ (BOOL)isFirstRun {
NSLog(@"NSUserDefaults: %@", [[NSUserDefaults standardUserDefaults] objectForKey:@"app.runBefore"]);
return ![[NSUserDefaults standardUserDefaults] boolForKey:@"app.runBefore"];
}
+ (void)makeFirstRun {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"app.runBefore"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
+ (void)syncCalendarsAndShit {
[[TSCategoryStore instance] syncStoredDataWithGCalData];
}
@end