备份CatanBuilding瘦身独立工程
This commit is contained in:
16
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAAdjustSyncData.h
vendored
Normal file
16
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAAdjustSyncData.h
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAAdjustSyncData.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/3/25.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAAdjustSyncData : TABaseSyncData
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c2ee17250bf74b279745e7b20324386
|
||||
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:
|
||||
33
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAAdjustSyncData.m
vendored
Normal file
33
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAAdjustSyncData.m
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// TAAdjustSyncData.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/3/25.
|
||||
//
|
||||
|
||||
#import "TAAdjustSyncData.h"
|
||||
|
||||
@implementation TAAdjustSyncData
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property {
|
||||
|
||||
if (!self.customPropety || [self.customPropety isKindOfClass:[NSDictionary class]]) {
|
||||
self.customPropety = @{};
|
||||
}
|
||||
|
||||
NSString *accountID = [taInstance getAccountId] ? [taInstance getAccountId] : @"";
|
||||
NSString *distinctId = [taInstance getDistinctId] ? [taInstance getDistinctId] : @"";
|
||||
|
||||
Class cls = NSClassFromString(@"Adjust");
|
||||
SEL sel = NSSelectorFromString(@"addSessionCallbackParameter:value:");
|
||||
if (cls && [cls respondsToSelector:sel]) {
|
||||
[cls performSelector:sel withObject:TA_ACCOUNT_ID withObject:accountID];
|
||||
[cls performSelector:sel withObject:TA_DISTINCT_ID withObject:distinctId];
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5eb03a70bd3e04ffaa297aa9944119ab
|
||||
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 @@
|
||||
//
|
||||
// TAAppLovinSyncData.h
|
||||
// ThinkingSDK.default-Base-Core-Extension-Util-iOS
|
||||
//
|
||||
// Created by wwango on 2022/9/28.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAAppLovinSyncData : TABaseSyncData
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bef7b8a1ee5a94c378327f8cc1fbd2c2
|
||||
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,62 @@
|
||||
//
|
||||
// TAAppLovinSyncData.m
|
||||
// ThinkingSDK.default-Base-Core-Extension-Util-iOS
|
||||
//
|
||||
// Created by wwango on 2022/9/28.
|
||||
//
|
||||
|
||||
#import "TAAppLovinSyncData.h"
|
||||
|
||||
@implementation TAAppLovinSyncData
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property {
|
||||
|
||||
if (!self.customPropety || [self.customPropety isKindOfClass:[NSDictionary class]]) {
|
||||
self.customPropety = @{};
|
||||
}
|
||||
|
||||
NSString *distinctId = [taInstance getDistinctId] ? [taInstance getDistinctId] : @"";
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
Class cls = NSClassFromString(@"ALSdk");
|
||||
SEL sel1 = NSSelectorFromString(@"shared");
|
||||
SEL sel2 = NSSelectorFromString(@"setUserIdentifier");
|
||||
__block id instance;
|
||||
dispatch_once(&onceToken, ^{
|
||||
if (cls && [cls respondsToSelector:sel1]) {
|
||||
instance = [cls performSelector:sel1];
|
||||
if ([instance respondsToSelector:sel2]) {
|
||||
[instance performSelector:sel2 withObject:distinctId];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if ([property isKindOfClass:[NSDictionary class]] && [property.allKeys containsObject:TASyncDataKey]) {
|
||||
id customData = property[TASyncDataKey];
|
||||
Class cls = NSClassFromString(@"MAAd");
|
||||
if ([customData isKindOfClass:cls]) {
|
||||
double revenue = [(NSNumber *)[customData performSelector:@selector(revenue)] doubleValue];
|
||||
NSString *networkName = [customData performSelector:@selector(networkName)];
|
||||
NSString *placement = [customData performSelector:@selector(placement)];
|
||||
NSString *adUnitId = [customData performSelector:@selector(adUnitIdentifier)];
|
||||
NSString *format = [[customData performSelector:@selector(format)] performSelector:@selector(label)];
|
||||
NSString *countryCode = [instance valueForKeyPath:@"configuration.countryCode"];
|
||||
|
||||
[taInstance track:@"appLovin_sdk_ad_revenue" properties:@{
|
||||
@"revenue":@(revenue),
|
||||
@"networkName":networkName,
|
||||
@"placement":placement,
|
||||
@"adUnitId":adUnitId,
|
||||
@"format":format,
|
||||
@"countryCode":countryCode}];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6acd01cb07ff941398f5ac76b64d668b
|
||||
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 @@
|
||||
//
|
||||
// TAAppsFlyerSyncData.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/2/14.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAAppsFlyerSyncData : TABaseSyncData
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b808938d5a4ef44cd9417fcaa09304a4
|
||||
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,39 @@
|
||||
//
|
||||
// TAAppsFlyerSyncData.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/2/14.
|
||||
//
|
||||
|
||||
#import "TAAppsFlyerSyncData.h"
|
||||
|
||||
@implementation TAAppsFlyerSyncData
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property {
|
||||
|
||||
if (!self.customPropety || [self.customPropety isKindOfClass:[NSDictionary class]]) {
|
||||
self.customPropety = @{};
|
||||
}
|
||||
|
||||
NSMutableDictionary * datas = [NSMutableDictionary dictionaryWithDictionary:property];
|
||||
NSString *accountID = [taInstance getAccountId];
|
||||
NSString *distinctId = [taInstance getDistinctId];
|
||||
[datas setObject:(accountID ? accountID : @"") forKey:TA_ACCOUNT_ID];
|
||||
[datas setObject:distinctId ? distinctId : @"" forKey:TA_DISTINCT_ID];
|
||||
|
||||
Class cls = NSClassFromString(@"AppsFlyerLib");
|
||||
SEL sel1 = NSSelectorFromString(@"shared");
|
||||
SEL sel2 = NSSelectorFromString(@"setAdditionalData:");
|
||||
if (cls && [cls respondsToSelector:sel1]) {
|
||||
id instance = [cls performSelector:sel1];
|
||||
if ([instance respondsToSelector:sel2]) {
|
||||
[instance performSelector:sel2 withObject:datas];
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b373ccef5fc814dd3b5cca3544ef6d2e
|
||||
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:
|
||||
76
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TABaseSyncData.h
vendored
Normal file
76
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TABaseSyncData.h
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// TABaseSyncData.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/2/14.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <objc/runtime.h>
|
||||
#import "TAThirdPartySyncProtocol.h"
|
||||
|
||||
#define TA_DISTINCT_ID @"ta_distinct_id"
|
||||
#define TA_ACCOUNT_ID @"ta_account_id"
|
||||
|
||||
|
||||
#define td_force_inline __inline__ __attribute__((always_inline))
|
||||
|
||||
|
||||
#define TASyncDataKey @"TASyncDataKey"
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
static td_force_inline void __td_td__swizzleWithClassMethod(Class c, NSString *oriSELStr, SEL newSel, IMP newIMP) {
|
||||
SEL orig = NSSelectorFromString(oriSELStr);
|
||||
Method origMethod = class_getClassMethod(c, orig);
|
||||
c = object_getClass((id)c);
|
||||
|
||||
class_addMethod(c, newSel, newIMP, method_getTypeEncoding(origMethod));
|
||||
|
||||
|
||||
if(class_addMethod(c, orig, newIMP, method_getTypeEncoding(origMethod))) {
|
||||
class_replaceMethod(c, newSel, method_getImplementation(origMethod), method_getTypeEncoding(origMethod));
|
||||
} else {
|
||||
Method newMethod = class_getClassMethod(c, newSel);
|
||||
method_exchangeImplementations(origMethod, newMethod);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static td_force_inline void __td_td_swizzleWithOriSELStr(id target, NSString *oriSELStr, SEL newSEL, IMP newIMP) {
|
||||
SEL origSEL = NSSelectorFromString(oriSELStr);
|
||||
Method origMethod = class_getInstanceMethod([target class], origSEL);
|
||||
|
||||
if ([target respondsToSelector:origSEL]) {
|
||||
|
||||
class_addMethod([target class], newSEL, newIMP, method_getTypeEncoding(origMethod));
|
||||
|
||||
|
||||
Method origMethod = class_getInstanceMethod([target class], origSEL);
|
||||
|
||||
Method newMethod = class_getInstanceMethod([target class], newSEL);
|
||||
|
||||
|
||||
if(class_addMethod([target class], origSEL, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))) {
|
||||
|
||||
class_replaceMethod([target class], newSEL, method_getImplementation(origMethod), method_getTypeEncoding(origMethod));
|
||||
} else {
|
||||
|
||||
method_exchangeImplementations(origMethod, newMethod);
|
||||
}
|
||||
} else {
|
||||
|
||||
class_addMethod([target class], origSEL, newIMP, method_getTypeEncoding(origMethod));
|
||||
}
|
||||
}
|
||||
|
||||
@interface TABaseSyncData : NSObject<TAThirdPartySyncProtocol>
|
||||
|
||||
@property (nonatomic, weak) id<TAThinkingTrackProtocol> taInstance;
|
||||
@property (nonatomic, strong) NSDictionary *customPropety;
|
||||
@property (nonatomic, assign) BOOL isSwizzleMethod;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 65771a2840d484c718e6166b779b5d9b
|
||||
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:
|
||||
21
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TABaseSyncData.m
vendored
Normal file
21
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TABaseSyncData.m
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// TABaseSyncData.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/2/14.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
@implementation TABaseSyncData
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property {
|
||||
self.taInstance = taInstance;
|
||||
self.customPropety = property;
|
||||
}
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance {
|
||||
[self syncThirdData:taInstance property:@{}];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 517862af209ce4ad4bd8002a327fed73
|
||||
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:
|
||||
16
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TABranchSyncData.h
vendored
Normal file
16
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TABranchSyncData.h
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TABranchSyncData.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/3/25.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TABranchSyncData : TABaseSyncData
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca22a7263ae5145cba856e4bd480b2bb
|
||||
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:
|
||||
37
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TABranchSyncData.m
vendored
Normal file
37
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TABranchSyncData.m
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// TABranchSyncData.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/3/25.
|
||||
//
|
||||
|
||||
#import "TABranchSyncData.h"
|
||||
|
||||
@implementation TABranchSyncData
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property {
|
||||
|
||||
if (!self.customPropety || [self.customPropety isKindOfClass:[NSDictionary class]]) {
|
||||
self.customPropety = @{};
|
||||
}
|
||||
|
||||
NSString *accountID = [taInstance getAccountId];
|
||||
NSString *distinctId = [taInstance getDistinctId];
|
||||
|
||||
Class cls = NSClassFromString(@"Branch");
|
||||
SEL sel1 = NSSelectorFromString(@"getInstance");
|
||||
SEL sel2 = NSSelectorFromString(@"setRequestMetadataKey:value:");
|
||||
if (cls && [cls respondsToSelector:sel1]) {
|
||||
id instance = [cls performSelector:sel1];
|
||||
if ([instance respondsToSelector:sel2]) {
|
||||
[instance performSelector:sel2 withObject:TA_ACCOUNT_ID withObject:accountID];
|
||||
[instance performSelector:sel2 withObject:TA_DISTINCT_ID withObject:distinctId];
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14d24e07c10e04914806b65a10266790
|
||||
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 @@
|
||||
//
|
||||
// TAFirebaseSyncData.h
|
||||
// ThinkingSDK.default-Base-Core-Extension-Util-iOS
|
||||
//
|
||||
// Created by wwango on 2022/9/28.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAFirebaseSyncData : TABaseSyncData
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05884726aff3f4d0a8705c380924ac0f
|
||||
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 @@
|
||||
//
|
||||
// TAFirebaseSyncData.m
|
||||
// ThinkingSDK.default-Base-Core-Extension-Util-iOS
|
||||
//
|
||||
// Created by wwango on 2022/9/28.
|
||||
//
|
||||
|
||||
#import "TAFirebaseSyncData.h"
|
||||
|
||||
@implementation TAFirebaseSyncData
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property {
|
||||
|
||||
if (!self.customPropety || [self.customPropety isKindOfClass:[NSDictionary class]]) {
|
||||
self.customPropety = @{};
|
||||
}
|
||||
|
||||
NSString *distinctId = [taInstance getDistinctId] ? [taInstance getDistinctId] : @"";
|
||||
|
||||
Class cls = NSClassFromString(@"FIRAnalytics");
|
||||
SEL sel = NSSelectorFromString(@"setUserID:");
|
||||
if (cls && [cls respondsToSelector:sel]) {
|
||||
[cls performSelector:sel withObject:distinctId];
|
||||
}
|
||||
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f55372f8b0d004744a0d5601f3bdf1e5
|
||||
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 @@
|
||||
//
|
||||
// TAIronSourceSyncData.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/2/16.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAIronSourceSyncData : TABaseSyncData
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fccbd96cdae8450181ef923883295d9
|
||||
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,61 @@
|
||||
//
|
||||
// TAIronSourceSyncData.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/2/16.
|
||||
//
|
||||
|
||||
#import "TAIronSourceSyncData.h"
|
||||
|
||||
@implementation TAIronSourceSyncData
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
|
||||
static id _td_last_IronSource_delegate;
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance {
|
||||
|
||||
[super syncThirdData:taInstance];
|
||||
|
||||
if (self.isSwizzleMethod) return;
|
||||
|
||||
Class class = NSClassFromString(@"IronSource");
|
||||
NSString *oriSELString = @"addImpressionDataDelegate:";
|
||||
SEL newSel = NSSelectorFromString([NSString stringWithFormat:@"td_%@", oriSELString]);
|
||||
IMP newIMP = imp_implementationWithBlock(^(id _self, id delegate) {
|
||||
if ([_self respondsToSelector:newSel]) {
|
||||
[_self performSelector:newSel withObject:delegate];
|
||||
_td_last_IronSource_delegate = delegate;
|
||||
}
|
||||
|
||||
id class1 = delegate;
|
||||
NSString *oriSELString1 = @"impressionDataDidSucceed:";
|
||||
SEL newSel1 = NSSelectorFromString([NSString stringWithFormat:@"td_%@", oriSELString1]);
|
||||
IMP newIMP1 = imp_implementationWithBlock(^(id _self1, id impressionData) {
|
||||
if ([_self1 respondsToSelector:newSel1]) {
|
||||
[_self1 performSelector:newSel1 withObject:impressionData];
|
||||
}
|
||||
|
||||
NSDictionary *all_data;
|
||||
SEL sel = NSSelectorFromString(@"all_data");
|
||||
if ([impressionData respondsToSelector:sel]) {
|
||||
all_data = [impressionData performSelector:sel];
|
||||
}
|
||||
|
||||
if (_td_last_IronSource_delegate == _self1) {
|
||||
[self.taInstance track:@"ta_ironSource_callback" properties:all_data];
|
||||
}
|
||||
});
|
||||
__td_td_swizzleWithOriSELStr(class1, oriSELString1, newSel1, newIMP1);
|
||||
});
|
||||
|
||||
__td_td__swizzleWithClassMethod(class, oriSELString, newSel, newIMP);
|
||||
|
||||
self.isSwizzleMethod = YES;
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50723cb7b78a24331b43bba7ee34caf4
|
||||
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:
|
||||
16
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAKochavaSyncData.h
vendored
Normal file
16
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAKochavaSyncData.h
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAKochavaSyncData.h
|
||||
// ThinkingSDK.default-Base-Core-Extension-Util-iOS
|
||||
//
|
||||
// Created by wwango on 2022/9/28.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAKochavaSyncData : TABaseSyncData
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5908d2c27b80a489dae892a870b74de1
|
||||
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:
|
||||
42
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAKochavaSyncData.m
vendored
Normal file
42
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAKochavaSyncData.m
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// TAKochavaSyncData.m
|
||||
// ThinkingSDK.default-Base-Core-Extension-Util-iOS
|
||||
//
|
||||
// Created by wwango on 2022/9/28.
|
||||
//
|
||||
|
||||
#import "TAKochavaSyncData.h"
|
||||
|
||||
@implementation TAKochavaSyncData
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property {
|
||||
|
||||
if (!self.customPropety || [self.customPropety isKindOfClass:[NSDictionary class]]) {
|
||||
self.customPropety = @{};
|
||||
}
|
||||
|
||||
NSString *accountID = [taInstance getAccountId];
|
||||
NSString *distinctId = [taInstance getDistinctId];
|
||||
|
||||
Class cls = NSClassFromString(@"KVATracker");
|
||||
SEL sel = NSSelectorFromString(@"shared");
|
||||
SEL sel1 = NSSelectorFromString(@"identityLink");
|
||||
SEL sel2 = NSSelectorFromString(@"registerWithNameString:identifierString:");
|
||||
if (cls && [cls respondsToSelector:sel]) {
|
||||
id shared = [cls performSelector:sel];
|
||||
if (shared && [shared respondsToSelector:sel1]) {
|
||||
id identityLink = [shared performSelector:sel1];
|
||||
if (identityLink && [identityLink respondsToSelector:sel2]) {
|
||||
[identityLink performSelector:sel2 withObject:TA_ACCOUNT_ID withObject:(accountID ? accountID : @"")];
|
||||
[identityLink performSelector:sel2 withObject:TA_DISTINCT_ID withObject:(distinctId ? distinctId : @"")];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9dfff7df542cd401fa7592b206725a02
|
||||
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:
|
||||
16
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAReYunSyncData.h
vendored
Normal file
16
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAReYunSyncData.h
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TAReYunSyncData.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/3/25.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAReYunSyncData : TABaseSyncData
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e64632bcc60a04ad78c1baa60002266c
|
||||
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:
|
||||
31
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAReYunSyncData.m
vendored
Normal file
31
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAReYunSyncData.m
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// TAReYunSyncData.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/3/25.
|
||||
//
|
||||
|
||||
#import "TAReYunSyncData.h"
|
||||
|
||||
@implementation TAReYunSyncData
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property {
|
||||
|
||||
if (!self.customPropety || [self.customPropety isKindOfClass:[NSDictionary class]]) {
|
||||
self.customPropety = @{};
|
||||
}
|
||||
|
||||
NSString *distinctId = [taInstance getDistinctId] ? [taInstance getDistinctId] : @"";
|
||||
|
||||
Class cls = NSClassFromString(@"Tracking");
|
||||
SEL sel = NSSelectorFromString(@"setRegisterWithAccountID:");
|
||||
if (cls && [cls respondsToSelector:sel]) {
|
||||
[cls performSelector:sel withObject: distinctId];
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb3609527c6d545288b56199264a3800
|
||||
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:
|
||||
18
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAThirdParty.h
vendored
Normal file
18
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAThirdParty.h
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// TAThirdParty.h
|
||||
// TAThirdParty
|
||||
//
|
||||
// Created by Charles on 9.1.23.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for TAThirdParty.
|
||||
FOUNDATION_EXPORT double TAThirdPartyVersionNumber;
|
||||
|
||||
//! Project version string for TAThirdParty.
|
||||
FOUNDATION_EXPORT const unsigned char TAThirdPartyVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <TAThirdParty/PublicHeader.h>
|
||||
|
||||
|
||||
33
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAThirdParty.h.meta
vendored
Normal file
33
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAThirdParty.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97f6ec784b7384c92ac47dcd94bf5d5a
|
||||
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 @@
|
||||
//
|
||||
// TAThirdPartyManager.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/2/11.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "TAThirdPartySyncProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TAThirdPartyManager : NSObject<TAThirdPartyProtocol>
|
||||
|
||||
- (void)enableThirdPartySharing:(NSNumber *)type instance:(id<TAThinkingTrackProtocol>)instance;
|
||||
- (void)enableThirdPartySharing:(NSNumber *)type instance:(id<TAThinkingTrackProtocol>)instance property:(NSDictionary *)property;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17cf558a565af4f988f6a4a875217e78
|
||||
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:
|
||||
168
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAThirdPartyManager.m
vendored
Normal file
168
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TAThirdPartyManager.m
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
//
|
||||
// TAThirdPartyManager.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/2/11.
|
||||
//
|
||||
|
||||
#import "TAThirdPartyManager.h"
|
||||
#import "TAAppsFlyerSyncData.h"
|
||||
#import "TAIronSourceSyncData.h"
|
||||
#import "TAAdjustSyncData.h"
|
||||
#import "TABranchSyncData.h"
|
||||
#import "TATopOnSyncData.h"
|
||||
#import "TAReYunSyncData.h"
|
||||
#import "TATradPlusSyncData.h"
|
||||
#import "TAKochavaSyncData.h"
|
||||
|
||||
|
||||
typedef NS_OPTIONS(NSInteger, TAInnerThirdPartyShareType) {
|
||||
TAInnerThirdPartyShareTypeNONE = 0,
|
||||
TAInnerThirdPartyShareTypeAPPSFLYER = 1 << 0,
|
||||
TAInnerThirdPartyShareTypeIRONSOURCE = 1 << 1,
|
||||
TAInnerThirdPartyShareTypeADJUST = 1 << 2,
|
||||
TAInnerThirdPartyShareTypeBRANCH = 1 << 3,
|
||||
TAInnerThirdPartyShareTypeTOPON = 1 << 4,
|
||||
TAInnerThirdPartyShareTypeTRACKING = 1 << 5,
|
||||
TAInnerThirdPartyShareTypeTRADPLUS = 1 << 6,
|
||||
TAInnerThirdPartyShareTypeAPPLOVIN = 1 << 7,
|
||||
TAInnerThirdPartyShareTypeKOCHAVA = 1 << 8,
|
||||
TAInnerThirdPartyShareTypeTALKINGDATA = 1 << 9,
|
||||
TAInnerThirdPartyShareTypeFIREBASE = 1 << 10,
|
||||
|
||||
};
|
||||
|
||||
static NSMutableDictionary *_thirdPartyManagerMap;
|
||||
|
||||
// Register a third-party data collection service, and when the APP starts, it will start from the data area
|
||||
char * kThinkingServices_service __attribute((used, section("__DATA, ThinkingServices"))) = "{ \"TAThirdPartyProtocol\" : \"TAThirdPartyManager\"}";
|
||||
@interface TAThirdPartyManager()<TAThirdPartyProtocol>
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation TAThirdPartyManager
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_thirdPartyManagerMap = [NSMutableDictionary dictionary];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)enableThirdPartySharing:(NSNumber *)type instance:(id<TAThinkingTrackProtocol>)instance
|
||||
{
|
||||
[self enableThirdPartySharing:type instance:instance property:@{}];
|
||||
}
|
||||
|
||||
- (void)enableThirdPartySharing:(NSNumber *)typee instance:(id<TAThinkingTrackProtocol>)instance property:(NSDictionary *)property
|
||||
{
|
||||
NSDictionary *info = [self _getThridInfoWithType:typee];
|
||||
|
||||
NSString *libClass = info[@"libClass"];
|
||||
NSString *taThirdClass = info[@"taThirdClass"];
|
||||
NSString *errorMes = info[@"errorMes"];
|
||||
|
||||
if (!NSClassFromString(libClass)) {
|
||||
NSLog(@"[THINKING] %@", errorMes);
|
||||
}else {
|
||||
id<TAThirdPartySyncProtocol> syncData = [_thirdPartyManagerMap objectForKey:taThirdClass];
|
||||
if (!syncData) {
|
||||
syncData = [NSClassFromString(taThirdClass) new];
|
||||
[_thirdPartyManagerMap setObject:syncData forKey:taThirdClass];
|
||||
}
|
||||
[syncData syncThirdData:instance property:[property copy]];
|
||||
NSLog(@"[THINKING] %@ , SyncThirdData Success", NSClassFromString(libClass));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (NSDictionary *)_getThridInfoWithType:(NSNumber *)typee {
|
||||
|
||||
static NSDictionary *_ta_ThridInfo;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
_ta_ThridInfo = @{
|
||||
@(TAInnerThirdPartyShareTypeAPPSFLYER):@{
|
||||
|
||||
@"libClass": @"AppsFlyerLib",
|
||||
@"taThirdClass":@"TAAppsFlyerSyncData",
|
||||
@"errorMes":@"AppsFlyer Data synchronization exception: not installed AppsFlyer SDK"
|
||||
|
||||
},
|
||||
@(TAInnerThirdPartyShareTypeIRONSOURCE):@{
|
||||
|
||||
@"libClass": @"IronSource",
|
||||
@"taThirdClass":@"TAIronSourceSyncData",
|
||||
@"errorMes": @"IronSource Data synchronization exception: not installed IronSource SDK"
|
||||
|
||||
},
|
||||
@(TAInnerThirdPartyShareTypeADJUST):@{
|
||||
|
||||
@"libClass": @"Adjust",
|
||||
@"taThirdClass":@"TAAdjustSyncData",
|
||||
@"errorMes": @"Adjust Data synchronization exception: not installed Adjust SDK"
|
||||
|
||||
},
|
||||
@(TAInnerThirdPartyShareTypeBRANCH):@{
|
||||
|
||||
@"libClass": @"Branch",
|
||||
@"taThirdClass":@"TABranchSyncData",
|
||||
@"errorMes": @"Branch Data synchronization exception: not installed Branch SDK"
|
||||
|
||||
},
|
||||
@(TAInnerThirdPartyShareTypeTOPON):@{
|
||||
|
||||
@"libClass": @"ATAPI",
|
||||
@"taThirdClass":@"TATopOnSyncData",
|
||||
@"errorMes": @"TopOn Data synchronization exception: not installed TopOn SDK"
|
||||
|
||||
},
|
||||
@(TAInnerThirdPartyShareTypeTRACKING):@{
|
||||
|
||||
@"libClass": @"Tracking",
|
||||
@"taThirdClass":@"TAReYunSyncData",
|
||||
@"errorMes": @"ReYun Data synchronization exception: Data synchronization exception: not installed SDK"
|
||||
|
||||
},
|
||||
@(TAInnerThirdPartyShareTypeTRADPLUS):@{
|
||||
|
||||
@"libClass": @"TradPlus",
|
||||
@"taThirdClass":@"TATradPlusSyncData",
|
||||
@"errorMes": @"TradPlus Data synchronization exception: not installed TradPlus SDK"
|
||||
|
||||
},
|
||||
@(TAInnerThirdPartyShareTypeAPPLOVIN):@{
|
||||
|
||||
@"libClass": @"ALSdk",
|
||||
@"taThirdClass":@"TAAppLovinSyncData",
|
||||
@"errorMes": @"AppLovin Data synchronization exception: not installed AppLovin SDK"
|
||||
|
||||
},
|
||||
@(TAInnerThirdPartyShareTypeKOCHAVA):@{
|
||||
|
||||
@"libClass": @"KVATracker",
|
||||
@"taThirdClass":@"TAKochavaSyncData",
|
||||
@"errorMes": @"Kochava Data synchronization exception: not installed Kochava SDK"
|
||||
|
||||
},
|
||||
@(TAInnerThirdPartyShareTypeFIREBASE):@{
|
||||
|
||||
@"libClass": @"FIRAnalytics",
|
||||
@"taThirdClass":@"TAFirebaseSyncData",
|
||||
@"errorMes": @"FIREBASE Data synchronization exception: not installed FIRAnalytics SDK"
|
||||
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
return _ta_ThridInfo[typee];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a1080195ae5b4aea9bc7c1589134f3f
|
||||
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 @@
|
||||
//
|
||||
// TAThirdPartySyncProtocol.h
|
||||
// ThinkingSDKDEMO
|
||||
//
|
||||
// Created by wwango on 2022/2/17.
|
||||
// Copyright © 2022 thinking. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol TAThinkingTrackProtocol <NSObject>
|
||||
|
||||
- (void)track:(NSString *)event properties:(nullable NSDictionary *)propertieDict;
|
||||
- (NSString *)getDistinctId;
|
||||
- (NSString *)getAccountId;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@protocol TAThirdPartySyncProtocol <NSObject>
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance;
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property;
|
||||
|
||||
@end
|
||||
|
||||
@protocol TAThirdPartyProtocol <NSObject>
|
||||
|
||||
- (void)enableThirdPartySharing:(NSNumber *)type instance:(id<TAThinkingTrackProtocol>)instance;
|
||||
- (void)enableThirdPartySharing:(NSNumber *)type instance:(id<TAThinkingTrackProtocol>)instance property:(NSDictionary *)property;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d31a489f12eb54653b5cf6444e4245d6
|
||||
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:
|
||||
16
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TATopOnSyncData.h
vendored
Normal file
16
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TATopOnSyncData.h
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TATopOnSyncData.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/3/25.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TATopOnSyncData : TABaseSyncData
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cb377c463bc14281934790c36a376c0
|
||||
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:
|
||||
39
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TATopOnSyncData.m
vendored
Normal file
39
LocalPackages/com.thinkingdata.analytics@6408c68cf9/Plugins/iOS/TAThirdParty/TATopOnSyncData.m
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// TATopOnSyncData.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/3/25.
|
||||
//
|
||||
|
||||
#import "TATopOnSyncData.h"
|
||||
|
||||
@implementation TATopOnSyncData
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property {
|
||||
|
||||
if (!self.customPropety || [self.customPropety isKindOfClass:[NSDictionary class]]) {
|
||||
self.customPropety = @{};
|
||||
}
|
||||
|
||||
NSMutableDictionary * datas = [NSMutableDictionary dictionaryWithDictionary:property];
|
||||
NSString *accountID = [taInstance getAccountId];
|
||||
NSString *distinctId = [taInstance getDistinctId];
|
||||
[datas setObject:(accountID ? accountID : @"") forKey:TA_ACCOUNT_ID];
|
||||
[datas setObject:distinctId ? distinctId : @"" forKey:TA_DISTINCT_ID];
|
||||
|
||||
Class cls = NSClassFromString(@"ATAPI");
|
||||
SEL sel1 = NSSelectorFromString(@"sharedInstance");
|
||||
SEL sel2 = NSSelectorFromString(@"setCustomData:");
|
||||
if (cls && [cls respondsToSelector:sel1]) {
|
||||
id instance = [cls performSelector:sel1];
|
||||
if ([instance respondsToSelector:sel2]) {
|
||||
[instance performSelector:sel2 withObject:datas];
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbca3c50b30be4ef88f32c10856288c8
|
||||
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 @@
|
||||
//
|
||||
// TATradPlusSyncData.h
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/3/25.
|
||||
//
|
||||
|
||||
#import "TABaseSyncData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TATradPlusSyncData : TABaseSyncData
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0682c1aaffe14280b29c0bd11d0954e
|
||||
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,39 @@
|
||||
//
|
||||
// TATradPlusSyncData.m
|
||||
// ThinkingSDK
|
||||
//
|
||||
// Created by wwango on 2022/3/25.
|
||||
//
|
||||
|
||||
#import "TATradPlusSyncData.h"
|
||||
|
||||
@implementation TATradPlusSyncData
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
|
||||
- (void)syncThirdData:(id<TAThinkingTrackProtocol>)taInstance property:(NSDictionary *)property {
|
||||
|
||||
if (!self.customPropety || [self.customPropety isKindOfClass:[NSDictionary class]]) {
|
||||
self.customPropety = @{};
|
||||
}
|
||||
|
||||
NSMutableDictionary * datas = [NSMutableDictionary dictionaryWithDictionary:property];
|
||||
// NSString *accountID = [taInstance getAccountId];
|
||||
NSString *distinctId = [taInstance getDistinctId];
|
||||
// [datas setObject:(accountID ? accountID : @"") forKey:TA_ACCOUNT_ID];
|
||||
[datas setObject:distinctId ? distinctId : @"" forKey:TA_DISTINCT_ID];
|
||||
|
||||
Class cls = NSClassFromString(@"TradPlus");
|
||||
SEL sel1 = NSSelectorFromString(@"sharedInstance");
|
||||
SEL sel2 = NSSelectorFromString(@"setDicCustomValue:");
|
||||
if (cls && [cls respondsToSelector:sel1]) {
|
||||
id instance = [cls performSelector:sel1];
|
||||
if ([instance respondsToSelector:sel2]) {
|
||||
[instance performSelector:sel2 withObject:datas];
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e00d06dbb27e94407b943499f2d08daf
|
||||
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