finder 海外

This commit is contained in:
闫婷婷 2022-06-20 16:13:35 +08:00
parent 5dfc6c5692
commit 3ddb119348
168 changed files with 72 additions and 6602 deletions

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 682e47faf0ce541438fcbc953bedfab9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,375 +0,0 @@
//
// BDAutoTrack+Game.h
// Applog
//
// Created by bob on 2019/4/10.
//
#import "BDAutoTrack.h"
NS_ASSUME_NONNULL_BEGIN
FOUNDATION_EXTERN NSString * const kBDAGameLevel;
/*!
BDAutoTrack API
*/
@interface BDAutoTrack (Game)
/*! @abstract 初始化注册
@param method @"wechat"@"qq"
@param isSuccess
@discussion @{@"method":method,@"is_success":@(isSuccess)}
*/
- (void)registerEventByMethod:(NSString *)method
isSuccess:(BOOL)isSuccess;
/*! @abstract 初始化登录
@param method @"wechat"@"qq"
@param isSuccess
@discussion @{@"method":method,@"is_success":@(isSuccess)}
*/
- (void)loginEventByMethod:(NSString *)method
isSuccess:(BOOL)isSuccess;
/*! @abstract 绑定社交账号
@param type
@param isSuccess
@discussion @{@"account_type":type,@"is_success":@(isSuccess)}
*/
- (void)accessAccountEventByType:(NSString *)type
isSuccess:(BOOL)isSuccess;
/*! @abstract 进行任务
@param questID id
@param type
@param name //
@param number
@param desc
@param isSuccess
@discussion @{@"quest_id":questID,
@"quest_type":type,
@"quest_name":name,
@"quest_no":@(number),
@"description":desc,
@"is_success":@(isSuccess)}
*/
- (void)questEventWithQuestID:(NSString *)questID
questType:(NSString *)type
questName:(NSString *)name
questNumer:(NSUInteger)number
description:(NSString *)desc
isSuccess:(BOOL)isSuccess;
/*! @abstract 升级
@param level
@discussion @{@"level":@(level)}
*/
- (void)updateLevelEventWithLevel:(NSUInteger)level;
/*! @abstract 创建角色
@param roleID id
@discussion @{@"gamerole_id":roleID}
*/
- (void)createGameRoleEventByID:(NSString *)roleID;
/*! @abstract 查看内容/商品详情
@param type
@param name
@param contentID id
@discussion @{@"content_type":type,
@"content_name":name,
@"content_id":contentID}
*/
- (void)viewContentEventWithContentType:(NSString *)type
contentName:(NSString *)name
contentID:(NSString *)contentID;
/*! @abstract 加入购买/购物车
@param type
@param name
@param contentID id
@param number
@param isSuccess
@discussion @{@"content_type":type,
@"content_name":name,
@"content_id":contentID,
@"content_num":number,
@"is_success":@(isSuccess)}
*/
- (void)addCartEventWithContentType:(NSString *)type
contentName:(NSString *)name
contentID:(NSString *)contentID
contentNumber:(NSUInteger)number
isSuccess:(BOOL)isSuccess;
/*! @abstract 提交购买/下单
@param type
@param name
@param contentID id
@param number
@param isVirtualCurrency 使
@param virtualCurrency
@param currency
@param amount
@param isSuccess
@discussion @{@"content_type":type,
@"content_name":name,
@"content_id":contentID,
@"content_num":number,
@"is_virtual_currency":@(isVirtualCurrency),
@"virtual_currency":virtualCurrency,
@"currency":currency,
@"is_success":@(isSuccess),
@"currency_amount":@(amount)}
*/
- (void)checkoutEventWithContentType:(NSString *)type
contentName:(NSString *)name
contentID:(NSString *)contentID
contentNumber:(NSUInteger)number
isVirtualCurrency:(BOOL)isVirtualCurrency
virtualCurrency:(NSString *)virtualCurrency
currency:(NSString *)currency
currency_amount:(unsigned long long)amount
isSuccess:(BOOL)isSuccess;
/*! @abstract 支付
@param type
@param name
@param contentID id
@param number
@param channel
@param currency
@param amount 0
@param isSuccess
@discussion @{@"content_type":type,
@"content_name":name,
@"content_id":contentID,
@"content_num":@(number),
@"payment_channel":channel,
@"currency":currency,
@"is_success":@(isSuccess),
@"currency_amount":@(amount)}
*/
- (void)purchaseEventWithContentType:(NSString *)type
contentName:(NSString *)name
contentID:(NSString *)contentID
contentNumber:(NSUInteger)number
paymentChannel:(NSString *)channel
currency:(NSString *)currency
currency_amount:(unsigned long long)amount
isSuccess:(BOOL)isSuccess;
/*! @abstract 添加支付渠道
@param channel
@param isSuccess
@discussion @{@"payment_channel":channel,
@"is_success":@(isSuccess)}
*/
- (void)accessPaymentChannelEventByChannel:(NSString *)channel
isSuccess:(BOOL)isSuccess;
/*! @abstract 添加至收藏
@param type
@param name
@param contentID id
@param number
@param isSuccess
@discussion @{@"content_type":type,
@"content_name":name,
@"content_id":contentID,
@"content_num":@(number),
@"is_success":@(isSuccess)}
*/
- (void)addToFavouriteEventWithContentType:(NSString *)type
contentName:(NSString *)name
contentID:(NSString *)contentID
contentNumber:(NSUInteger)number
isSuccess:(BOOL)isSuccess;
@end
/*!
[BDAutoTrack startTrackWithConfig:config];
BDAutoTrack的游戏埋点接口
*/
@interface BDAutoTrack (SharedGame)
/*! @abstract 初始化注册
@param method @"wechat"@"qq"
@param isSuccess
@discussion @{@"method":method,@"is_success":@(isSuccess)}
*/
+ (void)registerEventByMethod:(NSString *)method
isSuccess:(BOOL)isSuccess;
/*! @abstract 初始化登录
@param method @"wechat"@"qq"
@param isSuccess
@discussion @{@"method":method,@"is_success":@(isSuccess)}
*/
+ (void)loginEventByMethod:(NSString *)method
isSuccess:(BOOL)isSuccess;
/*! @abstract 绑定社交账号
@param type
@param isSuccess
@discussion @{@"account_type":type,@"is_success":@(isSuccess)}
*/
+ (void)accessAccountEventByType:(NSString *)type
isSuccess:(BOOL)isSuccess;
/*! @abstract 进行任务
@param questID id
@param type
@param name //
@param number
@param desc
@param isSuccess
@discussion @{@"quest_id":questID,
@"quest_type":type,
@"quest_name":name,
@"quest_no":@(number),
@"description":desc,
@"is_success":@(isSuccess)}
*/
+ (void)questEventWithQuestID:(NSString *)questID
questType:(NSString *)type
questName:(NSString *)name
questNumer:(NSUInteger)number
description:(NSString *)desc
isSuccess:(BOOL)isSuccess;
/*! @abstract 升级
@param level
@discussion @{@"level":@(level)}
*/
+ (void)updateLevelEventWithLevel:(NSUInteger)level;
/*! @abstract 创建角色
@param roleID id
@discussion @{@"gamerole_id":roleID}
*/
+ (void)createGameRoleEventByID:(NSString *)roleID;
/*! @abstract 查看内容/商品详情
@param type
@param name
@param contentID id
@discussion @{@"content_type":type,
@"content_name":name,
@"content_id":contentID}
*/
+ (void)viewContentEventWithContentType:(NSString *)type
contentName:(NSString *)name
contentID:(NSString *)contentID;
/*! @abstract 加入购买/购物车
@param type
@param name
@param contentID id
@param number
@param isSuccess
@discussion @{@"content_type":type,
@"content_name":name,
@"content_id":contentID,
@"content_num":number,
@"is_success":@(isSuccess)}
*/
+ (void)addCartEventWithContentType:(NSString *)type
contentName:(NSString *)name
contentID:(NSString *)contentID
contentNumber:(NSUInteger)number
isSuccess:(BOOL)isSuccess;
/*! @abstract 提交购买/下单
@param type
@param name
@param contentID id
@param number
@param isVirtualCurrency 使
@param virtualCurrency
@param currency
@param amount
@param isSuccess
@discussion @{@"content_type":type,
@"content_name":name,
@"content_id":contentID,
@"content_num":number,
@"is_virtual_currency":@(isVirtualCurrency),
@"virtual_currency":virtualCurrency,
@"currency":currency,
@"is_success":@(isSuccess),
@"currency_amount":@(amount)}
*/
+ (void)checkoutEventWithContentType:(NSString *)type
contentName:(NSString *)name
contentID:(NSString *)contentID
contentNumber:(NSUInteger)number
isVirtualCurrency:(BOOL)isVirtualCurrency
virtualCurrency:(NSString *)virtualCurrency
currency:(NSString *)currency
currency_amount:(unsigned long long)amount
isSuccess:(BOOL)isSuccess;
/*! @abstract 支付
@param type
@param name
@param contentID id
@param number
@param channel
@param currency
@param amount 0
@param isSuccess
@discussion @{@"content_type":type,
@"content_name":name,
@"content_id":contentID,
@"content_num":@(number),
@"payment_channel":channel,
@"currency":currency,
@"is_success":@(isSuccess),
@"currency_amount":@(amount)}
*/
+ (void)purchaseEventWithContentType:(NSString *)type
contentName:(NSString *)name
contentID:(NSString *)contentID
contentNumber:(NSUInteger)number
paymentChannel:(NSString *)channel
currency:(NSString *)currency
currency_amount:(unsigned long long)amount
isSuccess:(BOOL)isSuccess;
/*! @abstract 添加支付渠道
@param channel
@param isSuccess
@discussion @{@"payment_channel":channel,
@"is_success":@(isSuccess)}
*/
+ (void)accessPaymentChannelEventByChannel:(NSString *)channel
isSuccess:(BOOL)isSuccess;
/*! @abstract 添加至收藏
@param type
@param name
@param contentID id
@param number
@param isSuccess
@discussion @{@"content_type":type,
@"content_name":name,
@"content_id":contentID,
@"content_num":@(number),
@"is_success":@(isSuccess)}
*/
+ (void)addToFavouriteEventWithContentType:(NSString *)type
contentName:(NSString *)name
contentID:(NSString *)contentID
contentNumber:(NSUInteger)number
isSuccess:(BOOL)isSuccess;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,320 +0,0 @@
//
// BDAutoTrack- GameTrack.h
// Applog
//
// Created by bob on 2019/7/17.
//
#import "BDAutoTrack.h"
NS_ASSUME_NONNULL_BEGIN
FOUNDATION_EXTERN NSString * const kGTGameParameterLevel;
/*!
BDAutoTrack API
gt
*/
@interface BDAutoTrack (GameTrack)
#pragma mark - AD
/**
广gt_ad_button_click
ad_type string 广banner等使
ad_position_type string 广
ad_position string 广buffCD等使
app内各广告位button时
*/
- (void)adButtonClickEventWithADType:(NSString *)adType
positionType:(NSString *)positionType
position:(NSString *)position
otherParams:(nullable NSDictionary *)otherParams;
/**
广gt_ad_show
ad_type string 广banner等使
ad_position_type string 广
ad_position string 广buffCD等使
广穿广
*/
- (void)adShowEventWithADType:(NSString *)adType
positionType:(NSString *)positionType
position:(NSString *)position
otherParams:(nullable NSDictionary *)otherParams;
/**
广gt_ad_show_end
ad_type string 广banner等使
ad_position_type string 广
ad_position string 广buffCD等使
result string 广使. skip, successfail
广
*/
- (void)adShowEndEventWithADType:(NSString *)adType
positionType:(NSString *)positionType
position:(NSString *)position
result:(NSString *)result
otherParams:(nullable NSDictionary *)otherParams;
#pragma mark - Level
/**
gt_levelup
lev int
get_exp int
method string 使
aflev int lev=aflevlev<aflev
*/
- (void)levelUpEventWithLevel:(NSInteger)level
exp:(NSInteger)exp
method:(NSString *)method
afterLevel:(NSInteger)afterLevel
otherParams:(nullable NSDictionary *)otherParams;
#pragma mark - play
/**
gt_start_play
ectype_name string
*/
- (void)startPlayEventWithName:(NSString *)ecTypeName
otherParams:(nullable NSDictionary *)otherParams;
/**
gt_end_play
ectype_name string
result string 使. uncompleted, successfail
duration int
退
*/
- (void)endPlayEventWithName:(NSString *)ecTypeName
result:(NSString *)result
duration:(NSInteger)duration
otherParams:(nullable NSDictionary *)otherParams;
#pragma mark - coins
/**
gt_get_coins
coin_type string 使
method string 使
coin_num int
*/
- (void)getCoinsEventWitType:(NSString *)coinType
method:(NSString *)method
coinNumber:(NSInteger)number
otherParams:(nullable NSDictionary *)otherParams;
/**
gt_cost_coins
coin_type string 使
method string 使
coin_num int
*/
- (void)costCoinsEventWitType:(NSString *)coinType
method:(NSString *)method
coinNumber:(NSInteger)number
otherParams:(nullable NSDictionary *)otherParams;
#pragma mark - Purchase
/**
purchase
content_type string
content_name string
content_id string id
content_num int
payment_channel string
currency string
is_success string
currency_amount int
*/
- (void)purchaseEventWithContentType:(NSString *)contentType
contentName:(NSString *)contentName
contentID:(NSString *)contentID
contentNum:(NSInteger)contentNum
channel:(NSString *)channel
currency:(NSString *)currency
isSuccess:(NSString *)isSuccess
currencyAmount:(NSInteger)currencyAmount
otherParams:(nullable NSDictionary *)otherParams;
#pragma mark - InitInfo
/**
gt_init_info
lev int
coin_type string
coin_left int
role_id string id-cp侧
*/
- (void)gameInitInfoEventWithLevel:(NSInteger)level
coinType:(NSString *)coinType
coinLeft:(NSInteger)coinLeft
otherParams:(nullable NSDictionary *)otherParams;
@end
/*!
BDAutoTrack API
gt
*/
/*!
[BDAutoTrack startTrackWithConfig:config];
BDAutoTrack的游戏埋点接口
*/
@interface BDAutoTrack (SharedGameTrack)
#pragma mark - AD
/**
广gt_ad_button_click
ad_type string 广banner等使
ad_position_type string 广
ad_position string 广buffCD等使
app内各广告位button时
*/
+ (void)adButtonClickEventWithADType:(NSString *)adType
positionType:(NSString *)positionType
position:(NSString *)position
otherParams:(nullable NSDictionary *)otherParams;
/**
广gt_ad_show
ad_type string 广banner等使
ad_position_type string 广
ad_position string 广buffCD等使
广穿广
*/
+ (void)adShowEventWithADType:(NSString *)adType
positionType:(NSString *)positionType
position:(NSString *)position
otherParams:(nullable NSDictionary *)otherParams;
/**
广gt_ad_show_end
ad_type string 广banner等使
ad_position_type string 广
ad_position string 广buffCD等使
result string 广使. skip, successfail
广
*/
+ (void)adShowEndEventWithADType:(NSString *)adType
positionType:(NSString *)positionType
position:(NSString *)position
result:(NSString *)result
otherParams:(nullable NSDictionary *)otherParams;
#pragma mark - Level
/**
gt_levelup
lev int
get_exp int
method string 使
aflev int lev=aflevlev<aflev
*/
+ (void)levelUpEventWithLevel:(NSInteger)level
exp:(NSInteger)exp
method:(NSString *)method
afterLevel:(NSInteger)afterLevel
otherParams:(nullable NSDictionary *)otherParams;
#pragma mark - play
/**
gt_start_play
ectype_name string
*/
+ (void)startPlayEventWithName:(NSString *)ecTypeName
otherParams:(nullable NSDictionary *)otherParams;
/**
gt_end_play
ectype_name string
result string 使. uncompleted, successfail
duration int
退
*/
+ (void)endPlayEventWithName:(NSString *)ecTypeName
result:(NSString *)result
duration:(NSInteger)duration
otherParams:(nullable NSDictionary *)otherParams;
#pragma mark - coins
/**
gt_get_coins
coin_type string 使
method string 使
coin_num int
*/
+ (void)getCoinsEventWitType:(NSString *)coinType
method:(NSString *)method
coinNumber:(NSInteger)number
otherParams:(nullable NSDictionary *)otherParams;
/**
gt_cost_coins
coin_type string 使
method string 使
coin_num int
*/
+ (void)costCoinsEventWitType:(NSString *)coinType
method:(NSString *)method
coinNumber:(NSInteger)number
otherParams:(nullable NSDictionary *)otherParams;
#pragma mark - Purchase
/**
purchase
content_type string
content_name string
content_id string id
content_num int
payment_channel string
currency string
is_success string
currency_amount int
*/
+ (void)purchaseEventWithContentType:(NSString *)contentType
contentName:(NSString *)contentName
contentID:(NSString *)contentID
contentNum:(NSInteger)contentNum
channel:(NSString *)channel
currency:(NSString *)currency
isSuccess:(NSString *)isSuccess
currencyAmount:(NSInteger)currencyAmount
otherParams:(nullable NSDictionary *)otherParams;
#pragma mark - InitInfo
/**
gt_init_info
lev int
coin_type string
coin_left int
role_id string id-cp侧
*/
+ (void)gameInitInfoEventWithLevel:(NSInteger)level
coinType:(NSString *)coinType
coinLeft:(NSInteger)coinLeft
otherParams:(nullable NSDictionary *)otherParams;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,22 +0,0 @@
//
// BDAutoTrack+LaunchFrom.h
// RangersAppLog
//
// Created by bob on 2020/6/3.
//
#import "BDAutoTrack.h"
#import "BDCommonDefine.h"
NS_ASSUME_NONNULL_BEGIN
@interface BDAutoTrack (LaunchFrom)
/*
@abstract APP的启动方式<RangersAppLog/BDCommonDefine.h>
*/
+ (void)setLaunchFrom:(BDAutoTrackLaunchFrom)from;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,98 +0,0 @@
//
// BDAutoTrack+OhayooGameTrack.h
// RangersAppLog
//
// Created by 陈奕 on 2019/11/26.
//
#import "BDAutoTrack.h"
typedef NSString * OhayooCustomHeaderKey NS_TYPED_ENUM;
NS_ASSUME_NONNULL_BEGIN
/* ohayoo custom header key. 均以"ohayoo_"开头 */
FOUNDATION_EXTERN OhayooCustomHeaderKey OhayooCustomHeaderKeyPackageChannel;
FOUNDATION_EXTERN OhayooCustomHeaderKey OhayooCustomHeaderKeyZoneID;
FOUNDATION_EXTERN OhayooCustomHeaderKey OhayooCustomHeaderKeyServerID;
FOUNDATION_EXTERN OhayooCustomHeaderKey OhayooCustomHeaderKeySDKOpenID;
FOUNDATION_EXTERN OhayooCustomHeaderKey OhayooCustomHeaderKeyUserType;
FOUNDATION_EXTERN OhayooCustomHeaderKey OhayooCustomHeaderKeyRoleID;
FOUNDATION_EXTERN OhayooCustomHeaderKey OhayooCustomHeaderKeyLevel;
#pragma mark - OhayooGameTrack
@interface BDAutoTrack (OhayooGameTrack)
/**
gt_init_info
lev int
scene_id int id
scene_lev int
coin_type string
coin_left int
roleId string id
@discussion GameTrack的多了 sceneID sceneLev
*/
- (void)gameInitInfoEventWithLevel:(NSInteger)level
sceneID:(NSInteger)sceneID
sceneLev:(NSInteger)sceneLev
coinType:(NSString *)coinType
coinLeft:(NSInteger)coinLeft
roleId:(NSString *)roleId
otherParams:(nullable NSDictionary *)otherParams;
/**
@abstract ohayoo字段设置到custom header中的辅助方法`setCustomHeaderValue:forKey:`
@discussion 使:
@code
[BDAutoTrack ohayooHeaderSetObject:@"channel_123" forKey:OhayooCustomHeaderKeyPackageChannel];
@code
*/
- (void)ohayooHeaderSetObject:(NSObject *)object forKey:(OhayooCustomHeaderKey)key;
- (void)ohayooHeaderRemoveObjectForKey:(OhayooCustomHeaderKey)key;
@end
#pragma mark - SharedOhayooGameTrack
@interface BDAutoTrack (SharedOhayooGameTrack)
/**
gt_init_info
lev int
scene_id int id
scene_lev int
coin_type string
coin_left int
roleId string id
@discussion GameTrack的多了 sceneID sceneLev
*/
+ (void)gameInitInfoEventWithLevel:(NSInteger)level
sceneID:(NSInteger)sceneID
sceneLev:(NSInteger)sceneLev
coinType:(NSString *)coinType
coinLeft:(NSInteger)coinLeft
roleId:(NSString *)roleId
otherParams:(nullable NSDictionary *)otherParams;
/**
@abstract ohayoo字段设置到custom header中的辅助方法`setCustomHeaderValue:forKey:`
@discussion 使:
@code
[BDAutoTrack ohayooHeaderSetObject:@"channel_123" forKey:OhayooCustomHeaderKeyPackageChannel];
@code
*/
+ (void)ohayooHeaderSetObject:(NSObject *)object forKey:(OhayooCustomHeaderKey)key;
+ (void)ohayooHeaderRemoveObjectForKey:(OhayooCustomHeaderKey)key;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,83 +0,0 @@
//
// BDAutoTrack+Profile.h
// Applog
//
// Created by 朱元清 on 2020/9/11.
//
#import "BDAutoTrack.h"
NS_ASSUME_NONNULL_BEGIN
@interface BDAutoTrack (Profile)
#pragma mark 实例方法
/// @abstract 设置一组profile属性
/// @discussion 参数字典的值只能是以下类型:字符串、整型、浮点型、字符串数组
/// @param profileDict 字典。包含一个或多个要设置的profile属性和值
- (void)profileSet:(NSDictionary *)profileDict;
/// @abstract 设置一组profile属性。若一个接口是通过重复调用该接口无效。
/// @discussion 与profileSet接口不同的是若某profile已成功通过setOnce接口设置那么对该profile再次调用setOnce接口无效。
/// 一个通过setOnce设置的profile被unset后无法再次通过setOnce设置。
/// 参数字典的值只能是以下类型:字符串、整型、浮点型、字符串数组
/// @param profileDict 字典。包含一个或多个要设置的profile属性和值
- (void)profileSetOnce:(NSDictionary *)profileDict;
/// @abstract unset一个之前被profileSet或profileSetOnce接口设置的profile
/// @param profileName 要unset的profile的名称
- (void)profileUnset:(NSString *)profileName;
/// @abstract 为数值类型的profile属性做自增操作
/// @discussion 只能自增整数可以为负整数。如果传入浮点数SDK将忽略。
/// @param profileDict 字典。包含一个或多个要设置的数值类型profile属性和要增加的值。
- (void)profileIncrement:(NSDictionary <NSString *, NSNumber *> *)profileDict;
/// @abstract 为数组类型的profile属性添加一个值
/// @discussion 参数字典的值只能为字符串或者字符串数组。e.g.
/// @code
/// NSDitcionary *profileDict = @{
/// @"needs": @"洗衣机",
/// @"favorites": @[@"海尔", @"海信", @"美的"]
/// }
/// [track profileAppend:profileDict];
/// @param profileDict 字典。包含一个或多个要设置的数组类型的profile属性和要添加的值
- (void)profileAppend:(NSDictionary *)profileDict;
#pragma mark 类方法
/// @abstract 设置一组profile属性
/// @discussion 参数字典的值只能是以下类型:字符串、整型、浮点型、字符串数组
/// @param profileDict 字典。包含一个或多个要设置的profile属性和值
+ (void)profileSet:(NSDictionary *)profileDict;
/// @abstract 设置一组profile属性。若一个接口是通过重复调用该接口无效。
/// @discussion 与profileSet接口不同的是若某profile已成功通过setOnce接口设置那么对该profile再次调用setOnce接口无效。
/// 一个通过setOnce设置的profile被unset后无法再次通过setOnce设置。
/// 参数字典的值只能是以下类型:字符串、整型、浮点型、字符串数组
/// @param profileDict 字典。包含一个或多个要设置的profile属性和值
+ (void)profileSetOnce:(NSDictionary *)profileDict;
/// @abstract unset一个之前被profileSet或profileSetOnce接口设置的profile
/// @param profileName 要unset的profile的名称
+ (void)profileUnset:(NSString *)profileName;
/// @abstract 为数值类型的profile属性做自增操作
/// @discussion 只能自增整数可以为负整数。如果传入浮点数SDK将忽略。
/// @param profileDict 字典。包含一个或多个要设置的数值类型profile属性和要增加的值。
+ (void)profileIncrement:(NSDictionary <NSString *, NSNumber *> *)profileDict;
/// @abstract 为数组类型的profile属性添加一个值
/// @discussion 参数字典的值只能为字符串或者字符串数组。e.g.
/// @code
/// NSDitcionary *profileDict = @{
/// @"needs": @"洗衣机",
/// @"favorites": @[@"海尔", @"海信", @"美的"]
/// }
/// [BDAutoTrack profileAppend:profileDict];
/// @param profileDict 字典。包含一个或多个要设置的数组类型的profile属性和要添加的值
+ (void)profileAppend:(NSDictionary *)profileDict;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 2ab224ea962a6464d9342d828f100bdc
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,308 +0,0 @@
//
// BDAutoTrack+SharedInstance.h
// Pods
//
// Created by 朱元清 on 2020/9/11.
//
#import <Foundation/Foundation.h>
#import "BDCommonDefine.h"
NS_ASSUME_NONNULL_BEGIN
/// 以下是单例方法
#pragma mark - SharedInstance
/*! @abstract
BDAutoTrack BDAutoTrack单例便SDK方法
`[BDAutoTrack startTrackWithConfig:config];`BDAutoTrack的其他
使
BDAutoTrackConfig *config = [BDAutoTrackConfig configWithAppID:@"xxx" LaunchOptions:launchOptions];
config.xxx = xxx;
...
// 初始化
[BDAutoTrack startTrackWithConfig:config]
// 初始化完成之后再调用其他接口进一步设置user unique ID等属性
[BDAutoTrack setCurrentUserUniqueID:@"123"];
*/
/*! @discussion 设置注册成功和ABTest拉取成功回调推荐使用通知方法。可以参考 <RangersAppLog/BDAutoTrackNotifications.h>注释。
*/
@interface BDAutoTrack (SharedInstance)
/*! @abstract
SDK版本号. Depreceted, please use SDKVersion.
*/
@property (class, nonatomic, copy, readonly) NSString *sdkVersion APPLOG_API_DEPRECATED_WITH_REPLACEMENT("SDKVersion");
/*! @abstract
AppID rangers Device ID. SDK接口获取即可
@discussion rangersDeviceID是字符串
*/
@property (class, nonatomic, copy, readonly, nullable) NSString *rangersDeviceID;
/*! @abstract
ID
*/
@property (class, nonatomic, copy, readonly, nullable) NSString *installID;
/*! @abstract
IDssid是一致的
*/
@property (class, nonatomic, copy, readonly, nullable) NSString *ssID;
/*! @abstract
[BDAutoTrack setCurrentUserUniqueID:]SDK内部的uuid
*/
@property (class, nonatomic, copy, readonly, nullable) NSString *userUniqueID;
/*! @abstract 初始化的AppID
*/
@property (class, nonatomic, copy, readonly) NSString *appID;
#pragma mark - 初始化与启动单例
/*!
* @abstract SDK单例
* @param config AppID AppName Channel是必须的
* @discussion
* :
* 1 application:didFinishLaunchingWithOptions:
* 2线
* 3 SDK
* 便:
* @code
* [BDAutoTrack sharedTrackWithConfig:config];
* [BDAutoTrack startTrack];
*/
+ (void)startTrackWithConfig:(BDAutoTrackConfig *)config;
/*!
* @abstract
* @param config AppID AppName Channel是必须的
* @discussion
* :
* 1 application:didFinishLaunchingWithOptions:
* 2线
* 3 SDK
* `+ [BDAutoTrack startTrack]`使
* @code
* [BDAutoTrack sharedTrackWithConfig:config];
* [BDAutoTrack startTrack];
*/
+ (void)sharedTrackWithConfig:(BDAutoTrackConfig *)config;
/*!
* @abstract SDK单例
* @discussion
* :
* 1 application:didFinishLaunchingWithOptions:
* 2线
* 3 SDK
*/
+ (void)startTrack;
/**
* @abstract
* nil
*
* @discussion
* `+ [BDAutoTrack sharedTrackWithConfig:]`
*
* @return
*/
+ (instancetype)sharedTrack;
#pragma mark -
/*! @abstract userAgent 在初始化之后设置
@discussion SDK的时候设置一次
@param userAgent HTTP/HTTPS userAgent
*/
+ (void)setUserAgent:(nullable NSString *)userAgent;
/*! @abstract UserUniqueID发生变化时设置 在初始化之后设置
@discussion SDK会保存
@param uniqueID id nil或空字符串则登出`clearUserUniqueID`
@return
*/
+ (BOOL)setCurrentUserUniqueID:(nullable NSString *)uniqueID;
/*! @abstract 登出 logout
@discussion logout
*/
+ (void)clearUserUniqueID;
/// 请参考对应实例方法的文档
+ (BOOL)sendRegisterRequestWithRegisteringUserUniqueID:(nullable NSString *)registeringUserUniqueID;
+ (BOOL)sendRegisterRequest APPLOG_API_AVALIABLE(5.6.3);
/*! @abstract 设置上报Host地区在初始化之后设置初始化之前请在config中设置
@discussion
@param serviceVendor
*/
+ (void)setServiceVendor:(BDAutoTrackServiceVendor)serviceVendor;
/*! @abstract 设置自定义的URL回调 在初始化之后设置
@param requestURLBlock block
@discussion requestURLBlock nil会清空回调
@discussion block在初始化之后
*/
+ (void)setRequestURLBlock:(nullable BDAutoTrackRequestURLBlock)requestURLBlock;
/*! @abstract 设置自定义的URL回调
@param requestHostBlock block
@discussion requestHostBlock nil会清空回调
@discussion requestURLBlock会优先于requestHostBlock
*/
+ (void)setRequestHostBlock:(nullable BDAutoTrackRequestHostBlock)requestHostBlock;
/*! @abstract 地区 在初始化之后设置
@discussion
@discussion `[[NSLocale currentLocale] objectForKey:NSLocaleCountryCode]`
@discussion `+[BDAutoTrack setAppRegion:]`
*/
+ (void)setAppRegion:(nullable NSString *)appRegion;
/*! @abstract 语言 在初始化之后设置
@discussion
@discussion `[[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]`
@discussion `+[BDAutoTrack setAppLauguage:]`
*/
+ (void)setAppLauguage:(nullable NSString *)appLauguage;
/*! @abstract 用户触点 在初始化之后设置
@discussion
@discussion
@discussion `+[BDAutoTrack setAppTouchPoint:]`
*/
+ (void)setAppTouchPoint:(NSString *)appTouchPoint;
/************** 设置CustomHeader(持久化,会影响下次启动) ***************/
/**
@abstract . SDK
@param value valueNSString或者数字nil
@param key key
@code
/// 新增或者修改,仅发生变化的时候使用
[track setCustomHeaderValue:@"male" forKey:@"gender"];
[track setCustomHeaderValue:@(29) forKey:@"age"];
/// 删除
[track removeCustomHeaderValueForKey:@"gender"];
[track removeCustomHeaderValueForKey:@"age"];
*/
+ (void)setCustomHeaderValue:(nullable id)value forKey:(NSString *)key;
/// 将字典中的KV添加进自定义上报信息。已有的键将会被覆盖。
/// @param dictionary 值一般为字符串或数字
+ (void)setCustomHeaderWithDictionary:(NSDictionary<NSString *, id> *)dictionary;
/// 删除CustomHeader中的一条KV。
+ (void)removeCustomHeaderValueForKey:(NSString *)key;
/************** 设置CustomHeader(非持久化,只作用于本次启动) ***************/
/*! @abstract 添加自定义上报信息
@param customHeaderBlock
@discussion customHeaderBlock App启动设置一次即可App重启需要重新设置SDK不会保存上次设置的值nil会清空回调
@discussion block在初始化之后设置一次即可block返回参数保存
[BDAutoTrack setCustomHeaderBlock:^NSDictionary<NSString *,id> * _Nonnull{
return @{@"gender":[UserInfo GetGender],
@"age":@([UserInfo GetAge]),
};
}];
*/
+ (void)setCustomHeaderBlock:(nullable BDAutoTrackCustomHeaderBlock)customHeaderBlock;
/*! @abstract 日志上报,在初始化之后设置才能调用
@param event nil或空字符串
@param params nilparam如果非空json
@discussion params 使 [NSJSONSerialization isValidJSONObject:] params是否可序列化
@result
*/
+ (BOOL)eventV3:(NSString *)event params:(nullable NSDictionary *)params;
#pragma mark - ALink
+ (void)setALinkRoutingDelegate:(id<BDAutoTrackAlinkRouting>)ALinkRoutingDelegate;
+ (BOOL)continueALinkActivityWithURL:(NSURL *)ALinkURL;
#pragma mark - ABTest
/*! @abstract 获取ABTest的配置值在初始化之后设置才能调用
@param key ABTest的key
@param defaultValue ABTest则返回默认值
@discussion ABTest或者ABTest配置了默认值ABTestFinishBlock来判断是否开启了ABTest
@discussion
@discussion 使ABTest配置是否拉取成功 <RangersAppLog/BDAutoTrackNotifications.h>
@result ABTest的配置值
*/
+ (nullable id)ABTestConfigValueForKey:(NSString *)key defaultValue:(nullable id)defaultValue;
/*! @abstract 本地缓存已加载时同`ABTestConfigValueForKey:defaultValue:`。本地缓存未加载时将阻塞等待其加载完成。
@discussion 30-100ms内加载完成
便AB实验数据
*/
+ (nullable id)ABTestConfigValueSyncForKey:(NSString *)key defaultValue:(nullable id)defaultValue;
/*! @abstract 获取ABTest 额外的vids
@param versions vids @"1,2,3"
@discussion nil
*/
+ (void)setExternalABVersion:(nullable NSString *)versions;
/*! @abstract 获取ABTest相关配置在初始化之后设置才能调用
@result ABTest的vid值
@discussion event中SDK会自动给每个event添加
*/
+ (nullable NSString *)abVids;
/*! @abstract 获取ABTest相关配置在初始化之后设置才能调用
@result ABTest的所有的vids值
@discussion
*/
+ (nullable NSString *)allAbVids;
/*! @abstract 获取ABTest相关配置在初始化之后设置才能调用
@result ABTest的所有的Configs值
@discussion
@discussion 使使-[BDAutoTrack ABTestConfigValueForKey:defaultValue:]
*/
+ (nullable NSDictionary *)allABTestConfigs;
+ (nullable NSDictionary *)allABTestConfigs2;
/*! @abstract 本地缓存已加载时同`abVids`。本地缓存未加载时将阻塞等待其加载完成。
@discussion 30-100ms内加载完成
便AB实验数据
*/
+ (nullable NSString *)abVidsSync;
/*! @abstract 本地缓存已加载时同`allAbVids`。本地缓存未加载时将阻塞等待其加载完成。
@discussion 30-100ms内加载完成
便AB实验数据
*/
+ (nullable NSString *)allAbVidsSync;
/*! @abstract 本地缓存已加载时同`allABTestConfigs`。本地缓存未加载时将阻塞等待其加载完成。
@discussion 30-100ms内加载完成
便AB实验数据
*/
+ (nullable NSDictionary *)allABTestConfigsSync;
#pragma mark - main app only
/*! @abstract 主动触发上报。SDK有频率限制每10s最多可以触发一次
*/
+ (void)flush;
#pragma mark - private API
/*! @abstract 调用用户激活接口,在初始化之后设置才能调用
*/
+ (void)activeUser;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: b3e9765fce68f4b17a0893a51879dbc4
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,27 +0,0 @@
//
// BDAutoTrack+Special.h
// RangersAppLog
//
// Created by bob on 2019/6/2.
//
#import "BDAutoTrack.h"
NS_ASSUME_NONNULL_BEGIN
/*!
BDAutoTrack
*/
@interface BDAutoTrack (Special)
+ (NSDictionary *)specialParamsWitAppID:(NSString *)appID
appName:(NSString *)appName
type:(NSString *)productType __attribute__((deprecated("推荐使多实例上报")));
- (BOOL)eventV3:(NSString *)event params:(nullable NSDictionary *)params specialParams:(NSDictionary *)specialParams __attribute__((deprecated("推荐使多实例上报")));
- (BOOL)customEvent:(NSString *)category params:(NSDictionary *)params __attribute__((deprecated("推荐使多实例上报")));
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: bb213d85c3cd846d88983598f8c15299
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,329 +0,0 @@
//
// BDTracker.h
// Applog
//
// Created by bob on 2019/1/20.
//
#import <Foundation/Foundation.h>
#import "BDCommonDefine.h"
#import "BDAutoTrackConfig+AppLog.h"
#import "BDAutoTrackAlinkRouting.h"
@class BDAutoTrackConfig;
NS_ASSUME_NONNULL_BEGIN
/*!
BDAutoTrack日志上报功能的类
*/
@interface BDAutoTrack : NSObject
/*! @abstract
AppID rangers Device ID. SDK接口获取即可
@discussion rangersDeviceID是字符串
*/
@property (nonatomic, copy, readonly, nullable) NSString *rangersDeviceID;
/*! @abstract
ID
*/
@property (nonatomic, copy, readonly, nullable) NSString *installID;
/*! @abstract
IDssid是一致的
*/
@property (nonatomic, copy, readonly, nullable) NSString *ssID;
/*! @abstract
[BDAutoTrack setCurrentUserUniqueID:]SDK内部的uuid
*/
@property (nonatomic, copy, readonly, nullable) NSString *userUniqueID;
/*! @abstract SDK是否已启动默认为NO调用`startTrack`或其便捷方法后为YES。
*/
@property (nonatomic, readonly, assign) BOOL started;
/*! @abstract 初始化的AppID
*/
@property (nonatomic, copy, readonly) NSString *appID;
/*! @abstract 返回SDK版本号。e.g. 6.1.0
*/
+ (NSString *)SDKVersion;
+ (instancetype)new __attribute__((unavailable()));
- (instancetype)init __attribute__((unavailable()));
/*! @abstract 初始化方法初始化一个Track实例
@param config AppID AppName Channel是必须的
@discussion 便使
@result Track实例
*/
+ (nullable instancetype)trackWithConfig:(BDAutoTrackConfig *)config;
/*! @abstract 根据App ID获取一个已经初始化过的Track实例
@param appID AppID
@discussion `[BDAutoTrack trackWithConfig:]`
@result Track实例
*/
+ (nullable instancetype)trackWithAppID:(NSString *)appID;
/*! @abstract 开始埋点和无埋点上报
@discussion `[BDAutoTrack trackWithConfig:]`
*/
- (void)startTrack;
/*! @abstract userAgent
@discussion SDK的时候设置一次
@param userAgent HTTP/HTTPS userAgent
*/
- (void)setUserAgent:(nullable NSString *)userAgent;
/*! @abstract UserUniqueID发生变化时设置
@discussion ID值 [BDAutoTrack clearUserUniqueID] nil
@discussion SDK会保存
@param uniqueID id
@return
*/
- (BOOL)setCurrentUserUniqueID:(nullable NSString *)uniqueID;
/*! @abstract 登出 logout
@discussion logout
*/
- (void)clearUserUniqueID;
/*! @abstract 手动发起注册请求,一般不需要调用。
@discussion
SDK在以下情况会自动调用此方法:
1.
2. `setServiceVendor:`serviceVendor
3. `setCurrentUserUniqueID:`userUniqueID
@discussion
@param registeringUserUniqueID ID. nil则使用当前的UserUniqueID.
@return
*/
- (BOOL)sendRegisterRequestWithRegisteringUserUniqueID:(nullable NSString *)registeringUserUniqueID APPLOG_API_AVALIABLE(6.2.3);
/// 同 `sendRegisterRequestWithRegisteringUserUniqueID: nil`
- (BOOL)sendRegisterRequest APPLOG_API_AVALIABLE(5.6.3);
/*! @abstract 设置上报Host地区有国内、新加坡、美东三个选项
@discussion
@discussion serviceVendor与旧值不一致时
@param serviceVendor
*/
- (void)setServiceVendor:(BDAutoTrackServiceVendor)serviceVendor;
/*! @abstract 设置自定义的URL回调
@param requestURLBlock block
@discussion requestURLBlock nil会清空回调
@discussion block在初始化之前
*/
- (void)setRequestURLBlock:(nullable BDAutoTrackRequestURLBlock)requestURLBlock;
/*! @abstract 设置自定义的URL回调
@param requestHostBlock block
@discussion requestHostBlock nil会清空回调
@discussion requestURLBlock会优先于requestHostBlock
*/
- (void)setRequestHostBlock:(nullable BDAutoTrackRequestHostBlock)requestHostBlock;
/*! @abstract 地区
@discussion
@discussion `[[NSLocale currentLocale] objectForKey:NSLocaleCountryCode]`
@discussion `+[BDAutoTrack setAppRegion:]`
*/
- (void)setAppRegion:(nullable NSString *)appRegion;
/*! @abstract 语言
@discussion
@discussion `[[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]`
@discussion `+[BDAutoTrack setAppLauguage:]`
*/
- (void)setAppLauguage:(nullable NSString *)appLauguage;
/************** 设置CustomHeader(持久化,会影响下次启动) ***************/
/**
@abstract
@param value valueNSString或者数字nil
@param key key
@code
/// 新增或者修改,仅发生变化的时候使用
[track setCustomHeaderValue:@"male" forKey:@"gender"];
[track setCustomHeaderValue:@(29) forKey:@"age"];
/// 删除
[track removeCustomHeaderValueForKey:@"gender"];
[track removeCustomHeaderValueForKey:@"age"];
*/
- (void)setCustomHeaderValue:(nullable id)value forKey:(NSString *)key;
/// 将字典中的KV添加进自定义上报信息。已有的键将会被覆盖。
/// @param dictionary 值一般为字符串或数字
- (void)setCustomHeaderWithDictionary:(NSDictionary<NSString *, id> *)dictionary;
/// 删除CustomHeader中的一条KV。
- (void)removeCustomHeaderValueForKey:(NSString *)key;
/************** 设置CustomHeader(非持久化,只作用于本次启动) ***************/
/*! @abstract 添加自定义上报信息
@param customHeaderBlock
@discussion customHeaderBlock App启动设置一次即可App重启需要重新设置SDK不会保存上次设置的值nil会清空回调
@discussion block在初始化之前设置一次即可block返回参数保存
[track setCustomHeaderBlock:^NSDictionary<NSString *,id> * _Nonnull{
return @{@"gender":[UserInfo GetGender],
@"age":@([UserInfo GetAge]),
};
}];
*/
- (void)setCustomHeaderBlock:(nullable BDAutoTrackCustomHeaderBlock)customHeaderBlock;
/*! @abstract 日志上报
@param event nil或空字符串
@param params nilparam如果非空json
@discussion params 使 [NSJSONSerialization isValidJSONObject:] params是否可序列化
@result
*/
- (BOOL)eventV3:(NSString *)event params:(nullable NSDictionary *)params;
/*! @abstract 日志上报
@param event nil或空字符串
@result
*/
- (BOOL)eventV3:(NSString *)event;
#pragma mark - ABTest
/*! @abstract 获取ABTest的配置值
@param key ABTest的key
@param defaultValue ABTest则返回默认值
@discussion ABTest或者ABTest配置了默认值BDAutoTrackNotificationABTestSuccess来判断是否开启了ABTest
@discussion
@result ABTest的配置值
*/
- (nullable id)ABTestConfigValueForKey:(NSString *)key defaultValue:(nullable id)defaultValue;
/*! @abstract 本地缓存已加载时同`ABTestConfigValueForKey:defaultValue:`。本地缓存未加载时将阻塞等待其加载完成。
@discussion 30-100ms内加载完成
便AB实验数据
*/
- (nullable id)ABTestConfigValueSyncForKey:(NSString *)key defaultValue:(nullable id)defaultValue;
/*! @abstract 获取ABTest 额外的vids
@param versions vids @"1,2,3"
@discussion nil
*/
- (void)setExternalABVersion:(nullable NSString *)versions;
/*! @abstract 获取ABTest相关配置
@result ABTest的vids值
@discussion event中SDK会自动给每个event添加
*/
- (nullable NSString *)abVids;
/*! @abstract 获取ABTest相关配置
@result ABTest的所有的vids值
@discussion
*/
- (nullable NSString *)allAbVids;
/*! @abstract 获取ABTest相关配置
@result ABTest的所有的Configs值
@discussion
@discussion 使使-[BDAutoTrack ABTestConfigValueForKey:defaultValue:]
*/
- (nullable NSDictionary *)allABTestConfigs;
/// `allABTestConfigs` version 2. Align with web and Android.
/// return raw key-value in server response.
- (nullable NSDictionary *)allABTestConfigs2;
/*! @abstract 本地缓存已加载时同`abVids`。本地缓存未加载时将阻塞等待其加载完成。
@discussion 30-100ms内加载完成
便AB实验数据
*/
- (nullable NSString *)abVidsSync;
/*! @abstract 本地缓存已加载时同`allAbVids`。本地缓存未加载时将阻塞等待其加载完成。
@discussion 30-100ms内加载完成
便AB实验数据
*/
- (nullable NSString *)allAbVidsSync;
/*! @abstract 本地缓存已加载时同`allABTestConfigs`。本地缓存未加载时将阻塞等待其加载完成。
@discussion 30-100ms内加载完成
便AB实验数据
*/
- (nullable NSDictionary *)allABTestConfigsSync;
#pragma mark - ALink
/* 如果你的应用不使用ALink功能可忽略此节。 */
/*! 设置路由代理对象。路由代理对象负责接受SDK回传的路由数据并根据数据做页面路由。
@discussion 使ALink功能
*/
- (void)setALinkRoutingDelegate:(id<BDAutoTrackAlinkRouting>)ALinkRoutingDelegate;
/*! 此方法内部会判断参数是否为有效的ALink。如果是则会异步请求路由数据并回传给路由代理对象。
@discussion 使UIScene`application: openURL: options:``application: continueUserActivity: restorationHandler:`
使UIScene使UIScene的情况`scene: openURLContexts:``scene:continueUserActivity:`
使ALink功能
@param ALinkURL URLUniversal Link Custom URL Scheme
@return ALink
@code
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
if([BDAdapter handleURL:url scene:nil]) {
return YES;
}
if ([BDAutoTrack continueALinkActivityWithURL:url]) {
return YES;
}
/// your handle code
return NO;
}
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
NSURL *universalLinkURL = userActivity.webpageURL;
if ([universalLinkURL.host isEqualToString:@"myapphost.com"]) {
// 如你的应用有多个Universal Links域名可以先判断是否是其他域名。
return YES;
}
else if ([BDAutoTrack continueALinkActivityWithURL:userActivity.webpageURL]) { // 多半是ALink交给AppLog SDK来处理。如果不是ALinkSDK也会返回NO。
return YES;
}
return NO;
}
return YES;
}
*/
- (BOOL)continueALinkActivityWithURL:(NSURL *)ALinkURL;
#pragma mark - private API
/*! @abstract 调用用户激活接口。一般情况下,请勿调用,除非知晓调用可能的问题。
*/
- (void)activeUser;
@end
#pragma mark - Special
@interface BDAutoTrack (SharedSpecial)
+ (BOOL)eventV3:(NSString *)event params:(nullable NSDictionary *)params specialParams:(NSDictionary *)specialParams;
+ (BOOL)customEvent:(NSString *)category params:(NSDictionary *)params;
@end
NS_ASSUME_NONNULL_END
/// 单例的类方法
#import "BDAutoTrack+SharedInstance.h"
#import "BDAutoTrack+Profile.h"

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: edc7ff870c0e54c5c833da7b35984b6d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,24 +0,0 @@
//
// BDAutoTrackAlinkRouting.h
// RangersAppLog
//
// Created by 朱元清 on 2021/3/2.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
static NSErrorDomain const RALALinkErrorDomain = @"RALALinkErrorDomain";
@protocol BDAutoTrackAlinkRouting <NSObject>
@required
- (void)onAttributionData:(nullable NSDictionary *)routingInfo error:(nullable NSError *)error;
- (void)onALinkData:(nullable NSDictionary *)routingInfo error:(nullable NSError *)error;
- (bool)shouldALinkSDKAccessPasteBoard;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 53d8b3e8c9d3344ad951895692901918
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,41 +0,0 @@
//
// BDAutoTrackCacheRemover.h
// RangersAppLog
//
// Created by 朱元清 on 2020/11/2.
//
#import <Foundation/Foundation.h>
#import "RangersAppLog.h"
/**
SDK缓存的接口SDK缓存之用途使
便使
*/
NS_ASSUME_NONNULL_BEGIN
@interface BDAutoTrackCacheRemover : NSObject
/*********************************** SDK私有缓存 ************************************/
/// 永久删除 SDK 私有缓存包括deviceID\ssID\installID\userUniqueID\ABTest配置等信息
- (void)removeDefaultsForAppID:(NSString *)appID;
/*********************************** StandardDefaults ************************************/
/// 临时将应用层移除出StandardDefaults的搜索列表
- (void)removeCurrentBundleFromStandardDefaultsSearchList;
/// 永久删除 StandardDefaults 的应用层缓存
- (void)removeCurrentBundleFromStandardDefaults;
/*********************************** KeyChain ************************************/
/// 删除SDK再 keychian 中的缓存
- (void)removeKeychainForAppID:(NSString *)appID serviceVendor:(BDAutoTrackServiceVendor)vendor;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: e3d654ff7da404509bd195334dd72b79
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,58 +0,0 @@
//
// BDAutoTrackConfig+AppLog.h
// RangersAppLog
//
// Created by bob on 2020/3/25.
//
#import "BDAutoTrackConfig.h"
NS_ASSUME_NONNULL_BEGIN
@interface BDAutoTrackConfig (AppLog)
/*! @abstract 是否开启事件上报默认YES关闭后任何事件包括用户自定义事件都不会上报
@discussion ABTest功能
*/
@property (nonatomic, assign) BOOL trackEventEnabled;
/*! @abstract 是否开启无埋点。同时需要在Tea配置。
@discussion NO且Tea平台配置NO
@discussion NO且Tea平台配置YES
@discussion YES且Tea平台配置NO
@discussion YES且Tea平台配置YES
*/
@property (nonatomic, assign) BOOL autoTrackEnabled;
/*! @abstract 当无埋点开关开启时是否采集H5页面的无埋点事件默认开(YES)
*/
@property (nonatomic) BOOL H5AutoTrackEnabled;
/*! @abstract 游戏模式,开启游戏模式会默认上报游戏心跳事件 */
@property (nonatomic, assign) BOOL gameModeEnable;
/*! @abstract 是否自动激活。默认YES一般情况请不要修改 */
@property (nonatomic, assign) BOOL autoActiveUser;
/*! @abstract 采集事件的时候输出日志,在控制台中可以查看
@discussion loggerNSLog低效iOS 13release版本请设置为NO
*/
@property (nonatomic, assign) BOOL showDebugLog;
/*! @abstract 采集事件的时候输出日志,在控制台中可以查看
@discussion logger为nil
*/
@property (nonatomic, copy, nullable) BDAutoTrackLogger logger;
/*! @abstract 日志上报是否加密。用于debug情况可以抓包调试 */
@property (nonatomic, assign) BOOL logNeedEncrypt;
/*! @abstract 是否自动拉配置。默认YES一般情况请不要修改。仅私有化部署情况可能不需要自动拉取配置 */
@property (nonatomic, assign) BOOL autoFetchSettings;
/*! @abstract 是否开AB。默认YES一般情况请不要修改 */
@property (nonatomic, assign) BOOL abEnable;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 2739e46b6f6b0463c9128c53d15244d9
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,104 +0,0 @@
//
// BDAutoTrackConfig.h
// RangersAppLog
//
// Created by bob on 2020/3/25.
//
#import <Foundation/Foundation.h>
#import "BDCommonDefine.h"
#import "BDAutoTrackEncryptionDelegate.h"
NS_ASSUME_NONNULL_BEGIN
@interface BDAutoTrackConfig : NSObject
/*! @abstract channel默认 @"App Store", Release版本只有 @"App Store" debug版本可以任意设置. */
@property (nonatomic, copy) NSString *channel;
/*! @abstract 申请appID时候填写的英文名称 */
@property (nonatomic, copy, nullable) NSString *appName;
/*! @abstract AppID非空必须设置 */
@property (nonatomic, copy) NSString *appID;
/*! @abstract 默认国内,初始化时一定要传正确的值
@discussion `+[BDAutoTrack setServiceVendor:]`
@discussion
*/
@property (nonatomic, copy) BDAutoTrackServiceVendor serviceVendor;
/*! @abstract 如有初始的UserUniqueID可以在此设置。
@discussion SDK初始化时就设置UserUniqueID的需求
@discussion Note: SDK会在初始化时设置UserUniqueID为此属性的值
UserUniqueID会变为nilSDK不会重新把UserUniqueID设置为此属性的值
*/
@property (nonatomic, copy, nullable) NSString *initialUserUniqueID;
/*! @abstract 是否开启 WKWebView 的 H5 打通功能开启后若WebView页面的JS AppLog SDK侧也配置开启H5Bridge则H5 埋点将可以从 Native 端上报。默认关闭。
*/
@property (nonatomic) BOOL enableH5Bridge;
/*! @abstract 是否开启ALink的延迟场景。默认开启。 */
@property (nonatomic) BOOL enableDeferredALink;
/*! H5Bridge功能域名白名单。只有名单中的页面会开启Bridge。支持通配符。
* @code
* config.H5BridgeAllowedDomainPatterns = @[@"*.myapp.com", @"myapp.com"];
*/
@property (nonatomic, copy) NSArray<NSString *> *H5BridgeAllowedDomainPatterns;
/*! 当切换用户时清除AB Versions缓存。默认为开(YES)。
*/
@property (nonatomic) BOOL clearABCacheOnUserChange;
/*! 应用启动选项 */
@property (nonatomic, readonly) NSDictionary<UIApplicationLaunchOptionsKey, id> *launchOptions;
/*! @abstract Define custom encryption method (or custom encryption key)
@discussion SDK不持有该对象SDK使用期间不被释放
SDK will not hold the delegate. Please ensure the delegate's liveness during SDK's usage. Do not pass temporary object.
*/
@property (nonatomic, weak) id<BDAutoTrackEncryptionDelegate> encryptionDelegate;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
/*! @abstract 根据App ID获取一个config
@param appID AppID
@param launchOptions `application:didFinishLaunchingWithOptions:``launchOptions`
*/
+ (instancetype)configWithAppID:(NSString *)appID launchOptions:(nullable NSDictionary<UIApplicationLaunchOptionsKey,id> *)launchOptions APPLOG_API_AVALIABLE(6.0.0);
/*! @abstract 根据App ID获取一个config
@param appID AppID
@result config实例, setter
@discussion 使ALink功能使APIAPI已过时使API
*/
+ (instancetype)configWithAppID:(NSString *)appID APPLOG_API_DEPRECATED_WITH_REPLACEMENT("configWithAppID:launchOptions:");
/*!
使1
BDAutoTrackConfig *config = [BDAutoTrackConfig configWithSecondAppID:appid];
// 初始化完成之后,可以调用其他接口
BDAutoTrack *track = [BDAutoTrack trackWithConfig:config]
// 设置一些属性等配置
[track setCurrentUserUniqueID:@"123"];
// 开始上报
[track satrtTrack];
// 用变量引用住track用于上报
[track eventV3:xxx params:xxx];
*/
/*! @abstract 根据App ID获取一个config
@param appID AppID
@result config实例, config默认设置了不会激活和拉取settingsSDK需要上报一些事件
*/
+ (instancetype)configWithSecondAppID:(NSString *)appID;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: cd2437fc66a8f4da4a39e872de48dd96
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,25 +0,0 @@
//
// BDAutoTrackEncryptionDelegate.h
// RangersAppLog
//
// Created by 朱元清 on 2021/8/9.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol BDAutoTrackEncryptionDelegate <NSObject>
@required
/// Encrypt data for HTTP request. Use your custom encryption method by implementing this protocol and inject it into BDAutoTracker in its initialization.
/// Only takes effect when `logNeedEncypt` is YES.
/// The following data will be passed to this method:
/// (1) All HTTP POST body data
/// (2) Some HTTP query data
/// @param data data before encryption
/// @param error in-out param. Set it when encryption fails.
- (NSData *)encryptData:(NSData *)data error:(NSError * __autoreleasing *)error;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: f8a5af045d53b4beba81fa7704965d4b
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,23 +0,0 @@
//
// BDAutoTrackIDFA.h
// RangersAppLog
//
// Created by bob on 2020/8/28.
//
#import "BDCommonDefine.h"
NS_ASSUME_NONNULL_BEGIN
@interface BDAutoTrackIDFA : NSObject
/**
if you want to use idfa, you should request Authorization
*/
+ (BDAutoTrackAuthorizationStatus)authorizationStatus;
+ (void)requestAuthorizationWithHandler:(nullable BDAutoTrackAuthorizationHandler)completion;
+ (nullable NSString *)trackingIdentifier;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 9365f75dd91b74df1a34c2379441b6b3
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,107 +0,0 @@
//
// BDAutoTrackConstants.h
// Pods-BDAutoTracker_Example
//
// Created by bob on 2019/5/16.
//
#import <Foundation/Foundation.h>
#ifndef BDAutoTrackNotifictaion_H
#define BDAutoTrackNotifictaion_H
/*! @abstract UIViewController 切换事件通知
userInfo
@{ kBDAutoTrackViewControllerFormer:NSStringFromClass(from.class),
kBDAutoTrackViewControllerAfter:NSStringFromClass(to.class),
kBDAutoTrackSwitchIsBack:@(isBack)
};
@discussion 线
*/
FOUNDATION_EXTERN NSString * const BDAutoTrackVCSwitchEventNotification;
FOUNDATION_EXTERN NSString * const kBDAutoTrackViewControllerFormer;
FOUNDATION_EXTERN NSString * const kBDAutoTrackViewControllerAfter;
FOUNDATION_EXTERN NSString * const kBDAutoTrackSwitchIsBack;
/*! @abstract SDK 注册成功通知
userInfo
@{ kBDAutoTrackNotificationAppID :appID,
kBDAutoTrackNotificationRangersDeviceID :did,
kBDAutoTrackNotificationSSID :ssid,
kBDAutoTrackNotificationInstallID :iid
kBDAutoTrackNotificationUserUniqueID :uuid
kBDAutoTrackNotificationDataSource: BDAutoTrackNotificationDataSourceLocalCache | BDAutoTrackNotificationDataSourceServer
kBDAutoTrackNotificationIsNewUser : 1 | 0
};
@discussion 线uuid可能为 nil.
@discussion SDK ID
1. -[BDAuTrack startTrack]
2. -[BDAuTrack setCurrentUserUniqueID:] nil
3. -[BDAuTrack setServiceVendor:]
*/
FOUNDATION_EXTERN NSString * const BDAutoTrackNotificationRegisterSuccess;
/*!
@abstract SDK SDK在注册阶段默认有3次重试策略
userInfo
@{
@"message": @"register request failure",
@"remainingRetry": ()
};
*/
FOUNDATION_EXTERN NSString * const BDAutoTrackNotificationRegisterFailure;
/*! @abstract SDK 激活成功通知
userInfo
@{ kBDAutoTrackNotificationAppID :appID,
};
@discussion 线
*/
FOUNDATION_EXTERN NSString * const BDAutoTrackNotificationActiveSuccess;
/*! @abstract SDK ABTest配置拉取成功通知
userInfo
@{ kBDAutoTrackNotificationAppID :appID,
kBDAutoTrackNotificationData :data,
};
@discussion 线 App ID ABTest ABTest
ABTest ABTest
data的结构check一下data.count == 0
ABTest配置使 -[BDAutoTrack allABTestConfigs]
*/
FOUNDATION_EXTERN NSString * const BDAutoTrackNotificationABTestSuccess;
/*! @abstract SDK通知的userInfo的 key 定义
NSString
*/
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationAppID;
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationRangersDeviceID;
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationSSID;
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationInstallID;
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationUserUniqueID;
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationData;
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationIsNewUser; // 设备注册服务返回,标识是否是新设备. 值为NSNumber(1/0)。
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationDataSource; // 通知来源
typedef NSString * const BDAutoTrackNotificationDataSource NS_TYPED_ENUM;
FOUNDATION_EXTERN BDAutoTrackNotificationDataSource BDAutoTrackNotificationDataSourceLocalCache; // 通知的数据来自于恢复本地缓存
FOUNDATION_EXTERN BDAutoTrackNotificationDataSource BDAutoTrackNotificationDataSourceServer; // 通知的数据来自于服务器响应
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationDataSourceURL; // 若通知的数据来自于服务器响应则userInfo会含有此键。其值是请求URL
/*! @abstract SDK ABTestVid发生变化时候的通知
userInfo
@{ kBDAutoTrackNotificationAppID :appID,
kBDAutoTrackNotificationABTestVids :vids,
kBDAutoTrackNotificationABTestExternalVids:externalVids
};
@discussion 线Vid发生变化时触发 App ID ABTest
*/
FOUNDATION_EXTERN NSString * const BDAutoTrackNotificationABTestVidsChanged;
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationABTestVids;
FOUNDATION_EXTERN NSString * const kBDAutoTrackNotificationABTestExternalVids;
#endif

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: cd3423c00671a47deaae93d979b64706
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,48 +0,0 @@
//
// BDAutoTrackSchemeHandler.h
// RangersAppLog
//
// Created by bob on 2019/9/24.
//
#import <Foundation/Foundation.h>
#import "BDCommonDefine.h"
NS_ASSUME_NONNULL_BEGIN
/* 如果是iOS 13中重写UISceneDelegate的回调则按照i以下code
- (void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {
for (UIOpenURLContext *context in URLContexts) {
NSURL *URL = context.URL;
if ([[BDAutoTrackSchemeHandler sharedHandler] handleURL:URL appID:@"appid" scene:scene]) {
continue;
}
/// your handle code for the URL
}
}
iOS 13UIApplicationDelegate的回调方法code
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
if ([[BDAutoTrackSchemeHandler sharedHandler] handleURL:url appID:@"appid" scene:nil]) {
return YES;
}
/// your handle code
return NO;
}
*/
@interface BDAutoTrackSchemeHandler : NSObject<BDAutoTrackSchemeHandler>
+ (instancetype)sharedHandler;
- (BOOL)handleURL:(NSURL *)URL appID:(NSString *)appID scene:(nullable id)scene;
- (void)registerHandler:(id<BDAutoTrackSchemeHandler>)handler;
- (void)unregisterHandler:(id<BDAutoTrackSchemeHandler>)handler;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: bea89bec20a2e4e2aa094b891f85b1f7
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,11 +0,0 @@
//
// BDAutoTrackURLHostItemCN.h
// RangersAppLog-RangersAppLog
//
// Created by 朱元清 on 2020/8/6.
//
#import "BDCommonEnumDefine.h"
FOUNDATION_EXPORT BDAutoTrackServiceVendor const BDAutoTrackServiceVendorCN;

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 7557f5c9eedea4450a6face29b8d1581
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,71 +0,0 @@
//
// BDCommonDefine.h
// RangersAppLog
//
// Created by bob on 2020/3/25.
//
#import <Foundation/Foundation.h>
#import "BDCommonEnumDefine.h"
#define APPLOG_API_AVALIABLE(x)
#define APPLOG_API_DEPRECATED __deprecated
#define APPLOG_API_DEPRECATED_WITH_REPLACEMENT(msg) __deprecated_msg("please use '" msg "'")
// 编译时断言
#define APPLOG_STATIC_ASSERT(COND,MSG) typedef char static_assertion_##MSG[(COND)?1:-1]
#ifndef BDCommonDefine_h
#define BDCommonDefine_h
NS_ASSUME_NONNULL_BEGIN
/*
request IDFA handler
*/
typedef void (^BDAutoTrackAuthorizationHandler)(BDAutoTrackAuthorizationStatus status);
/*! @abstract 日志输出
@param log
@discussion 使SDK输出日志
*/
typedef void(^BDAutoTrackLogger)(NSString * _Nullable log);
/*! @abstract 自定义请求链接把相关请求发送到对应的自定义的URL上
@param vendor
@param requestURLType
@discussion URLnil即可
@result URL
*/
typedef NSString * _Nullable (^BDAutoTrackRequestURLBlock)(BDAutoTrackServiceVendor vendor, BDAutoTrackRequestURLType requestURLType);
/*! @abstract 自定义请求链接的Host把相关请求发送到对应的自定义的Host上path仍然按照SDK规则拼接
@param vendor
@param requestURLType
@discussion https://github.com/
@result URL
*/
typedef NSString * _Nullable (^BDAutoTrackRequestHostBlock)(BDAutoTrackServiceVendor vendor, BDAutoTrackRequestURLType requestURLType);
/*! @abstract 自定义上报信息
@discussion
@result NSDictionary custom数据
*/
typedef NSDictionary<NSString*, id> *_Nonnull (^BDAutoTrackCustomHeaderBlock)(void);
@protocol BDAutoTrackSchemeHandler <NSObject>
/*! @abstract 处理scheme
@discussion
@param URL scheme的完整URL
@param appID SDK的AppID
@param scene iOS 13
@result YESURLNO表示没有处理
*/
- (BOOL)handleURL:(NSURL *)URL appID:(NSString *)appID scene:(nullable id)scene;
@end
NS_ASSUME_NONNULL_END
#endif /* BDCommonDefine_h */

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: e4f710d39d4b041cda10fd769fdae974
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,65 +0,0 @@
//
// BDCommonEnumDefine.h
// RangersAppLog
//
// Created by 朱元清 on 2020/8/10.
//
#import <Foundation/Foundation.h>
#ifndef BDCommonEnumDefine_h
#define BDCommonEnumDefine_h
/*! @abstract 日志上报地区属性
@discussion
*/
typedef NSString* BDAutoTrackServiceVendor NS_EXTENSIBLE_STRING_ENUM;
FOUNDATION_EXTERN BDAutoTrackServiceVendor const BDAutoTrackServiceVendorPrivate; // 私有化此时一定要设置BDAutoTrackRequestURLBlock
/*!
URL type
*/
typedef NSInteger BDAutoTrackRequestURLType NS_TYPED_ENUM;
FOUNDATION_EXTERN BDAutoTrackRequestURLType const BDAutoTrackRequestURLRegister; // 注册
FOUNDATION_EXTERN BDAutoTrackRequestURLType const BDAutoTrackRequestURLActivate; // 激活
FOUNDATION_EXTERN BDAutoTrackRequestURLType const BDAutoTrackRequestURLSettings; // 基本配置
FOUNDATION_EXTERN BDAutoTrackRequestURLType const BDAutoTrackRequestURLABTest; // ABTest配置
FOUNDATION_EXTERN BDAutoTrackRequestURLType const BDAutoTrackRequestURLLog; // 日志上报
FOUNDATION_EXTERN BDAutoTrackRequestURLType const BDAutoTrackRequestURLLogBackup; // 日志上报备用
FOUNDATION_EXTERN BDAutoTrackRequestURLType const BDAutoTrackRequestURLProfile; // profile事件上报专用
FOUNDATION_EXTERN BDAutoTrackRequestURLType const BDAutoTrackRequestURLALinkLinkData; // ALink 获取链接参数
FOUNDATION_EXTERN BDAutoTrackRequestURLType const BDAutoTrackRequestURLALinkAttributionData; // ALink 获取归因
typedef NS_ENUM(NSUInteger, BDAutoTrackLaunchFrom) {
/// 初始状态
BDAutoTrackLaunchFromInitialState = 0,
/// 用户手动点击进入app
BDAutoTrackLaunchFromUserClick,
/// 用户通过push点击进入app
BDAutoTrackLaunchFromRemotePush,
/// 用户通过widget点击进入app
BDAutoTrackLaunchFromWidget,
/// 用户通过sptlight点击进入app
BDAutoTrackLaunchFromSpotlight,
/// 用户通过外部app唤醒进入app
BDAutoTrackLaunchFromExternal,
/// 用户手动切回前台
BDAutoTrackLaunchFromBackground,
/// from siri
BDAutoTrackLaunchFromSiri,
};
/**
IDFA Authorization Status
*/
typedef NS_ENUM(NSInteger, BDAutoTrackAuthorizationStatus) {
BDAutoTrackAuthorizationStatusNotDetermined = 0,
BDAutoTrackAuthorizationStatusRestricted,
BDAutoTrackAuthorizationStatusDenied,
BDAutoTrackAuthorizationStatusAuthorized
};
#endif /* BDCommonEnumDefine_h */

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 7b3718b05caa441beb29ffba6f700ad8
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,45 +0,0 @@
//
// BDKeyWindowTracker.h
// RangersAppLog
//
// Created by bob on 2019/8/12.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
UIKIT_EXTERN NSString * const BDDefaultScene;
@interface BDKeyWindowTracker : NSObject
/*! @abstract keyWindow for BDDefaultScene
@discussion setter等同于调用`-[BDKeyWindowTracker trackScene:BDDefaultScene keyWindow:keyWindow]`
@discussion getter等同于调用`-[BDKeyWindowTracker keyWindowForScene:BDDefaultScene]`
@discussion SceneSceneiOS 13使keyWindow属性即可
*/
@property (nonatomic, strong, nullable) UIWindow *keyWindow;
+ (instancetype)sharedInstance;
/*! @abstract 设置scene的keywindow
@discussion
@param scene UIWindowScene的唯一标志使 scene = [NSString stringWithFormat:@"%p",windowScene];
@param keyWindow scene的keywindow
*/
- (void)trackScene:(NSString *)scene keyWindow:(nullable UIWindow *)keyWindow;
/*! @abstract 获取该scene的keywindow
@param scene UIWindowScene的唯一标志使 scene = [NSString stringWithFormat:@"%p",windowScene];
@result keyWindow scene的keywindow
*/
- (nullable UIWindow *)keyWindowForScene:(NSString *)scene;
/*! @abstract 移除scene的keywindow
@param scene UIWindowScene的唯一标志使 scene = [NSString stringWithFormat:@"%p",windowScene];
*/
- (void)removeKeyWindowForScene:(NSString *)scene; /// when you want set nil
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 85beb69f4b1dd4e1185c991dac30ac59
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,18 +0,0 @@
//
// NSArray+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSArray (OK)
- (id)ok_safeJsonObject;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 37221e2bef2b24cab944c60d02883b17
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,22 +0,0 @@
//
// NSData+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSData (OK)
- (NSString *)ok_md5String;
- (NSString *)ok_sha256String;
- (NSString *)ok_hexString;
- (nullable id)ok_jsonValueDecoded;
- (nullable id)ok_jsonValueDecoded:(NSError *__autoreleasing *)error;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 50cea153c68ba49b191518e1e6232783
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,19 +0,0 @@
//
// NSData+OneKitDecorator.h
// OneKit
//
// Created by bob on 2019/11/7.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSData (OneKitDecorator)
/// 通用包装方法
- (nullable NSData *)rsk_dataByDecorated;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 8bf6a8bf741a243d18282ad624f56553
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,21 +0,0 @@
//
// NSData+OKGZIP.h
// OneKit
//
// Created by bob on 2020/6/12.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSData (OKGZIP)
/// GZIP
- (nullable NSData *)ok_dataByGZipCompressingWithError:(NSError * __autoreleasing *)error;
- (BOOL)ok_isGzipCompressedData;
- (nullable NSData *)ok_dataByGZipDecompressingDataWithError:(NSError * __autoreleasing *)error;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 895a0556173134a97ba232b3f1db6f69
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,70 +0,0 @@
//
// NSData+OKSecurity.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/*! @abstract AES 加密 key size类型
@discussion key size要和传入的key符合
*/
typedef NS_ENUM(NSInteger, OKAESKeySize) {
OKAESKeySizeAES128 = 0x10, /// 对应key的byte是16字节
OKAESKeySizeAES192 = 0x18, /// 对应key的byte是24字节
OKAESKeySizeAES256 = 0x20, /// 对应key的byte是32字节
};
@interface NSData (OKSecurity)
/*! @abstract AES 加密方法
@param key keykeySize对应的byte一致0
@param keySize OKAESKeySize三种选项
@param iv iv是nil使EBC模式nil则使用CBC模式iv要求16字节
@result nil
@discussion key和keySize要对应
*/
- (nullable NSData *)ok_aesEncryptWithkey:(NSString *)key
keySize:(OKAESKeySize)keySize
iv:(nullable NSString *)iv;
/*! @abstract AES 加密方法
@param keyData keykeySize对应的byte一致0
@param keySize OKAESKeySize三种选项
@param ivData iv是nil使EBC模式nil则使用CBC模式iv要求16字节
@result nil
@discussion key和keySize要对应
*/
- (nullable NSData *)ok_aesEncryptWithkeyData:(NSData *)keyData
keySize:(OKAESKeySize)keySize
ivData:(nullable NSData *)ivData;
/*! @abstract AES 解密方法
@param key keykeySize对应的byte一致0
@param keySize OKAESKeySize三种选项
@param iv iv是nil使EBC模式nil则使用CBC模式iv要求16字节
@result nil
@discussion key和keySize要对应
*/
- (nullable NSData *)ok_aesDecryptwithKey:(NSString *)key
keySize:(OKAESKeySize)keySize
iv:(nullable NSString *)iv;
/*! @abstract AES 解密方法
@param keyData keykeySize对应的byte一致0
@param keySize OKAESKeySize三种选项
@param ivData iv是nil使EBC模式nil则使用CBC模式iv要求16字节
@result nil
@discussion key和keySize要对应
*/
- (nullable NSData *)ok_aesDecryptwithKeyData:(NSData *)keyData
keySize:(OKAESKeySize)keySize
ivData:(nullable NSData *)ivData;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: d5d34b7240fcf45b2b6a440ab1aedc38
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,29 +0,0 @@
//
// NSDictionary+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSDictionary (OK)
- (id)ok_safeJsonObject;
- (nullable NSString *)ok_queryString;
- (BOOL)ok_boolValueForKey:(NSString *)key;
- (double)ok_doubleValueForKey:(NSString *)key;
- (NSInteger)ok_integerValueForKey:(NSString *)key;
- (long long)ok_longlongValueForKey:(NSString *)key;
- (nullable NSString *)ok_stringValueForKey:(NSString *)key;
- (nullable NSDictionary *)ok_dictionaryValueForKey:(NSString *)key;
- (nullable NSMutableDictionary *)ok_mutableDictionaryValueForKey:(NSString *)key;
- (nullable NSArray *)ok_arrayValueForKey:(NSString *)key;
- (nullable NSMutableArray *)ok_mutableArrayValueForKey:(NSString *)key;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 9998bc2c5410c44688d9620554c829ac
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,34 +0,0 @@
//
// NSFileManager+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/*
home => /var/mobile/Containers/Data/Application/XXX/
- Documents => /var/mobile/Containers/Data/Application/XXX/Documents
- Applications =>
- Library =>
- Library/Caches
*/
@interface NSFileManager (OK)
+ (NSString *)ok_homePath;
+ (NSString *)ok_cachePath;
+ (NSString *)ok_documentPath;
+ (NSString *)ok_libraryPath;
/// /private/var/containers/Bundle/Application/XXX/YYY.app
+ (NSString *)ok_mainBundlePath;
- (nullable NSURL *)ok_pathForNotificationFile:(NSString *)file group:(NSString *)group;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: f3b265d4c3a4d4b2cbc3a9913a980125
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,18 +0,0 @@
//
// NSHashTable+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSHashTable (OK)
- (id)ok_safeJsonObject;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 982bbbb9faf5e4beaaf0971ee4539a68
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,18 +0,0 @@
//
// NSMapTable+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSMapTable (OK)
- (id)ok_safeJsonObject;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 19acaf99051e5403d93758f8e874d5df
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,18 +0,0 @@
//
// NSMutableArray+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSMutableArray (OK)
- (void)ok_addObject:(nullable id)anObject;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: fba518b7e68a24a14932fe735adc7108
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,31 +0,0 @@
//
// NSMutableDictionary+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSMutableDictionary (OK)
- (void)ok_setObject:(nullable id)anObject forKey:(nullable id<NSCopying>)aKey;
/*
the struct should be the same
e.g.
{"x":"xx"} skipMerge {"x":"xxx","y","yyy"}
==> {"x":"xx","y","yyy"}
{"x":"xx"} overrideMerge {"x":"xxx","y","yyy"}
==> {"x":"xxx","y","yyy"}
*/
- (void)ok_skipMerge:(NSDictionary *)value;
- (void)ok_overrideMerge:(NSDictionary *)value;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 24dc1b521a76349d2bd514f4ca90b246
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,19 +0,0 @@
//
// NSNumber+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSNumber (OK)
- (id)ok_safeJsonObject;
- (NSString *)ok_safeJsonObjectKey;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 410b127d24a3648b58a99e66284c7e3d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,38 +0,0 @@
//
// NSObject+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSObject (OK)
- (id)ok_safeJsonObject;
- (NSString *)ok_safeJsonObjectKey;
- (nullable NSString *)ok_jsonStringEncoded;
- (nullable NSString *)ok_jsonStringEncodedForJS;
/**
Swizzle two instance selectors.
@param origSelector The original selector.
@param newSelector The new selector.
@return Return YES if selectors were swizzled successfully.
*/
+ (BOOL)ok_swizzleInstanceMethod:(nonnull SEL)origSelector with:(nonnull SEL)newSelector;
/**
Swizzle two class selectors.
@param origSelector The original selector.
@param newSelector The new selector.
@return Return YES if selectors were swizzled successfully.
*/
+ (BOOL)ok_swizzleClassMethod:(nonnull SEL)origSelector with:(nonnull SEL)newSelector;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: b5c0b1a24d8294ead8dbf1cffdd87b40
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,18 +0,0 @@
//
// NSSet+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSSet (OK)
- (id)ok_safeJsonObject;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 6fe32800fa67b432cb38ee9f6878edfc
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,33 +0,0 @@
//
// NSString+OK.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSString (OK)
- (NSString *)ok_trimmed;
- (NSString *)ok_md5String;
- (NSString *)ok_sha256String;
- (nullable NSString *)ok_base64EncodedString;
- (nullable NSString *)ok_base64DecodedString;
- (nullable id)ok_jsonValueDecoded;
- (nullable id)ok_jsonValueDecoded:(NSError *__autoreleasing *)error;
- (NSString *)ok_stringByAppendingQueryDictionary:(NSDictionary *)params;
- (NSDictionary *)ok_queryDictionary;
+ (NSString *)ok_UUIDString;
- (id)ok_safeJsonObject;
- (NSString *)ok_safeJsonObjectKey;
- (BOOL)isNullOrEmptyString;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 87cc2e8e2165447f99f6cee89f2a521e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,38 +0,0 @@
//
// NSString+OKSecurity.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import "NSData+OKSecurity.h"
NS_ASSUME_NONNULL_BEGIN
@interface NSString (OKSecurity)
/*! @abstract AES 加密方法
@param key keykeySize对应的byte一致0
@param keySize OKAESKeySize三种选项
@param iv iv是nil使EBC模式nil则使用CBC模式
@result
@discussion key和keySize要对应
@discussion aes加密后的data不一定能转成正常的字符串base64编码
*/
- (nullable NSString *)ok_aesEncryptWithkey:(NSString *)key
keySize:(OKAESKeySize)keySize
iv:(nullable NSString *)iv;
/*! @abstract AES 解密方法
@param key keykeySize对应的byte一致0
@param keySize OKAESKeySize三种选项
@param iv iv是nil使EBC模式nil则使用CBC模式
@result nil
@discussion aes的密文data不一定能转成正常的字符串base64编码base64解码
*/
- (nullable NSString *)ok_aesDecryptwithKey:(NSString *)key
keySize:(OKAESKeySize)keySize
iv:(nullable NSString *)iv;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 2a3875be5477a4b74b865071aaeea64b
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,54 +0,0 @@
//
// OKApplicationInfo.h
// OKStartUp
//
// Created by bob on 2020/1/14.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// Config自定义配置参考如下需要在OKAppCustomConfigFunction中
/// 仅做简单配置,请勿进行耗时操作
/**
#import <OneKit/OKStartUpGaia.h>
#import <OneKit/OKStartUpFunction.h>
OKAppCustomConfigFunction() {
[OKApplicationInfo sharedInstance].xx = xxx;
}
*/
/// 存储应用信息
/// 默认值从bundle或onekit-config.plist中读取
@interface OKApplicationInfo : NSObject
/* 默认值从onekit-config.plist中读取 */
@property (nonatomic) NSString *appID;
@property (nonatomic) NSString *accessKey; // mars_access_key
@property (nonatomic) NSString *secretKey; // mars_secret_key
@property (nonatomic, nullable) NSDictionary *serviceInfo;
/* 默认值从bundle中读取 */
@property (nonatomic, copy) NSString *appName;
@property (nonatomic, copy) NSString *appDisplayName;
@property (nonatomic, copy) NSString *channel;
@property (nonatomic, copy) NSString *appVersion;
@property (nonatomic, copy) NSString *buildVersion;
@property (nonatomic, copy) NSString *buildVersionCode;
@property (nonatomic, copy) NSString *bundleIdentifier;
@property (nonatomic, assign) BOOL isInhouseApp;
@property (nonatomic, assign) BOOL isI18NApp;
@property (nonatomic, copy) NSString *deviceModel;/// return string like "iPhone9,1"
@property (nonatomic, copy) NSString *devicePlatform;/// return "iPod", "iPad" or "iPhone"
@property (nonatomic, copy) NSString *systemVersion;
@property (nonatomic, copy, nullable) NSString *sharingKeyChainGroup;
+ (instancetype)sharedInstance;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: e1304abe724c84b5f9baf453acd58dbf
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,52 +0,0 @@
//
// OKCellular.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class CTTelephonyNetworkInfo, CTCarrier, CTCellularData;
/// SIM网络状态
typedef NS_ENUM(NSInteger, OKCellularConnectionType) {
/// 无网络连接
OKCellularConnectionTypeNone = 0,
/// 未知移动网络
OKCellularConnectionTypeUnknown,
/// 2G网络连接
OKCellularConnectionType2G,
/// 3G网络连接
OKCellularConnectionType3G,
/// 4G网络连接
OKCellularConnectionType4G,
/// 5G网络连接
OKCellularConnectionType5G,
};
typedef NS_ENUM(NSInteger, OKCellularServiceType) {
OKCellularServiceTypeNone = 0, /// 无卡
OKCellularServiceTypePrimary = 1, /// 主卡状态
OKCellularServiceTypeSecondary = 2, /// 副卡状态
};
@interface OKCellular : NSObject
@property (class ,nonatomic, strong, readonly) CTCellularData *cellularData;
+ (instancetype)sharedInstance;
+ (CTTelephonyNetworkInfo *)telephoneInfo;
/// 返回指定卡信息
/// 如果指定副卡不存在,返回主卡信息
- (OKCellularConnectionType)cellularConnectionTypeForService:(OKCellularServiceType)service;
- (CTCarrier *)carrierForService:(OKCellularServiceType)service;
- (OKCellularServiceType)currentDataServiceType;/// 返回当前流量卡类型
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: aa24e805ccea940f3bac7a33bafb1c2d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,41 +0,0 @@
//
// OKConnection.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// 网络状态
typedef NS_ENUM(NSInteger, OKNetworkConnectionType) {
/// 初始状态
OKAutoTrackNetworkNone = -1,
/// 无网络连接
OKNetworkConnectionTypeNone = 0,
/// 移动网络连接
OKNetworkConnectionTypeMobile = 1,
/// 2G网络连接
OKNetworkConnectionType2G = 2,
/// 3G网络连接
OKNetworkConnectionType3G = 3,
/// wifi网络连接
OKNetworkConnectionTypeWiFi = 4,
/// 4G网络连接
OKNetworkConnectionType4G = 5,
/// 5G网络连接
OKNetworkConnectionType5G = 6,
};
@interface OKConnection : NSObject
@property (nonatomic, assign, readonly) OKNetworkConnectionType connection;
@property (nonatomic, copy, readonly, nullable) NSString *connectMethodName;
+ (instancetype)sharedInstance;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 72add32e5f820443b98aefc15d40d880
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,39 +0,0 @@
//
// OKDevice.h
// OneKit
//
// Created by bob on 2020/4/26.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
Please call from main thread
*/
@interface OKDevice : NSObject
+ (NSTimeInterval)startupTime;
+ (uint32_t)cpuCoreCount ;
+ (NSString *)hardwareModel;
+ (NSString *)machineModel; /// return string like "iPhone9,1"
+ (NSString *)platformName; /// return "iPod", "iPad" or "iPhone"
+ (BOOL)isSimulator;
+ (NSString *)systemVersion;
+ (NSString *)currentSystemLanguage;
+ (NSString *)currentLanguage;
+ (NSString *)IDFV;
+ (float)cpuUsage; /// return -1 if error
+ (u_int64_t)physicalMemory;
+ (u_int64_t)appUsedMemory;
#ifdef __LP64__
+ (u_int64_t)deviceUsedMemory;
#endif
+ (u_int64_t)totalDiskSize;
+ (u_int64_t)freeDiskSize;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 95364c2450bd44d4082976bbd247ff9a
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,27 +0,0 @@
//
// OKKeychain.h
// OneKit
//
// Created by bob on 2020/4/26.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface OKKeychain : NSObject
@property (nonatomic, copy, readonly) NSString *service;
@property (nonatomic, assign, readonly) BOOL thisDeviceOnly;
- (instancetype)initWithService:(NSString *)service
thisDeviceOnly:(BOOL)thisDeviceOnly
group:(nullable NSString *)group;
- (NSString *)loadValueForKey:(NSString *)key;
- (BOOL)saveValue:(nullable NSString *)value forKey:(NSString *)key;
- (BOOL)deleteValueForKey:(NSString *)key;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 345d6db644eee4b2baf4136b1c5c419b
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,86 +0,0 @@
//
// OKMacros.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
#ifndef OKMacros_h
#define OKMacros_h
#ifndef OK_WeakSelf
#define OK_WeakSelf __weak typeof(self) wself = self
#endif
#ifndef OK_StrongSelf
#define OK_StrongSelf __strong typeof(wself) self = wself
#endif
#ifndef ok_keywordify
#if DEBUG
#define ok_keywordify autoreleasepool {}
#else
#define ok_keywordify try {} @catch (...) {}
#endif
#endif
#ifndef weakify
#if __has_feature(objc_arc)
#define weakify(object) ok_keywordify __weak __typeof__(object) weak##_##object = object;
#else
#define weakify(object) ok_keywordify __block __typeof__(object) block##_##object = object;
#endif
#endif
#ifndef strongify
#if __has_feature(objc_arc)
#define strongify(object) ok_keywordify __typeof__(object) object = weak##_##object;
#else
#define strongify(object) ok_keywordify __typeof__(object) object = block##_##object;
#endif
#endif
#ifndef OK_Lock
#define OK_Lock(lock) dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER);
#endif
#ifndef OK_Unlock
#define OK_Unlock(lock) dispatch_semaphore_signal(lock);
#endif
#define _OK_CONCAT(A, B) A ## B
#define OKIdentifier(NAME, COUNTER) _OK_CONCAT(NAME, COUNTER)
#define OKSectionNameData(sectname) __attribute((used, no_sanitize_address, section("__DATA,"#sectname" ")))
static inline bool ok_dispatch_is_main_queue() {
return dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL) == dispatch_queue_get_label(dispatch_get_main_queue());
}
static inline bool ok_dispatch_is_main_thread() {
return [NSThread isMainThread];
}
/**
Submits a block for asynchronous execution on a main queue and returns immediately.
*/
static inline void ok_dispatch_async_on_main_queue(void (^block)(void))
{
if (ok_dispatch_is_main_queue()) {
block();
} else {
dispatch_async(dispatch_get_main_queue(), block);
}
}
static inline void ok_dispatch_sync_on_main_queue(void (^block)(void))
{
if (ok_dispatch_is_main_queue()) {
block();
} else {
dispatch_sync(dispatch_get_main_queue(), block);
}
}
#endif /* OKMacros_h */

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 50fb10bb035ed4ea2969f793c0d7d0ef
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,27 +0,0 @@
//
// OKReachability+Authorization.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import "OKReachability.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, OKNetworkAuthorizationStatus) {
/// 程序无法判断出 App 的网络权限设置
OKNetworkAuthorizationStatusNotDetermined = 0,
/// App 未开启蜂窝数据网络权限
OKNetworkAuthorizationStatusCellularNotPermitted,
/// App 未开启无线局域网与蜂窝移动网络权限,此项仅可能在国行 iPhone 手机上出现
OKNetworkAuthorizationStatusWLANAndCellularNotPermitted
};
@interface OKReachability (Authorization)
+ (OKNetworkAuthorizationStatus)currentAuthorizationStatus;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 77bcf0276b60c45299cf5aed45ff00f8
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,38 +0,0 @@
//
// OKReachability+Cellular.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import "OKReachability.h"
#import "OKCellular.h"
NS_ASSUME_NONNULL_BEGIN
@interface OKReachability (Cellular)
+ (BOOL)isNetworkConnected;
/// 优先返回流量卡状态,其次是主卡状态
+ (OKCellularConnectionType)cellularConnectionType;
+ (BOOL)is2GConnected;
+ (BOOL)is3GConnected;
+ (BOOL)is4GConnected;
+ (BOOL)is5GConnected;
+ (nullable NSString*)carrierName;
+ (nullable NSString*)carrierMCC;
+ (nullable NSString*)carrierMNC;
// 返回指定卡 状态
+ (OKCellularConnectionType)cellularConnectionTypeForService:(OKCellularServiceType)service;
+ (BOOL)is3GConnectedForService:(OKCellularServiceType)service;
+ (BOOL)is4GConnectedForService:(OKCellularServiceType)service;
+ (BOOL)is5GConnectedForService:(OKCellularServiceType)service;
+ (NSString *)carrierNameForService:(OKCellularServiceType)service;
+ (NSString *)carrierMCCForService:(OKCellularServiceType)service;
+ (NSString *)carrierMNCForService:(OKCellularServiceType)service;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 515faedc13fc148d59e82d1fde5d57a3
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,32 +0,0 @@
//
// OKReachability.h
// OneKit
//
// Created by bob on 2020/4/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(int32_t, OKReachabilityStatus) {
OKReachabilityStatusNotReachable = 0,
OKReachabilityStatusReachableViaWiFi,
OKReachabilityStatusReachableViaWWAN
};
FOUNDATION_EXTERN NSString *OKNotificationReachabilityChanged;
@interface OKReachability : NSObject
@property (nonatomic, assign, readonly) BOOL telephoneInfoIndeterminateStatus;
+ (instancetype)sharedInstance;
- (void)startNotifier;
- (OKReachabilityStatus)currentReachabilityStatus;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: a4c18355009ca477795e3de1b6d1f6b4
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,77 +0,0 @@
//
// OKResponder.h
//
// Created by Quan Quan on 15/11/5.
// Copyright © 2015 Bytedance. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface OKResponder : NSObject
/**
* @brief Find the responder's NavigationController.
*
* @param responder A View or a ViewController.
*/
+ (nullable UINavigationController *)topNavigationControllerForResponder:(nullable UIResponder *)responder;
/**
* @brief Return the top rootViewController of the current ViewControllers' stack.
*/
+ (nullable UIViewController *)topViewController;
/**
* @brief Is viewController the topViewController?
@param viewController A ViewController.
*/
+ (BOOL)isTopViewController:(nonnull UIViewController *)viewController;
/**
* @brief Return the root view of the top rootViewController in the current ViewControllers' stack.
*/
+ (nullable UIView *)topView;
/**
* @brief Find the top rootViewController from the rootViewController in it's ViewControllers' stack.
*
* @param rootViewController A UIViewController.
*/
+ (nullable UIViewController *)topViewControllerForController:(nonnull UIViewController *)rootViewController;
/**
* @brief Find the top rootViewController from the view in it's ViewControllers' stack.
*
* @param view A UIView.
*/
+ (nullable UIViewController *)topViewControllerForView:(nonnull UIView *)view;
/**
* @brief Find the top rootViewController from the responder in it's ViewControllers' stack.
*
* @param responder A UIResponder.
*/
+ (nullable UIViewController *)topViewControllerForResponder:(nonnull UIResponder *)responder;
/**
* @brief Close the top rootViewController.
*
* @param animated `YES` if the change should be animated, `NO` if the change should happen immediately.
*/
+ (void)closeTopViewControllerWithAnimated:(BOOL)animated;
@end
///////////////////////////////////////////////////////////////////////////////////
@interface UIViewController (OK_Close)
/**
* @brief Close self.
*
* @param animated `YES` if the change should be animated, `NO` if the change should happen immediately.
*/
- (void)closeWithAnimated:(BOOL)animated;
@end

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: a1070d0e70156486dab84ccdfddcb509
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,22 +0,0 @@
//
// OKSandbox.h
// OneKit
//
// Created by bob on 2020/4/26.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface OKSandbox : NSObject
+ (NSString *)appName;/// CFBundleName
+ (NSString *)appDisplayName; /// CFBundleDisplayName
+ (NSString *)appVersion; /// CFBundleShortVersionString
+ (NSString *)appBuildVersion; /// CFBundleVersion
+ (NSString *)bundleID; /// CFBundleIdentifier
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 57f814749e9be474396c4e4b6e1e9b6d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,35 +0,0 @@
//
// OKSdkEventConfig.h
// OneKit
//
// Created by 谭正豪 on 2021/10/18.
//
#ifndef OKSdkEventConfig_h
#define OKSdkEventConfig_h
@interface OKSdkEventConfig : NSObject
/*! @abstract The ID of your sdk that you registered
@discussion Nonnull & required.
*/
@property (atomic, copy) NSString *sdkId;
/*! @abstract Current version of your sdk
@discussion Nonnull & required.
*/
@property (atomic, copy) NSString *sdkVersion;
/*! @abstract The channel where your SDK will be published.
@discussion Nonnull & require. Default : "Other"
*/
@property (atomic, strong) NSString *channel;
/*!
@abstract The name of your SDK.
@discussion Set this property with your SDK name. Nullable & optional.
*/
@property (atomic, copy) NSArray<NSString *> *libNames;
@end
#endif /* OKSdkEventConfig_h */

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 4be9cdca5d607491c875225ac8f19296
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,42 +0,0 @@
//
// OKSectionData.h
// OneKit
//
// Created by bob on 2020/10/2.
//
#import <OneKit/OKMacros.h>
NS_ASSUME_NONNULL_BEGIN
typedef struct _OKString {
const char *key;
const char *value;
} OKString;
#define OKStringUniqueIdentifier OKIdentifier(__OKString, __COUNTER__)
#define OK_STRINGS_EXPORT(key, value) \
OKSectionNameData(__OKString) \
static const OKString OKStringUniqueIdentifier = (OKString){key, value};
/**
e.g
to define values:
OK_STRINGS_EXPORT("key1", "value1")
OK_STRINGS_EXPORT("key1", "value2")
OK_STRINGS_EXPORT("key2", "value1")
to get values:
NSArray *key1 = [OKSectionData exportedStringsForKey:@"key1"];
NSArray *key2 = [OKSectionData exportedStringsForKey:@"key2"];
*/
/// lazy load
@interface OKSectionData : NSObject
+ (nullable NSArray<NSString *> *)exportedStringsForKey:(NSString *)key;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 02c08e79b829c4aadbc5d86c46bf60c8
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,51 +0,0 @@
//
// OKSectionFunction.h
// OneKit
//
// Created by bob on 2020/10/2.
//
#import <OneKit/OKMacros.h>
NS_ASSUME_NONNULL_BEGIN
typedef struct _OKFunction {
const char *key;
const void (*function)(void);
} OKFunction;
#define OKFunctionIdentifier(COUNTER) OKIdentifier(__OneKitFunction, COUNTER)
#define OKFunctionDataIdentifier OKIdentifier(__OneKitFunction_, __COUNTER__)
#define _OK_FUNCTION_EXPORT(key, COUNTER) \
__attribute__((used, no_sanitize_address)) static void OKFunctionIdentifier(COUNTER)(void);\
OKSectionNameData(__OneKitFunction) \
static const OKFunction OKFunctionDataIdentifier = (OKFunction){key, (void *)(&OKFunctionIdentifier(COUNTER))}; \
__attribute__((used, no_sanitize_address)) static void OKFunctionIdentifier(COUNTER)
#define OK_FUNCTION_EXPORT(key) \
_OK_FUNCTION_EXPORT(key, __COUNTER__)
/**
e.g.
1. define function
OK_FUNCTION_EXPORT("a")(void){
printf("\nFunction:test function a");
}
2.call function
[[OKSectionFunction sharedInstance] excuteFunctionsForKey:@"a"];
*/
@interface OKSectionFunction : NSObject
+ (instancetype)sharedInstance;
- (void)excuteFunctionsForKey:(NSString *)key;
/// empty method for swift
- (void)excuteSwiftFunctionsForKey:(NSString *)key;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: 4b5fa7a3602ab44ca87dd912e6e2c679
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,18 +0,0 @@
//
// OKService.h
// OneKit
//
// Created by bob on 2020/5/11.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol OKService <NSObject>
+ (instancetype)sharedInstance;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,27 +0,0 @@
fileFormatVersion: 2
guid: a3bc6a1edc2b6459594b5f14d07642a0
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,40 +0,0 @@
//
// OKServiceCenter.h
// OneKit
//
// Created by bob on 2020/5/11.
//
#import <Foundation/Foundation.h>
@protocol OKService;
NS_ASSUME_NONNULL_BEGIN
@interface OKServiceCenter : NSObject
+ (instancetype)sharedInstance;
/// class should implement OKService
- (void)bindClass:(Class)cls forProtocol:(Protocol *)protocol;
/// object should implement OKService
- (void)bindObject:(id)service forProtocol:(Protocol *)protocol;
- (nullable id)serviceForProtocol:(Protocol *)protocol;
@end
#ifndef OK_CENTER
#define OK_CENTER
#define OK_CENTER_OBJECT(theProtocol) \
[[OKServiceCenter sharedInstance] serviceForProtocol:@protocol(theProtocol)]
#define OK_CENTER_BIND_CLASS_PROTOCOL(theClass, theProtocol) \
[[OKServiceCenter sharedInstance] bindClass:theClass forProtocol:@protocol(theProtocol)]
#define OK_CENTER_BIND_OBJECT_PROTOCOL(theObject, theProtocol) \
[[OKServiceCenter sharedInstance] bindObject:theObject forProtocol:@protocol(theProtocol)]
#endif
NS_ASSUME_NONNULL_END

Some files were not shown because too many files have changed in this diff Show More