forked from singular-labs/segment-singular-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingularIntegrationFactory.m
40 lines (32 loc) · 1.41 KB
/
SingularIntegrationFactory.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
//
// SingularIntegrationFactory.m
// Segment-Singular-iOS
//
// Created by Eyal Rabinovich on 29/05/2019.
// Copyright © 2019 Singular Labs. All rights reserved.
//
#import "SingularIntegrationFactory.h"
#import "SingularIntegation.h"
@implementation SingularIntegrationFactory
+ (instancetype)instance {
static dispatch_once_t once = 0;
static SingularIntegrationFactory *sharedInstance = nil;
dispatch_once(&once, ^{
sharedInstance = [[self alloc] init];
});
return sharedInstance;
}
- (instancetype)init {
self = [super init];
return self;
}
- (nonnull id<SEGIntegration>)createWithSettings:(nonnull NSDictionary *)settings forAnalytics:(nonnull SEGAnalytics *)analytics {
return [[SingularIntegation alloc] initWithSettings:settings];
}
- (nonnull NSString *)key {
return @"Singular";
}
+(void)setSKANOptions:(BOOL)skAdNetworkEnabled isManualSkanConversionManagementMode:(BOOL)manualMode withWaitForTrackingAuthorizationWithTimeoutInterval:(NSNumber* _Nullable)waitTrackingAuthorizationWithTimeoutInterval withConversionValueUpdatedHandler:(void(^_Nullable)(NSInteger))conversionValueUpdatedHandler {
[SingularIntegation setSKANOptions:skAdNetworkEnabled isManualSkanConversionManagementMode:manualMode withWaitForTrackingAuthorizationWithTimeoutInterval:waitTrackingAuthorizationWithTimeoutInterval withConversionValueUpdatedHandler:conversionValueUpdatedHandler];
}
@end