-
Notifications
You must be signed in to change notification settings - Fork 243
/
CountlyContentBuilder.m
50 lines (42 loc) · 1.06 KB
/
CountlyContentBuilder.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
// CountlyContentBuilder.m
//
// This code is provided under the MIT License.
//
// Please visit www.count.ly for more information.
#import "CountlyContentBuilder.h"
#import "CountlyContentBuilderInternal.h"
#import "CountlyCommon.h"
@implementation CountlyContentBuilder
#if (TARGET_OS_IOS)
+ (instancetype)sharedInstance
{
if (!CountlyCommon.sharedInstance.hasStarted)
return nil;
static CountlyContentBuilder* s_sharedInstance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{s_sharedInstance = self.new;});
return s_sharedInstance;
}
- (instancetype)init
{
self = [super init];
return self;
}
- (void)enterContentZone
{
[self enterContentZone:@[]];
}
- (void)enterContentZone:(NSArray<NSString *> *)tags
{
[CountlyContentBuilderInternal.sharedInstance enterContentZone:tags];
}
- (void)exitContentZone
{
[CountlyContentBuilderInternal.sharedInstance exitContentZone];
}
- (void)changeContent:(NSArray<NSString *> *)tags
{
[CountlyContentBuilder.sharedInstance changeContent:tags];
}
#endif
@end