-
Notifications
You must be signed in to change notification settings - Fork 244
/
CountlyRCData.m
47 lines (35 loc) · 1.04 KB
/
CountlyRCData.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
// CountlyRCData.m
//
// This code is provided under the MIT License.
//
// Please visit www.count.ly for more information.
#import "CountlyRCData.h"
@implementation CountlyRCData
- (void)encodeWithCoder:(NSCoder *)encoder {
[encoder encodeObject:self.value forKey:NSStringFromSelector(@selector(value))];
[encoder encodeBool:self.isCurrentUsersData forKey:NSStringFromSelector(@selector(isCurrentUsersData))];
}
- (id)initWithCoder:(NSCoder *)decoder {
if ((self = [super init])) {
self.value = [decoder decodeObjectForKey:NSStringFromSelector(@selector(value))];
self.isCurrentUsersData = [decoder decodeBoolForKey:NSStringFromSelector(@selector(isCurrentUsersData))];
}
return self;
}
- (instancetype)init
{
if (self = [super init])
{
}
return self;
}
- (instancetype)initWithValue:(id)value isCurrentUsersData:(BOOL)isCurrentUsersData;
{
if (self = [super init])
{
self.value = value;
self.isCurrentUsersData = isCurrentUsersData;
}
return self;
}
@end