forked from Countly/countly-sdk-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CountlyConfig.m
64 lines (52 loc) · 2.05 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
// 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;
self.eventSendThreshold = 3;
#else
self.updateSessionPeriod = 60.0;
self.eventSendThreshold = 10;
#endif
self.storedRequestsLimit = 1000;
self.crashLogLimit = 100;
self.location = kCLLocationCoordinate2DInvalid;
self.URLSessionConfiguration = NSURLSessionConfiguration.defaultSessionConfiguration;
}
return self;
}
@end