Ta android + ios
This commit is contained in:
16
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAdjustSyncData.h
vendored
Normal file
16
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAdjustSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAdjustSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f23d1fb8c784ff9439ce700b9f055a1c
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAdjustSyncData.m
vendored
Normal file
33
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAdjustSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAdjustSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bcdd8f297c5691e4a9ec48396c0ba117
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppLovinSyncData.h
vendored
Normal file
16
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppLovinSyncData.h
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppLovinSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppLovinSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f589c9d5fa5d0a74da38516b85b415dd
|
||||
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:
|
||||
62
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppLovinSyncData.m
vendored
Normal file
62
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppLovinSyncData.m
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppLovinSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppLovinSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1555b4e0a58fc644093686c88d04d988
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppsFlyerSyncData.h
vendored
Normal file
16
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppsFlyerSyncData.h
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppsFlyerSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppsFlyerSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dcb2268fa2aab7a45bc7f1bc87cac652
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppsFlyerSyncData.m
vendored
Normal file
39
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppsFlyerSyncData.m
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppsFlyerSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAAppsFlyerSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 130022dcb686e874c9a601a19526e9d7
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABaseSyncData.h
vendored
Normal file
76
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABaseSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABaseSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd5f4f80c653bbb4599cc3e51e9bc0c8
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABaseSyncData.m
vendored
Normal file
21
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABaseSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABaseSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94f4814aeb93aab4d9a3be4e72fe10e8
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABranchSyncData.h
vendored
Normal file
16
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABranchSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABranchSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f4ba7dc2005f644391a51e99729e172
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABranchSyncData.m
vendored
Normal file
37
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABranchSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TABranchSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc4b09aa40210974b81be376181cc1bc
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAFirebaseSyncData.h
vendored
Normal file
16
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAFirebaseSyncData.h
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAFirebaseSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAFirebaseSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92d5e3c0b05abb34ba96a3685d214252
|
||||
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:
|
||||
32
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAFirebaseSyncData.m
vendored
Normal file
32
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAFirebaseSyncData.m
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAFirebaseSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAFirebaseSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 645cd0e0a5de8ce4e95db6dd93942fa8
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAIronSourceSyncData.h
vendored
Normal file
16
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAIronSourceSyncData.h
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAIronSourceSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAIronSourceSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ec36aa488f5b3d49a55407eddacbb1f
|
||||
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:
|
||||
61
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAIronSourceSyncData.m
vendored
Normal file
61
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAIronSourceSyncData.m
vendored
Normal file
@@ -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
|
||||
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAIronSourceSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAIronSourceSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfc95bf40b9c2ea409c12c2efd32f205
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAKochavaSyncData.h
vendored
Normal file
16
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAKochavaSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAKochavaSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 666f09a63236aa2428d8f5724fbae835
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAKochavaSyncData.m
vendored
Normal file
42
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAKochavaSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAKochavaSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d8dd1140d4ed51499d93137d3b38e3f
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAReYunSyncData.h
vendored
Normal file
16
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAReYunSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAReYunSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 159742403ce39d048b1045b491ea75b1
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAReYunSyncData.m
vendored
Normal file
31
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAReYunSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAReYunSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70d865d81fb98f64da6bb47bf5e2626d
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdParty.h
vendored
Normal file
18
sdk-intergration/Packages/TA/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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdParty.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdParty.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80d6e065164b28e4d9f22797357c96ad
|
||||
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:
|
||||
20
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartyManager.h
vendored
Normal file
20
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartyManager.h
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartyManager.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartyManager.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d27babfde311a54b9a1c303f0e191f6
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartyManager.m
vendored
Normal file
168
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartyManager.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartyManager.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b349605eb647b244fba3407e9a3a8dcf
|
||||
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:
|
||||
36
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartySyncProtocol.h
vendored
Normal file
36
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartySyncProtocol.h
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartySyncProtocol.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TAThirdPartySyncProtocol.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fcd8d7f779be07f42890854c530eaa6d
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATopOnSyncData.h
vendored
Normal file
16
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATopOnSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATopOnSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d075aaf9e8e763468a2486c2de5dada
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATopOnSyncData.m
vendored
Normal file
39
sdk-intergration/Packages/TA/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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATopOnSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATopOnSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3aa53540e955f33409921ec15cf41d9a
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATradPlusSyncData.h
vendored
Normal file
16
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATradPlusSyncData.h
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATradPlusSyncData.h.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATradPlusSyncData.h.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b430f4186c171b47a3decec06726940
|
||||
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
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATradPlusSyncData.m
vendored
Normal file
39
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATradPlusSyncData.m
vendored
Normal file
@@ -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
|
||||
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATradPlusSyncData.m.meta
vendored
Normal file
33
sdk-intergration/Packages/TA/Plugins/iOS/TAThirdParty/TATradPlusSyncData.m.meta
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4aaa7712d062974ba1a32f80e1aab52
|
||||
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