forked from Countly/countly-sdk-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CountlyConfig.m
71 lines (56 loc) · 2.23 KB
/
CountlyConfig.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
// CountlyConfig.m
//
// This code is provided under the MIT License.
//
// Please visit www.count.ly for more information.
#import "CountlyCommon.h"
@implementation CountlyConfig
//NOTE: Countly features
#if (TARGET_OS_IOS)
CLYFeature const CLYPushNotifications = @"CLYPushNotifications";
CLYFeature const CLYCrashReporting = @"CLYCrashReporting";
CLYFeature const CLYAutoViewTracking = @"CLYAutoViewTracking";
#elif (TARGET_OS_WATCH)
CLYFeature const CLYCrashReporting = @"CLYCrashReporting";
#elif (TARGET_OS_TV)
CLYFeature const CLYCrashReporting = @"CLYCrashReporting";
CLYFeature const CLYAutoViewTracking = @"CLYAutoViewTracking";
#elif (TARGET_OS_OSX)
CLYFeature const CLYPushNotifications = @"CLYPushNotifications";
CLYFeature const CLYCrashReporting = @"CLYCrashReporting";
#endif
//NOTE: Device ID options
NSString* const CLYDefaultDeviceID = @""; //NOTE: It will be overridden to default device ID mechanism, depending on platform.
NSString* const CLYTemporaryDeviceID = @"CLYTemporaryDeviceID";
//NOTE: Device ID Types
CLYDeviceIDType const CLYDeviceIDTypeCustom = @"CLYDeviceIDTypeCustom";
CLYDeviceIDType const CLYDeviceIDTypeTemporary = @"CLYDeviceIDTypeTemporary";
CLYDeviceIDType const CLYDeviceIDTypeIDFV = @"CLYDeviceIDTypeIDFV";
CLYDeviceIDType const CLYDeviceIDTypeNSUUID = @"CLYDeviceIDTypeNSUUID";
//NOTE: Legacy device ID options. They will fallback to default device ID.
NSString* const CLYIDFA = CLYDefaultDeviceID;
NSString* const CLYIDFV = CLYDefaultDeviceID;
NSString* const CLYOpenUDID = CLYDefaultDeviceID;
- (instancetype)init
{
if (self = [super init])
{
#if (TARGET_OS_WATCH)
self.updateSessionPeriod = 20.0;
#else
self.updateSessionPeriod = 60.0;
#endif
self.eventSendThreshold = 100;
self.storedRequestsLimit = 1000;
self.crashLogLimit = 100;
self.maxKeyLength = 128;
self.maxValueLength = 256;
self.maxSegmentationValues = 30;
self.location = kCLLocationCoordinate2DInvalid;
self.URLSessionConfiguration = NSURLSessionConfiguration.defaultSessionConfiguration;
self.internalLogLevel = CLYInternalLogLevelDebug;
self.enableOrientationTracking = YES;
}
return self;
}
@end