feat(2.1.x): update 2.1.x feature and braking changes
parent
1fc8b844a3
commit
94c9d74bfb
|
@ -0,0 +1,20 @@
|
|||
//
|
||||
// ActionModel.h
|
||||
// TDSCommon
|
||||
//
|
||||
// Created by TapTap-David on 2021/1/19.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ActionModel : NSObject
|
||||
@property (nonatomic, copy) NSString *click;
|
||||
@property (nonatomic, copy) NSString *like;
|
||||
@property (nonatomic, copy) NSString *comment;
|
||||
@property (nonatomic, copy) NSString *collect;
|
||||
@property (nonatomic, copy) NSString *impression;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7192b5b81be2642b382635a17f4f6677
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,20 @@
|
|||
//
|
||||
// NetworkStateModel.h
|
||||
// TDSCommon
|
||||
//
|
||||
// Created by TapTap-David on 2021/3/23.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NetworkStateModel : NSObject
|
||||
@property (nonatomic, copy) NSString *session_id; //每次启动唯一ID
|
||||
@property (nonatomic, copy) NSString *host; //服务器
|
||||
@property (nonatomic, assign) NSInteger code; //返回码200成功
|
||||
@property (nonatomic, assign) CGFloat delay; //网络延迟时间(毫秒)
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 419f856e6062640ee9c8afdd7c3ab573
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,16 @@
|
|||
//
|
||||
// PageModel.h
|
||||
// TDSCommon
|
||||
//
|
||||
// Created by TapTap-David on 2021/1/19.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface PageModel : NSObject
|
||||
@property (nonatomic, copy) NSString *page;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 98cbc4a27676d4ba9b04b02a0233fb9b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -13,6 +13,7 @@ extern NSString *const TDS_HTTPMETHODKEY;
|
|||
extern NSString *const TDS_HTTPBODYKEY;
|
||||
extern NSString *const TDS_DATAFORMAT;
|
||||
extern NSString *const TDS_CACHE_POLICY_KEY;
|
||||
extern NSString *const TDS_PROTOBUF_KEY;
|
||||
|
||||
/**
|
||||
header
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import <TapCommonSDK/TDSAccount.h>
|
||||
|
||||
#define TDS_COMMON_VERSION @"1.1.11"
|
||||
#define TDS_COMMON_VERSION_NUMBER @"11"
|
||||
#define TapCommonSDK @"TapCommon"
|
||||
#define TapCommonSDK_VERSION_NUMBER @"20100001"
|
||||
#define TapCommonSDK_VERSION @"2.1.0"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef NSString *TDSLanguage NS_STRING_ENUM;
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
//
|
||||
// TDSDomainChecker.h
|
||||
// TapCommonSDK
|
||||
//
|
||||
// Created by Bottle K on 2021/4/19.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TDSDomainChecker : NSObject
|
||||
|
||||
/// 配置日志参数
|
||||
/// @param clientId clientId
|
||||
/// @param clientSecret clientSecret
|
||||
/// @param sdkVersionName SDK Version Name
|
||||
+ (void)setupTrackerWithId:(NSString *)clientId secret:(NSString *)clientSecret sdkVersionName:(NSString *)sdkVersionName;
|
||||
|
||||
/// 配置域名
|
||||
+ (void)setupDomains;
|
||||
|
||||
/// 获取一个当前可用域名
|
||||
+ (NSString *)getActiveDomain;
|
||||
|
||||
/// 标记一个域名不可用
|
||||
/// @param domain 域名
|
||||
+ (void)deactiveDomain:(NSString *)domain;
|
||||
|
||||
/// 开始检测域名
|
||||
+ (void)startCheckDomains;
|
||||
|
||||
+ (void)stopCheckDomains;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b59eb939c977345128671f162d07f3d4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,60 @@
|
|||
//
|
||||
// TDSDomainManager.h
|
||||
// TapCommonSDK
|
||||
//
|
||||
// Created by Bottle K on 2021/4/19.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol TDSDomainManagerDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
- (void)checkDomainsDone:(NSDictionary *)resultInfo;
|
||||
|
||||
@end
|
||||
|
||||
FOUNDATION_EXTERN NSString *const DOMAIN_CHECK_HOST_KEY;
|
||||
FOUNDATION_EXTERN NSString *const DOMAIN_CHECK_CODE_KEY;
|
||||
FOUNDATION_EXTERN NSString *const DOMAIN_CHECK_DELAY_KEY;
|
||||
FOUNDATION_EXTERN NSString *const DOMAIN_CHECK_REACHABLE_KEY;
|
||||
|
||||
@interface TDSDomainManager : NSObject
|
||||
|
||||
+ (void)setupDelegate:(id<TDSDomainManagerDelegate>)delegate;
|
||||
|
||||
/// 预置域名
|
||||
/// @param mainDomains 主域名
|
||||
/// @param backupDomains 备用域名
|
||||
+ (void)setupDomains:(NSArray *)mainDomains backupDomains:(NSArray *)backupDomains;
|
||||
|
||||
/// 指定域名检查接口
|
||||
/// @param checkAPI 检查接口
|
||||
+ (void)setupCheckAPI:(NSString *)checkAPI;
|
||||
|
||||
/// 获取一个当前可用域名
|
||||
+ (NSString *)getActiveDomain;
|
||||
|
||||
/// 标记一个域名为可用
|
||||
/// @param domain 域名
|
||||
+ (void)activeDomain:(NSString *)domain;
|
||||
|
||||
/// 标记一个域名不可用
|
||||
/// @param domain 域名
|
||||
+ (void)deactiveDomain:(NSString *)domain;
|
||||
|
||||
/// 开始检测域名,并定期检测
|
||||
+ (void)startCheckDomains;
|
||||
|
||||
/// 开始检测域名
|
||||
/// @param api 若传入api则会请求该api数据,若传入空则直接检查域名连通
|
||||
/// @param repeat 是否定时检测
|
||||
+ (void)startCheckDomains:(nullable NSString *)api repeat:(BOOL)repeat;
|
||||
|
||||
/// 停止检测域名
|
||||
+ (void)stopCheckDomains;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c5902277411414cf09f51c99da79e48f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -26,6 +26,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
+ (NSString *)randomString:(int)length;
|
||||
|
||||
+ (NSString *)base64HMacSha1WithSecret:(NSString *)secret
|
||||
signString:(NSString *)signString;
|
||||
|
||||
+ (NSString *)getMacToken:(NSString *)url
|
||||
method:(NSString *)method
|
||||
oauthID:(NSString *)oauthID
|
||||
|
|
|
@ -23,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
@property (nonatomic, strong) id args;
|
||||
|
||||
@property (nonatomic, strong) NSData *data; //protobuf Data数据
|
||||
|
||||
@property (nonatomic, assign) BOOL auth;
|
||||
|
||||
@property (nonatomic) Class resCls;
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// TDSTrackerConfig.h
|
||||
// TDSCommon
|
||||
//
|
||||
// Created by TapTap-David on 2021/1/15.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef enum : NSUInteger {
|
||||
TDSTrackerForTapsdk = 1,
|
||||
TDSTrackerForFriends,
|
||||
TDSTrackerForNetwork
|
||||
} TDSTrackerType;
|
||||
|
||||
@interface TDSTrackerConfig : NSObject
|
||||
@property (nonatomic, copy) NSString *accessKeyId;
|
||||
@property (nonatomic, copy) NSString *accessKeySecret;
|
||||
@property (nonatomic, copy) NSString *project;
|
||||
@property (nonatomic, copy) NSString *endPoint;
|
||||
@property (nonatomic, copy) NSString *logStore;
|
||||
@property (nonatomic, copy) NSString *sdkVersionName;
|
||||
@property (nonatomic, assign) TDSTrackerType trackerType;
|
||||
@property (nonatomic, assign) NSInteger groupSize;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bc019e2c537d34cf3a9cf72d8080159f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,31 @@
|
|||
//
|
||||
// TDSTrackerManager.h
|
||||
// TDSCommon
|
||||
//
|
||||
// Created by TapTap-David on 2021/1/19.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <TapCommonSDK/TDSTrackerConfig.h>
|
||||
#import <TapCommonSDK/UserModel.h>
|
||||
#import <TapCommonSDK/PageModel.h>
|
||||
#import <TapCommonSDK/ActionModel.h>
|
||||
#import <TapCommonSDK/NetworkStateModel.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TDSTrackerManager : NSObject
|
||||
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
+ (void)registerTracker:(TDSTrackerConfig *)trackerConfig;
|
||||
|
||||
- (void)trackerWithType:(TDSTrackerType)trackerType
|
||||
userModel:(nullable UserModel *)userModel
|
||||
pageModel:(nullable PageModel *)pageModel
|
||||
actionModel:(nullable ActionModel *)actionModel
|
||||
networkModel:(nullable NetworkStateModel *)networkModel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bfb51d49fb4964c4f8168f187a774268
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
0
Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKWebViewJavascriptBridge.h
Executable file → Normal file
0
Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKWebViewJavascriptBridge.h
Executable file → Normal file
0
Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebViewJavascriptBridgeBase.h
Executable file → Normal file
0
Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebViewJavascriptBridgeBase.h
Executable file → Normal file
|
@ -15,13 +15,16 @@ FOUNDATION_EXPORT const unsigned char TapCommonSDKVersionString[];
|
|||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <TapCommonSDK/PublicHeader.h>
|
||||
|
||||
#define TapCommonSDK_VERSION @"2.1.0"
|
||||
|
||||
#import <TapCommonSDK/TapConfig.h>
|
||||
#import <TapCommonSDK/TDSAccountProvider.h>
|
||||
|
||||
#import <TapCommonSDK/TapDBConfig.h>
|
||||
|
||||
#import <TapCommonSDK/TDSAccount.h>
|
||||
#import <TapCommonSDK/TDSAccountProvider.h>
|
||||
|
||||
#import <TapCommonSDK/TDSDomainManager.h>
|
||||
#import <TapCommonSDK/TDSDomainChecker.h>
|
||||
|
||||
|
||||
#import <TapCommonSDK/TDSAutoLayout.h>
|
||||
#import <TapCommonSDK/TDSGameUtil.h>
|
||||
#import <TapCommonSDK/EngineBridgeError.h>
|
||||
|
@ -88,3 +91,5 @@ FOUNDATION_EXPORT const unsigned char TapCommonSDKVersionString[];
|
|||
#import <TapCommonSDK/TDSLocalizeManager.h>
|
||||
#import <TapCommonSDK/TDSWSSecurity.h>
|
||||
#import <TapCommonSDK/TDSWSWebSocket.h>
|
||||
#import <TapCommonSDK/TDSTrackerManager.h>
|
||||
#import <TapCommonSDK/TDSTrackerConfig.h>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <TapCommonSDK/TapDBConfig.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
@ -16,7 +17,9 @@ typedef NS_ENUM (NSInteger, TapSDKRegionType) {
|
|||
|
||||
@interface TapConfig : NSObject
|
||||
@property (nonatomic, copy) NSString *clientId;
|
||||
@property (nonatomic, copy) NSString *clientSecret;
|
||||
@property (nonatomic, assign) TapSDKRegionType region;
|
||||
@property (nonatomic, strong) TapDBConfig * dbConfig;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
//
|
||||
// TapDBConfig.h
|
||||
// TapCommonSDK
|
||||
//
|
||||
// Created by Bottle K on 2021/4/19.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TapDBConfig : NSObject
|
||||
@property (nonatomic, copy) NSString *channel;
|
||||
@property (nonatomic, copy) NSString *gameVersion;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7e066208203cb469b94c1497644a5be9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,16 @@
|
|||
//
|
||||
// UserModel.h
|
||||
// TDSCommon
|
||||
//
|
||||
// Created by TapTap-David on 2021/1/19.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface UserModel : NSObject
|
||||
@property (nonatomic, copy) NSString *VID;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4c7534e1a615e44389b94b454cb6bbf9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
Loading…
Reference in New Issue