备份CatanBuilding瘦身独立工程

This commit is contained in:
JSD\13999
2026-05-26 16:15:54 +08:00
commit 2d0e6a61b7
12001 changed files with 2431925 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
//
// TAAppEndEvent.h
// ThinkingSDK
//
// Created by Yangxiongon 2022/6/17.
//
#import "TAAutoTrackEvent.h"
NS_ASSUME_NONNULL_BEGIN
@interface TAAppEndEvent : TAAutoTrackEvent
@property (nonatomic, copy) NSString *screenName;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: ab91a24abdc494f7b8c0862a2b45cce3
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:

View File

@@ -0,0 +1,23 @@
//
// TAAppEndEvent.m
// ThinkingSDK
//
// Created by Yangxiongon 2022/6/17.
//
#import "TAAppEndEvent.h"
#import "TDPresetProperties+TDDisProperties.h"
@implementation TAAppEndEvent
- (NSMutableDictionary *)jsonObject {
NSMutableDictionary *dict = [super jsonObject];
if (![TDPresetProperties disableScreenName]) {
self.properties[@"#screen_name"] = self.screenName ?: @"";
}
return dict;
}
@end

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 294d54bcf09bf453c8bf7febc52d1dcb
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:

View File

@@ -0,0 +1,19 @@
//
// TAAppStartEvent.h
// ThinkingSDK
//
// Created by Yangxiongon 2022/6/17.
//
#import "TAAutoTrackEvent.h"
NS_ASSUME_NONNULL_BEGIN
@interface TAAppStartEvent : TAAutoTrackEvent
@property (nonatomic, copy) NSString *startReason;
@property (nonatomic, assign) BOOL resumeFromBackground;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 77af5449a173c4d05aa967435187b647
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:

View File

@@ -0,0 +1,27 @@
//
// TAAppStartEvent.m
// ThinkingSDK
//
// Created by Yangxiongon 2022/6/17.
//
#import "TAAppStartEvent.h"
#import <CoreGraphics/CoreGraphics.h>
#import "TDPresetProperties+TDDisProperties.h"
@implementation TAAppStartEvent
- (NSMutableDictionary *)jsonObject {
NSMutableDictionary *dict = [super jsonObject];
if (![TDPresetProperties disableResumeFromBackground]) {
self.properties[@"#resume_from_background"] = @(self.resumeFromBackground);
}
if (![TDPresetProperties disableStartReason]) {
self.properties[@"#start_reason"] = self.startReason;
}
return dict;
}
@end

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 1294c9d002c2c4f879fcc49269cbc7e9
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:

View File

@@ -0,0 +1,22 @@
//
// TAAutoClickEvent.h
// ThinkingSDK
//
// Created by Yangxiongon 2022/6/15.
//
#import "TAAutoTrackEvent.h"
NS_ASSUME_NONNULL_BEGIN
@interface TAAutoClickEvent : TAAutoTrackEvent
@property (nonatomic, copy) NSString *elementId;
@property (nonatomic, copy) NSString *elementContent;
@property (nonatomic, copy) NSString *elementType;
@property (nonatomic, copy) NSString *elementPosition;
@property (nonatomic, copy) NSString *pageTitle;
@property (nonatomic, copy) NSString *screenName;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: e0b6e9b4fa84e40ffa4799dd7aed576d
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:

View File

@@ -0,0 +1,38 @@
//
// TAAutoClickEvent.m
// ThinkingSDK
//
// Created by Yangxiongon 2022/6/15.
//
#import "TAAutoClickEvent.h"
#import "TDPresetProperties+TDDisProperties.h"
@implementation TAAutoClickEvent
- (NSMutableDictionary *)jsonObject {
NSMutableDictionary *dict = [super jsonObject];
if (![TDPresetProperties disableScreenName]) {
self.properties[@"#screen_name"] = self.screenName;
}
if (![TDPresetProperties disableElementId]) {
self.properties[@"#element_id"] = self.elementId;
}
if (![TDPresetProperties disableElementType]) {
self.properties[@"#element_type"] = self.elementType;
}
if (![TDPresetProperties disableElementContent]) {
self.properties[@"#element_content"] = self.elementContent;
}
if (![TDPresetProperties disableElementPosition]) {
self.properties[@"#element_position"] = self.elementPosition;
}
if (![TDPresetProperties disableTitle]) {
self.properties[@"#title"] = self.pageTitle;
}
return dict;
}
@end

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 22c8f205dbc9a492db570c08357cab4f
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:

View File

@@ -0,0 +1,20 @@
//
// TAAutoPageViewEvent.h
// ThinkingSDK
//
// Created by Yangxiongon 2022/6/15.
//
#import "TAAutoTrackEvent.h"
NS_ASSUME_NONNULL_BEGIN
@interface TAAutoPageViewEvent : TAAutoTrackEvent
@property (nonatomic, copy) NSString *pageUrl;
@property (nonatomic, copy) NSString *referrer;
@property (nonatomic, copy) NSString *pageTitle;
@property (nonatomic, copy) NSString *screenName;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: dfeb4b3d07e4d4c0e89b139b8d7e4184
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:

View File

@@ -0,0 +1,31 @@
//
// TAAutoPageViewEvent.m
// ThinkingSDK
//
// Created by Yangxiongon 2022/6/15.
//
#import "TAAutoPageViewEvent.h"
#import "TDPresetProperties+TDDisProperties.h"
@implementation TAAutoPageViewEvent
- (NSMutableDictionary *)jsonObject {
NSMutableDictionary *dict = [super jsonObject];
if (![TDPresetProperties disableScreenName]) {
self.properties[@"#screen_name"] = self.screenName;
}
if (![TDPresetProperties disableTitle]) {
self.properties[@"#title"] = self.pageTitle;
}
if (![TDPresetProperties disableUrl]) {
self.properties[@"#url"] = self.pageUrl;
}
if (![TDPresetProperties disableReferrer]) {
self.properties[@"#referrer"] = self.referrer;
}
return dict;
}
@end

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 2c0bed1add07542e6bcf1fda661ce0d5
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:

View File

@@ -0,0 +1,26 @@
//
// TAAutoTrackEvent.h
// ThinkingSDK
//
// Created by Yangxiongon 2022/6/15.
//
#import "TATrackEvent.h"
#import "TDConstant.h"
NS_ASSUME_NONNULL_BEGIN
@interface TAAutoTrackEvent : TATrackEvent
/// It is used to record the dynamic public properties of automatic collection events. The dynamic public properties need to be obtained in the current thread where the event occurs
@property (nonatomic, strong) NSDictionary *autoDynamicSuperProperties;
/// Static public property for logging autocollection events
@property (nonatomic, strong) NSDictionary *autoSuperProperties;
/// Returns the automatic collection type
- (ThinkingAnalyticsAutoTrackEventType)autoTrackEventType;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: debe332a658c34f4a97564ba712921a6
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:

View File

@@ -0,0 +1,58 @@
//
// TAAutoTrackEvent.m
// ThinkingSDK
//
// Created by Yangxiongon 2022/6/15.
//
#import "TAAutoTrackEvent.h"
#import "ThinkingAnalyticsSDKPrivate.h"
#import "TDPresetProperties+TDDisProperties.h"
@implementation TAAutoTrackEvent
- (NSMutableDictionary *)jsonObject {
NSMutableDictionary *dict = [super jsonObject];
// Reprocess the duration of automatic collection events, mainly app_start, app_end
// app_start app_end events are collected by the automatic collection management class. There are the following problems: the automatic collection management class and the timeTracker event duration management class are processed by listening to appLifeCycle notifications, so they are not at a precise and unified time point. There will be small errors that need to be eliminated.
// After testing, the error is less than 0.01s.
CGFloat minDuration = 0.01;
if (![TDPresetProperties disableDuration]) {
if (self.foregroundDuration > minDuration) {
self.properties[@"#duration"] = @([NSString stringWithFormat:@"%.3f", self.foregroundDuration].floatValue);
}
}
if (![TDPresetProperties disableBackgroundDuration]) {
if (self.backgroundDuration > minDuration) {
self.properties[@"#background_duration"] = @([NSString stringWithFormat:@"%.3f", self.backgroundDuration].floatValue);
}
}
return dict;
}
- (ThinkingAnalyticsAutoTrackEventType)autoTrackEventType {
if ([self.eventName isEqualToString:TD_APP_START_EVENT]) {
return ThinkingAnalyticsEventTypeAppStart;
} else if ([self.eventName isEqualToString:TD_APP_START_BACKGROUND_EVENT]) {
return ThinkingAnalyticsEventTypeAppStart;
} else if ([self.eventName isEqualToString:TD_APP_END_EVENT]) {
return ThinkingAnalyticsEventTypeAppEnd;
} else if ([self.eventName isEqualToString:TD_APP_VIEW_EVENT]) {
return ThinkingAnalyticsEventTypeAppViewScreen;
} else if ([self.eventName isEqualToString:TD_APP_CLICK_EVENT]) {
return ThinkingAnalyticsEventTypeAppClick;
} else if ([self.eventName isEqualToString:TD_APP_CRASH_EVENT]) {
return ThinkingAnalyticsEventTypeAppViewCrash;
} else if ([self.eventName isEqualToString:TD_APP_INSTALL_EVENT]) {
return ThinkingAnalyticsEventTypeAppInstall;
} else {
return ThinkingAnalyticsEventTypeNone;
}
}
- (void)ta_validateKey:(NSString *)key value:(id)value error:(NSError *__autoreleasing _Nullable *)error {
[TAPropertyValidator validateAutoTrackEventPropertyKey:key value:value error:error];
}
@end

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 457a15183a12f43288ad47022c24f21d
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:

View File

@@ -0,0 +1,16 @@
//
// TAPushClickEvent.h
// ThinkingSDK
//
// Created by liulongbing on 2023/5/31.
//
#import "TAAutoTrackEvent.h"
NS_ASSUME_NONNULL_BEGIN
@interface TAPushClickEvent : TAAutoTrackEvent
@property (nonatomic, strong) NSDictionary *ops;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 5da924cd82c7e49b6a2d9eafec038882
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:

View File

@@ -0,0 +1,18 @@
//
// TAPushClickEvent.m
// ThinkingSDK
//
// Created by liulongbing on 2023/5/31.
//
#import "TAPushClickEvent.h"
@implementation TAPushClickEvent
- (NSMutableDictionary *)jsonObject {
NSMutableDictionary *dict = [super jsonObject];
self.properties[@"#ops_receipt_properties"] = self.ops;
return dict;
}
@end

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 70ccea408f557438a9f8be087342eab3
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: