Ta android + ios
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// TABaseEvent+H5.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/19.
|
||||
//
|
||||
|
||||
#import "TABaseEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TABaseEvent (H5)
|
||||
@property (nonatomic, copy) NSString *h5TimeString;
|
||||
@property (nonatomic, strong) NSNumber *h5ZoneOffSet;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f11317a372fa3bb43a976f24b4df418b
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// TABaseEvent+H5.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/19.
|
||||
//
|
||||
|
||||
#import "TABaseEvent+H5.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
static char TA_EVENT_H5_TIME_STRING;
|
||||
static char TA_EVENT_H5_ZONE_OFF_SET;
|
||||
|
||||
@implementation TABaseEvent (H5)
|
||||
|
||||
- (NSString *)h5TimeString {
|
||||
return objc_getAssociatedObject(self, &TA_EVENT_H5_TIME_STRING);
|
||||
}
|
||||
|
||||
- (void)setH5TimeString:(NSString *)h5TimeString {
|
||||
objc_setAssociatedObject(self, &TA_EVENT_H5_TIME_STRING, h5TimeString, OBJC_ASSOCIATION_COPY_NONATOMIC);
|
||||
}
|
||||
|
||||
- (NSNumber *)h5ZoneOffSet {
|
||||
return objc_getAssociatedObject(self, &TA_EVENT_H5_ZONE_OFF_SET);
|
||||
}
|
||||
|
||||
- (void)setH5ZoneOffSet:(NSNumber *)h5ZoneOffSet {
|
||||
objc_setAssociatedObject(self, &TA_EVENT_H5_ZONE_OFF_SET, h5ZoneOffSet, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f174d52f029e3624d9eccdf142c3384f
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// TABaseEvent.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "TAPropertyValidator.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NSString * kTAEventType;
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, TAEventType) {
|
||||
TAEventTypeNone = 0,
|
||||
TAEventTypeTrack = 1 << 0,
|
||||
TAEventTypeTrackFirst = 1 << 1,
|
||||
TAEventTypeTrackUpdate = 1 << 2,
|
||||
TAEventTypeTrackOverwrite = 1 << 3,
|
||||
TAEventTypeUserSet = 1 << 4,
|
||||
TAEventTypeUserUnset = 1 << 5,
|
||||
TAEventTypeUserAdd = 1 << 6,
|
||||
TAEventTypeUserDel = 1 << 7,
|
||||
TAEventTypeUserSetOnce = 1 << 8,
|
||||
TAEventTypeUserAppend = 1 << 9,
|
||||
TAEventTypeUserUniqueAppend = 1 << 10,
|
||||
TAEventTypeAll = 0xFFFFFFFF,
|
||||
};
|
||||
|
||||
//extern kTAEventType const kTAEventTypeTrack;
|
||||
//extern kTAEventType const kTAEventTypeTrackFirst;
|
||||
//extern kTAEventType const kTAEventTypeTrackUpdate;
|
||||
//extern kTAEventType const kTAEventTypeTrackOverwrite;
|
||||
//extern kTAEventType const kTAEventTypeUserSet;
|
||||
//extern kTAEventType const kTAEventTypeUserUnset;
|
||||
//extern kTAEventType const kTAEventTypeUserAdd;
|
||||
//extern kTAEventType const kTAEventTypeUserDel;
|
||||
//extern kTAEventType const kTAEventTypeUserSetOnce;
|
||||
//extern kTAEventType const kTAEventTypeUserAppend;
|
||||
//extern kTAEventType const kTAEventTypeUserUniqueAppend;
|
||||
|
||||
typedef NS_OPTIONS(NSInteger, TAEventTimeValueType) {
|
||||
TAEventTimeValueTypeNone = 0,
|
||||
TAEventTimeValueTypeTimeOnly = 1 << 0,
|
||||
TAEventTimeValueTypeTimeAndZone = 1 << 1,
|
||||
};
|
||||
|
||||
@interface TABaseEvent : NSObject<TAEventPropertyValidating>
|
||||
@property (nonatomic, assign) TAEventType eventType;
|
||||
@property (nonatomic, copy) NSString *uuid;
|
||||
@property (nonatomic, copy) NSString *accountId;
|
||||
@property (nonatomic, copy) NSString *distinctId;
|
||||
@property (nonatomic, strong) NSDate *time;
|
||||
@property (nonatomic, strong) NSTimeZone *timeZone;
|
||||
@property (nonatomic, strong, readonly) NSDateFormatter *timeFormatter;
|
||||
|
||||
@property (nonatomic, assign) TAEventTimeValueType timeValueType;
|
||||
@property (nonatomic, strong) NSMutableDictionary *properties;
|
||||
|
||||
@property (nonatomic, assign) BOOL immediately;
|
||||
|
||||
@property (atomic, assign, getter=isTrackPause) BOOL trackPause;
|
||||
|
||||
@property (nonatomic, assign) BOOL isEnabled;
|
||||
|
||||
@property (atomic, assign) BOOL isOptOut;
|
||||
|
||||
- (instancetype)initWithType:(TAEventType)type;
|
||||
|
||||
- (void)validateWithError:(NSError **)error;
|
||||
|
||||
- (NSMutableDictionary *)jsonObject;
|
||||
|
||||
- (NSMutableDictionary *)formatDateWithDict:(NSDictionary *)dict;
|
||||
|
||||
- (NSString *)eventTypeString;
|
||||
|
||||
+ (TAEventType)typeWithTypeString:(NSString *)typeString;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3420f9b2d086c2546b50b97d7dff67c7
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,215 @@
|
||||
//
|
||||
// TABaseEvent.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TABaseEvent.h"
|
||||
|
||||
#if __has_include(<ThinkingSDK/TDLogging.h>)
|
||||
#import <ThinkingSDK/TDLogging.h>
|
||||
#else
|
||||
#import "TDLogging.h"
|
||||
#endif
|
||||
|
||||
#import "ThinkingAnalyticsSDKPrivate.h"
|
||||
|
||||
kTAEventType const kTAEventTypeTrack = @"track";
|
||||
kTAEventType const kTAEventTypeTrackFirst = @"track_first";
|
||||
kTAEventType const kTAEventTypeTrackUpdate = @"track_update";
|
||||
kTAEventType const kTAEventTypeTrackOverwrite = @"track_overwrite";
|
||||
kTAEventType const kTAEventTypeUserSet = @"user_set";
|
||||
kTAEventType const kTAEventTypeUserUnset = @"user_unset";
|
||||
kTAEventType const kTAEventTypeUserAdd = @"user_add";
|
||||
kTAEventType const kTAEventTypeUserDel = @"user_del";
|
||||
kTAEventType const kTAEventTypeUserSetOnce = @"user_setOnce";
|
||||
kTAEventType const kTAEventTypeUserAppend = @"user_append";
|
||||
kTAEventType const kTAEventTypeUserUniqueAppend = @"user_uniq_append";
|
||||
|
||||
@interface TABaseEvent ()
|
||||
@property (nonatomic, strong) NSDateFormatter *timeFormatter;
|
||||
|
||||
@end
|
||||
|
||||
@implementation TABaseEvent
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
|
||||
_time = [NSDate date];
|
||||
self.timeValueType = TAEventTimeValueTypeNone;
|
||||
self.uuid = [NSUUID UUID].UUIDString;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithType:(TAEventType)type {
|
||||
if (self = [self init]) {
|
||||
self.eventType = type;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)validateWithError:(NSError *__autoreleasing _Nullable *)error {
|
||||
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)jsonObject {
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||
dict[@"#time"] = self.time;
|
||||
dict[@"#uuid"] = self.uuid;
|
||||
dict[@"#type"] = [self eventTypeString];
|
||||
if (self.accountId) {
|
||||
dict[@"#account_id"] = self.accountId;
|
||||
}
|
||||
if (self.distinctId) {
|
||||
dict[@"#distinct_id"] = self.distinctId;
|
||||
}
|
||||
dict[@"properties"] = self.properties;
|
||||
return dict;
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)formatDateWithDict:(NSDictionary *)dict {
|
||||
if (dict == nil || ![dict isKindOfClass:NSDictionary.class]) {
|
||||
return nil;
|
||||
}
|
||||
NSMutableDictionary *mutableDict = nil;
|
||||
if ([dict isKindOfClass:NSMutableDictionary.class]) {
|
||||
mutableDict = (NSMutableDictionary *)dict;
|
||||
} else {
|
||||
mutableDict = [dict mutableCopy];
|
||||
}
|
||||
|
||||
NSArray<NSString *> *keys = dict.allKeys;
|
||||
for (NSInteger i = 0; i < keys.count; i++) {
|
||||
id value = dict[keys[i]];
|
||||
if ([value isKindOfClass:NSDate.class]) {
|
||||
NSString *newValue = [self.timeFormatter stringFromDate:(NSDate *)value];
|
||||
mutableDict[keys[i]] = newValue;
|
||||
} else if ([value isKindOfClass:NSDictionary.class]) {
|
||||
NSDictionary *newValue = [self formatDateWithDict:value];
|
||||
mutableDict[keys[i]] = newValue;
|
||||
}
|
||||
}
|
||||
return mutableDict;
|
||||
}
|
||||
|
||||
- (NSString *)eventTypeString {
|
||||
switch (self.eventType) {
|
||||
case TAEventTypeTrack: {
|
||||
return TD_EVENT_TYPE_TRACK;
|
||||
} break;
|
||||
case TAEventTypeTrackFirst: {
|
||||
|
||||
return TD_EVENT_TYPE_TRACK;
|
||||
} break;
|
||||
case TAEventTypeTrackUpdate: {
|
||||
return TD_EVENT_TYPE_TRACK_UPDATE;
|
||||
} break;
|
||||
case TAEventTypeTrackOverwrite: {
|
||||
return TD_EVENT_TYPE_TRACK_OVERWRITE;
|
||||
} break;
|
||||
case TAEventTypeUserAdd: {
|
||||
return TD_EVENT_TYPE_USER_ADD;
|
||||
} break;
|
||||
case TAEventTypeUserSet: {
|
||||
return TD_EVENT_TYPE_USER_SET;
|
||||
} break;
|
||||
case TAEventTypeUserUnset: {
|
||||
return TD_EVENT_TYPE_USER_UNSET;
|
||||
} break;
|
||||
case TAEventTypeUserAppend: {
|
||||
return TD_EVENT_TYPE_USER_APPEND;
|
||||
} break;
|
||||
case TAEventTypeUserUniqueAppend: {
|
||||
return TD_EVENT_TYPE_USER_UNIQ_APPEND;
|
||||
} break;
|
||||
case TAEventTypeUserDel: {
|
||||
return TD_EVENT_TYPE_USER_DEL;
|
||||
} break;
|
||||
case TAEventTypeUserSetOnce: {
|
||||
return TD_EVENT_TYPE_USER_SETONCE;
|
||||
} break;
|
||||
|
||||
default:
|
||||
return nil;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+ (TAEventType)typeWithTypeString:(NSString *)typeString {
|
||||
if ([typeString isEqualToString:TD_EVENT_TYPE_TRACK]) {
|
||||
return TAEventTypeTrack;
|
||||
} else if ([typeString isEqualToString:TD_EVENT_TYPE_TRACK_FIRST]) {
|
||||
return TAEventTypeTrack;
|
||||
} else if ([typeString isEqualToString:TD_EVENT_TYPE_TRACK_UPDATE]) {
|
||||
return TAEventTypeTrackUpdate;
|
||||
} else if ([typeString isEqualToString:TD_EVENT_TYPE_TRACK_OVERWRITE]) {
|
||||
return TAEventTypeTrackOverwrite;
|
||||
} else if ([typeString isEqualToString:TD_EVENT_TYPE_USER_ADD]) {
|
||||
return TAEventTypeUserAdd;
|
||||
} else if ([typeString isEqualToString:TD_EVENT_TYPE_USER_DEL]) {
|
||||
return TAEventTypeUserDel;
|
||||
} else if ([typeString isEqualToString:TD_EVENT_TYPE_USER_SET]) {
|
||||
return TAEventTypeUserSet;
|
||||
} else if ([typeString isEqualToString:TD_EVENT_TYPE_USER_UNSET]) {
|
||||
return TAEventTypeUserUnset;
|
||||
} else if ([typeString isEqualToString:TD_EVENT_TYPE_USER_APPEND]) {
|
||||
return TAEventTypeUserAppend;
|
||||
} else if ([typeString isEqualToString:TD_EVENT_TYPE_USER_UNIQ_APPEND]) {
|
||||
return TAEventTypeUserUniqueAppend;
|
||||
} else if ([typeString isEqualToString:TD_EVENT_TYPE_USER_SETONCE]) {
|
||||
return TAEventTypeUserSetOnce;
|
||||
}
|
||||
return TAEventTypeNone;
|
||||
}
|
||||
|
||||
//MARK: - Private
|
||||
|
||||
//MARK: - Delegate
|
||||
|
||||
- (void)ta_validateKey:(NSString *)key value:(id)value error:(NSError *__autoreleasing _Nullable *)error {
|
||||
|
||||
}
|
||||
|
||||
//MARK: - Setter & Getter
|
||||
|
||||
- (NSMutableDictionary *)properties {
|
||||
if (!_properties) {
|
||||
_properties = [NSMutableDictionary dictionary];
|
||||
}
|
||||
return _properties;
|
||||
}
|
||||
|
||||
- (void)setTimeZone:(NSTimeZone *)timeZone {
|
||||
_timeZone = timeZone;
|
||||
|
||||
|
||||
self.timeFormatter.timeZone = timeZone ?: [NSTimeZone localTimeZone];
|
||||
}
|
||||
|
||||
- (NSDateFormatter *)timeFormatter {
|
||||
if (!_timeFormatter) {
|
||||
_timeFormatter = [[NSDateFormatter alloc] init];
|
||||
_timeFormatter.dateFormat = kDefaultTimeFormat;
|
||||
_timeFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
|
||||
_timeFormatter.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
|
||||
|
||||
_timeFormatter.timeZone = [NSTimeZone localTimeZone];
|
||||
}
|
||||
return _timeFormatter;
|
||||
}
|
||||
|
||||
- (void)setTime:(NSDate *)time {
|
||||
|
||||
if (time) {
|
||||
[self willChangeValueForKey:@"time"];
|
||||
_time = time;
|
||||
[self didChangeValueForKey:@"time"];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 264d7dc6cbe59cd40b05b87c88789d50
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// TATrackEvent.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TABaseEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@interface TATrackEvent : TABaseEvent
|
||||
/// eventName
|
||||
@property (nonatomic, copy) NSString *eventName;
|
||||
/// Cumulative front activity time
|
||||
@property (nonatomic, assign) NSTimeInterval foregroundDuration;
|
||||
/// Cumulative background time
|
||||
@property (nonatomic, assign) NSTimeInterval backgroundDuration;
|
||||
|
||||
/// Record the boot time node when the event occurred. Used to count the cumulative time of events
|
||||
@property (nonatomic, assign) NSTimeInterval systemUpTime;
|
||||
|
||||
/// Used to record dynamic public properties, dynamic public properties need to be obtained in the current thread where the event occurs
|
||||
@property (nonatomic, strong) NSDictionary *dynamicSuperProperties;
|
||||
|
||||
/// Used to document static public properties
|
||||
@property (nonatomic, strong) NSDictionary *superProperties;
|
||||
|
||||
- (instancetype)initWithName:(NSString *)eventName;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 348008e8bc508b5428b825f9975547ec
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// TATrackEvent.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TATrackEvent.h"
|
||||
#import "TDPresetProperties.h"
|
||||
#import "TDPresetProperties+TDDisProperties.h"
|
||||
#import "NSDate+TAFormat.h"
|
||||
#import "TDDeviceInfo.h"
|
||||
|
||||
@implementation TATrackEvent
|
||||
|
||||
- (instancetype)initWithName:(NSString *)eventName {
|
||||
if (self = [self init]) {
|
||||
self.eventName = eventName;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.eventType = TAEventTypeTrack;
|
||||
self.systemUpTime = [TDDeviceInfo uptime];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)validateWithError:(NSError *__autoreleasing _Nullable *)error {
|
||||
|
||||
[TAPropertyValidator validateEventOrPropertyName:self.eventName withError:error];
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)jsonObject {
|
||||
NSMutableDictionary *dict = [super jsonObject];
|
||||
|
||||
dict[@"#event_name"] = self.eventName;
|
||||
|
||||
if (![TDPresetProperties disableDuration]) {
|
||||
if (self.foregroundDuration > 0) {
|
||||
self.properties[@"#duration"] = @([NSString stringWithFormat:@"%.3f", self.foregroundDuration].floatValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (![TDPresetProperties disableBackgroundDuration]) {
|
||||
if (self.backgroundDuration > 0) {
|
||||
self.properties[@"#background_duration"] = @([NSString stringWithFormat:@"%.3f", self.backgroundDuration].floatValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (self.timeValueType != TAEventTimeValueTypeTimeOnly) {
|
||||
if (![TDPresetProperties disableZoneOffset]) {
|
||||
self.properties[@"#zone_offset"] = @([self timeZoneOffset]);
|
||||
}
|
||||
}
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
- (double)timeZoneOffset {
|
||||
NSTimeZone *tz = self.timeZone ?: [NSTimeZone localTimeZone];
|
||||
return [[NSDate date] ta_timeZoneOffset:tz];
|
||||
}
|
||||
|
||||
//MARK: - Delegate
|
||||
|
||||
- (void)ta_validateKey:(NSString *)key value:(id)value error:(NSError *__autoreleasing _Nullable *)error {
|
||||
[TAPropertyValidator validateNormalTrackEventPropertyKey:key value:value error:error];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 632dc32424717974a807dc4adb9fcf41
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// TATrackFirstEvent.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TATrackEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TATrackFirstEvent : TATrackEvent
|
||||
|
||||
@property (nonatomic, copy) NSString *firstCheckId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf92f2d9fb4cde247948818a8f9c9cc5
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// TATrackFirstEvent.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TATrackFirstEvent.h"
|
||||
#import "TDDeviceInfo.h"
|
||||
|
||||
@implementation TATrackFirstEvent
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.eventType = TAEventTypeTrackFirst;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)validateWithError:(NSError *__autoreleasing _Nullable *)error {
|
||||
[super validateWithError:error];
|
||||
if (*error) {
|
||||
return;
|
||||
}
|
||||
if (self.firstCheckId.length <= 0) {
|
||||
NSString *errorMsg = @"property 'firstCheckId' cannot be empty which in FirstEvent";
|
||||
*error = TAPropertyError(100010, errorMsg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)jsonObject {
|
||||
NSMutableDictionary *dict = [super jsonObject];
|
||||
|
||||
dict[@"#first_check_id"] = self.firstCheckId ?: [TDDeviceInfo sharedManager].deviceId;
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd17e1c9dfb23764c8c6516849e8c5f4
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// TATrackOverwriteEvent.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TATrackEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TATrackOverwriteEvent : TATrackEvent
|
||||
|
||||
@property (nonatomic, copy) NSString *eventId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6e101892176f7941a1b09ff739b227c
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// TATrackOverwriteEvent.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TATrackOverwriteEvent.h"
|
||||
|
||||
@implementation TATrackOverwriteEvent
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.eventType = TAEventTypeTrackOverwrite;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)jsonObject {
|
||||
NSMutableDictionary *dict = [super jsonObject];
|
||||
|
||||
dict[@"#event_id"] = self.eventId;
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
|
||||
- (void)validateWithError:(NSError *__autoreleasing _Nullable *)error {
|
||||
[super validateWithError:error];
|
||||
if (*error) {
|
||||
return;
|
||||
}
|
||||
if (self.eventId.length <= 0) {
|
||||
NSString *errorMsg = @"property 'eventId' cannot be empty which in OverwriteEvent";
|
||||
*error = TAPropertyError(100011, errorMsg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9533786078363fa428dc28c33206f5b2
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// TATrackUpdateEvent.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TATrackEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TATrackUpdateEvent : TATrackEvent
|
||||
|
||||
@property (nonatomic, copy) NSString *eventId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8212c727ff3ae14fb32e3996cc02f01
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// TATrackUpdateEvent.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TATrackUpdateEvent.h"
|
||||
|
||||
@implementation TATrackUpdateEvent
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.eventType = TAEventTypeTrackUpdate;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)jsonObject {
|
||||
NSMutableDictionary *dict = [super jsonObject];
|
||||
|
||||
dict[@"#event_id"] = self.eventId;
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
|
||||
- (void)validateWithError:(NSError *__autoreleasing _Nullable *)error {
|
||||
[super validateWithError:error];
|
||||
if (*error) {
|
||||
return;
|
||||
}
|
||||
if (self.eventId.length <= 0) {
|
||||
NSString *errorMsg = @"property 'eventId' cannot be empty which in UpdateEvent";
|
||||
*error = TAPropertyError(100012, errorMsg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 473fc011a28100a44bc92ba0a638b227
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
#if __has_include(<ThinkingSDK/TDUpdateEventModel.h>)
|
||||
#import <ThinkingSDK/TDUpdateEventModel.h>
|
||||
#else
|
||||
#import "TDUpdateEventModel.h"
|
||||
#endif
|
||||
|
||||
#if __has_include(<ThinkingSDK/TDOverwriteEventModel.h>)
|
||||
#import <ThinkingSDK/TDOverwriteEventModel.h>
|
||||
#else
|
||||
#import "TDOverwriteEventModel.h"
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f8cc57729aa4ec4eaaae6d8ed602249
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_OPTIONS(NSInteger, TimeValueType) {
|
||||
TDTimeValueTypeNone = 0,
|
||||
TDTimeValueTypeTimeOnly = 1 << 0,
|
||||
TDTimeValueTypeAll = 1 << 1,
|
||||
};
|
||||
|
||||
typedef NSString *kEDEventTypeName;
|
||||
|
||||
FOUNDATION_EXTERN kEDEventTypeName const TD_EVENT_TYPE_TRACK_FIRST;
|
||||
FOUNDATION_EXTERN kEDEventTypeName const TD_EVENT_TYPE_TRACK_UPDATE;
|
||||
FOUNDATION_EXTERN kEDEventTypeName const TD_EVENT_TYPE_TRACK_OVERWRITE;
|
||||
|
||||
@interface TDEventModel : NSObject
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@property (nonatomic, copy, readonly) NSString *eventName;
|
||||
@property (nonatomic, copy, readonly) kEDEventTypeName eventType; // Default is TD_EVENT_TYPE_TRACK
|
||||
|
||||
@property (nonatomic, strong) NSDictionary *properties;
|
||||
|
||||
- (void)configTime:(NSDate *)time timeZone:(NSTimeZone * _Nullable)timeZone;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3e64bb60e0cf8f4e9c76c4e2e3266d8
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
|
||||
#import "TDEventModel.h"
|
||||
#import "ThinkingAnalyticsSDKPrivate.h"
|
||||
|
||||
kEDEventTypeName const TD_EVENT_TYPE_TRACK_FIRST = @"track_first";
|
||||
kEDEventTypeName const TD_EVENT_TYPE_TRACK_UPDATE = @"track_update";
|
||||
kEDEventTypeName const TD_EVENT_TYPE_TRACK_OVERWRITE = @"track_overwrite";
|
||||
|
||||
@interface TDEventModel ()
|
||||
|
||||
@property (nonatomic, copy) NSString *eventName;
|
||||
@property (nonatomic, copy) kEDEventTypeName eventType;
|
||||
|
||||
@end
|
||||
|
||||
@implementation TDEventModel
|
||||
|
||||
- (instancetype)initWithEventName:(NSString *)eventName {
|
||||
return [self initWithEventName:eventName eventType:TD_EVENT_TYPE_TRACK];
|
||||
}
|
||||
|
||||
- (instancetype)initWithEventName:(NSString *)eventName eventType:(kEDEventTypeName)eventType {
|
||||
if (self = [[[TDEventModel class] alloc] init]) {
|
||||
self.persist = YES;
|
||||
self.eventName = eventName ?: @"";
|
||||
self.eventType = eventType ?: @"";
|
||||
if ([self.eventType isEqualToString:TD_EVENT_TYPE_TRACK_FIRST]) {
|
||||
_extraID = [TDDeviceInfo sharedManager].deviceId ?: @"";
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Public
|
||||
|
||||
- (void)configTime:(NSDate *)time timeZone:(NSTimeZone *)timeZone {
|
||||
if (!time || ![time isKindOfClass:[NSDate class]]) {
|
||||
self.timeValueType = TDTimeValueTypeNone;
|
||||
} else {
|
||||
self.time = time;
|
||||
self.timeZone = timeZone;
|
||||
|
||||
NSDateFormatter *timeFormatter = [[NSDateFormatter alloc] init];
|
||||
timeFormatter.dateFormat = kDefaultTimeFormat;
|
||||
timeFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
|
||||
timeFormatter.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
|
||||
if (timeZone && [timeZone isKindOfClass:[NSTimeZone class]]) {
|
||||
self.timeValueType = TDTimeValueTypeAll;
|
||||
timeFormatter.timeZone = timeZone;
|
||||
} else {
|
||||
self.timeValueType = TDTimeValueTypeTimeOnly;
|
||||
timeFormatter.timeZone = [NSTimeZone localTimeZone];
|
||||
}
|
||||
self.timeString = [timeFormatter stringFromDate:time];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Setter
|
||||
|
||||
- (void)setExtraID:(NSString *)extraID {
|
||||
if (extraID.length > 0) {
|
||||
_extraID = extraID;
|
||||
} else {
|
||||
if ([self.eventType isEqualToString:TD_EVENT_TYPE_TRACK_FIRST]) {
|
||||
TDLogError(@"Invalid firstCheckId. Use device Id");
|
||||
} else {
|
||||
TDLogError(@"Invalid eventId");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89bc3274598fdcc4594b2a8dc286c530
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
#if __has_include(<ThinkingSDK/TDEventModel.h>)
|
||||
#import <ThinkingSDK/TDEventModel.h>
|
||||
#else
|
||||
#import "TDEventModel.h"
|
||||
#endif
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TDFirstEventModel : TDEventModel
|
||||
|
||||
- (instancetype)initWithEventName:(NSString * _Nullable)eventName;
|
||||
|
||||
- (instancetype)initWithEventName:(NSString * _Nullable)eventName firstCheckID:(NSString *)firstCheckID;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73d5531a42705ed4ba226579bd7a98b1
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
#import "TDFirstEventModel.h"
|
||||
#import "ThinkingAnalyticsSDKPrivate.h"
|
||||
|
||||
@implementation TDFirstEventModel
|
||||
|
||||
- (instancetype)initWithEventName:(NSString *)eventName {
|
||||
return [self initWithEventName:eventName eventType:TD_EVENT_TYPE_TRACK_FIRST];
|
||||
}
|
||||
|
||||
- (instancetype)initWithEventName:(NSString *)eventName firstCheckID:(NSString *)firstCheckID {
|
||||
if (self = [self initWithEventName:eventName eventType:TD_EVENT_TYPE_TRACK_FIRST]) {
|
||||
self.extraID = firstCheckID;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0692a1a2fa244c488a7169860f116ba
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// TDOverwriteEventModel.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#if __has_include(<ThinkingSDK/TDEventModel.h>)
|
||||
#import <ThinkingSDK/TDEventModel.h>
|
||||
#else
|
||||
#import "TDEventModel.h"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TDOverwriteEventModel : TDEventModel
|
||||
|
||||
- (instancetype)initWithEventName:(NSString *)eventName eventID:(NSString *)eventID;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 182d74d42aab04e4481e2f85b6dd21b3
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// TDOverwriteEventModel.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TDOverwriteEventModel.h"
|
||||
#import "ThinkingAnalyticsSDKPrivate.h"
|
||||
|
||||
@implementation TDOverwriteEventModel
|
||||
|
||||
- (instancetype)initWithEventName:(NSString *)eventName eventID:(NSString *)eventID {
|
||||
if (self = [self initWithEventName:eventName eventType:TD_EVENT_TYPE_TRACK_OVERWRITE]) {
|
||||
self.extraID = eventID;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d2e30d9eb2468e46b0a2bec2943ca37
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// TDUpdateEventModel.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#if __has_include(<ThinkingSDK/TDEventModel.h>)
|
||||
#import <ThinkingSDK/TDEventModel.h>
|
||||
#else
|
||||
#import "TDEventModel.h"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TDUpdateEventModel : TDEventModel
|
||||
|
||||
- (instancetype)initWithEventName:(NSString *)eventName eventID:(NSString *)eventID;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbc2e721110e8d4458e16a8fa6abe060
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// TDUpdateEventModel.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TDUpdateEventModel.h"
|
||||
#import "ThinkingAnalyticsSDKPrivate.h"
|
||||
|
||||
@implementation TDUpdateEventModel
|
||||
|
||||
- (instancetype)initWithEventName:(NSString *)eventName eventID:(NSString *)eventID {
|
||||
if (self = [self initWithEventName:eventName eventType:TD_EVENT_TYPE_TRACK_UPDATE]) {
|
||||
self.extraID = eventID;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a4c872a829d6024fb4a734c8ef5a8ed
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e7eea08e7b68714a8325f2273b99e2b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAUserEvent.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TABaseEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAUserEvent : TABaseEvent
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6bb3fb96980c85a41be6e9150daad0d3
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// TAUserEvent.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/6/12.
|
||||
//
|
||||
|
||||
#import "TAUserEvent.h"
|
||||
|
||||
@implementation TAUserEvent
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.timeValueType = TAEventTimeValueTypeNone;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
//MARK: - Delegate
|
||||
|
||||
- (void)ta_validateKey:(NSString *)key value:(id)value error:(NSError *__autoreleasing _Nullable *)error {
|
||||
[TAPropertyValidator validateBaseEventPropertyKey:key value:value error:error];
|
||||
}
|
||||
|
||||
//MARK: - Setter & Getter
|
||||
|
||||
- (void)setTime:(NSDate *)time {
|
||||
[super setTime:time];
|
||||
|
||||
self.timeValueType = time == nil ? TAEventTimeValueTypeNone : TAEventTimeValueTypeTimeOnly;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b2091d83c9e46d48b5ecbcc1303bafb
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAUserEventAdd.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAUserEventAdd : TAUserEvent
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63b7ac8601a8a024cadf13867461fea2
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// TAUserEventAdd.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEventAdd.h"
|
||||
|
||||
@implementation TAUserEventAdd
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
self.eventType = TAEventTypeUserAdd;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)validateWithError:(NSError *__autoreleasing _Nullable *)error {
|
||||
|
||||
}
|
||||
|
||||
//MARK: - Delegate
|
||||
|
||||
- (void)ta_validateKey:(NSString *)key value:(id)value error:(NSError *__autoreleasing _Nullable *)error {
|
||||
[super ta_validateKey:key value:value error:error];
|
||||
if (*error) {
|
||||
return;
|
||||
}
|
||||
if (![value isKindOfClass:NSNumber.class]) {
|
||||
NSString *errMsg = [NSString stringWithFormat:@"Property value must be type NSNumber. got: %@ %@. ", [value class], value];
|
||||
*error = TAPropertyError(10008, errMsg);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f189f76c1bda181468232e42d0167df9
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAUserEventAppend.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAUserEventAppend : TAUserEvent
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d49e66ef3c986cc4bbeeb74546f4efff
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// TAUserEventAppend.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEventAppend.h"
|
||||
|
||||
@implementation TAUserEventAppend
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
self.eventType = TAEventTypeUserAppend;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
//MARK: - Delegate
|
||||
|
||||
- (void)ta_validateKey:(NSString *)key value:(id)value error:(NSError *__autoreleasing _Nullable *)error {
|
||||
[super ta_validateKey:key value:value error:error];
|
||||
if (*error) {
|
||||
return;
|
||||
}
|
||||
if (![value isKindOfClass:NSArray.class]) {
|
||||
NSString *errMsg = [NSString stringWithFormat:@"Property value must be type NSArray. got: %@ %@. ", [value class], value];
|
||||
*error = TAPropertyError(10009, errMsg);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e81e2c06e182e724797941a1649ebfc9
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAUserEventDelete.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAUserEventDelete : TAUserEvent
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34371ed8d8bc1d046a8d9ce530e7cc5b
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// TAUserEventDelete.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEventDelete.h"
|
||||
|
||||
@implementation TAUserEventDelete
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
self.eventType = TAEventTypeUserDel;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b1c8b11b1d25e694daba78204879133f
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAUserEventSet.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAUserEventSet : TAUserEvent
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fb292f74faffd04aacdd6d6c8fb573d
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// TAUserEventSet.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEventSet.h"
|
||||
|
||||
@implementation TAUserEventSet
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
self.eventType = TAEventTypeUserSet;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce3f089d0844ad64abe613ad1c9611e5
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAUserEventSetOnce.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAUserEventSetOnce : TAUserEvent
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c45394852951ac34893a0a996450fb7d
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// TAUserEventSetOnce.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEventSetOnce.h"
|
||||
|
||||
@implementation TAUserEventSetOnce
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
self.eventType = TAEventTypeUserSetOnce;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c47de666b1b16a418729c90dc5176d5
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAUserEventUniqueAppend.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEventAppend.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAUserEventUniqueAppend : TAUserEventAppend
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e0bc42d52b244149b55cc9aa04c0e87
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// TAUserEventUniqueAppend.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEventUniqueAppend.h"
|
||||
|
||||
@implementation TAUserEventUniqueAppend
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
self.eventType = TAEventTypeUserUniqueAppend;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 961c617f5bbdd1341a9a4f34ffd3761d
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAUserEventUnset.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEvent.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAUserEventUnset : TAUserEvent
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a78029a6eae2e9e479722e1ec2da88a0
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// TAUserEventUnset.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#import "TAUserEventUnset.h"
|
||||
|
||||
@implementation TAUserEventUnset
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
self.eventType = TAEventTypeUserUnset;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: adade9d1d8d6f19418abf8b1ba48c9f6
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// TAUserPropertyHeader.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by Yangxiongon 2022/7/1.
|
||||
//
|
||||
|
||||
#ifndef TAUserPropertyHeader_h
|
||||
#define TAUserPropertyHeader_h
|
||||
|
||||
#import "TAUserEventSet.h"
|
||||
#import "TAUserEventSetOnce.h"
|
||||
#import "TAUserEventUnset.h"
|
||||
#import "TAUserEventAdd.h"
|
||||
#import "TAUserEventDelete.h"
|
||||
#import "TAUserEventAppend.h"
|
||||
#import "TAUserEventUniqueAppend.h"
|
||||
|
||||
#endif /* TAUserPropertyHeader_h */
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f4c8873703dea740ae30f3254501278
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user