diff --git a/COSBeaconAPI_Base.xcframework/Info.plist b/COSBeaconAPI_Base.xcframework/Info.plist new file mode 100644 index 0000000..9320043 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/Info.plist @@ -0,0 +1,57 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_x86_64-maccatalyst + LibraryPath + COSBeaconAPI_Base.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + COSBeaconAPI_Base.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + COSBeaconAPI_Base.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/COSBeaconAPI_Base b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/COSBeaconAPI_Base new file mode 100644 index 0000000..d345d93 Binary files /dev/null and b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/COSBeaconAPI_Base differ diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInfoModel.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInfoModel.h new file mode 100644 index 0000000..2654ddf --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInfoModel.h @@ -0,0 +1,147 @@ +// +// COSBeaconBaseInfoModel.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/14. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import +#import "COSBeaconOStarContent.h" +#import "COSBeaconReportConfig.h" + + +typedef enum : NSInteger +{ + COSBeaconNotReachable = 0, + COSBeaconReachableViaWiFi, + COSBeaconReachableViaWWAN, + COSBeaconReachableUnknow +} COSBeaconNetworkStatus; + +@class COSBeaconLocalConfig; + +NS_ASSUME_NONNULL_BEGIN + +/** + 灯塔SDK采集的公共基础信息 + 存储在单例里的属性,在多线程,采用atomic控制线程同步,重写set/get方法的属性需手动控制同步,不同步的属性在多线程时可能引起crash或计算结果不是预期的 + */ +@interface COSBeaconBaseInfoModel : NSObject + +/// 主App的appKey +@property (copy) NSString *mainAppKey; +/// 上报策略配置 +@property (strong) COSBeaconReportConfig *config; +/// 缓存各appKey的的附加参数,以通道的appKey作为key进行缓存 +@property (copy) NSMutableDictionary *additionalInfoDict; +/// 缓存各appKet的的userId,以通道的appKey作为key进行缓存 +@property (copy) NSMutableDictionary *userIdDict; +/// 缓存各appKet的的openId,以通道的appKey作为key进行缓存 +@property (copy) NSMutableDictionary *openIdDict; + + +/// COSBeaconOStar对象 +@property (nonatomic, strong) COSBeaconOStarContent *ostar; +/// ostarSDK版本号 +@property (copy) NSString *ostarVersion; + + +/// bundle相关 +@property (copy, readonly) NSString *bundleId; +/// 平台 id +@property (assign, readonly) int platformId; +/// 网关 ip +@property (copy) NSString *gatewayIP; +/// 硬件型号 +@property (copy, readonly) NSString *hardwareModel; +/// 国家 +@property (copy, readonly) NSString *country; +/// 语言 +@property (copy, readonly) NSString *language; +/// 单位GB +@property (assign, readonly) long long romSize; +/// openuuid 自建 +@property (copy, readonly) NSString *openUdid; +/// idfv +@property (copy) NSString *idfv; +/// idfa +@property (copy) NSString *idfa; +/// 是否越狱 +@property (assign, readonly) BOOL isReet; +/// 主通道的channelId +@property (copy) NSString *channelId; +/// 分辨率 +@property (copy, readonly) NSString *resolution; +/// sessionId +@property (copy) NSString *sessionId; + +/// 缓存服务端返回的sId,请求时带上,给服务端从缓存取解密后的密钥 +@property (copy) NSString *sId; + +/// 版本相关 +@property (copy) NSString *appVersion; +/// sdk 版本 +@property (copy, readonly) NSString *sdkVersion; +/// 系统版本 +@property (copy, readonly) NSString *osVer; +/// 系统版本 +@property (assign, readonly) float osVerFloat; +/// 是否纯新增用户,纯新增用户的定义是首次在某台设备上安装APP,卸载重装的不算纯新增 +@property (assign) BOOL isnew; +/// 是否版本新增用户 +@property (assign) BOOL isNewWithVer; +/// 是否升级版本 +@property (assign, readonly) BOOL versionChanged; +/// sdk是否升级版本 +@property (assign, readonly) BOOL sdkVersionChanged; + +/// 网络相关 +@property (copy, nullable) NSString *wifiName; +/// imsi +@property (copy, readonly) NSString *imsi; +/// mac +@property (copy, nullable) NSString *wifiMac; +/// 终端获取的APN信息(cmwap、cmnet等) +@property (copy) NSString *apn; +/// 网络状态 +@property (assign) COSBeaconNetworkStatus currentNetStatus; +/// all_ssid +@property (copy, readonly) NSString *wlanDevices; + +/// APP或者此SDK在运行过程中的一些运行时参数的模型类 +@property (strong) COSBeaconLocalConfig *localConfig; +/// 是否在后台 +@property (assign) BOOL isBackground; +/// 是否模拟器 +@property (assign, readonly) BOOL isSimulator; +/// 是否冷启动 +@property (assign) BOOL isCold; +/// 启动来源 +@property (copy) NSString *launchSource; +/// 设备名 +@property (copy, readonly) NSString *deviceName DEPRECATED_MSG_ATTRIBUTE("安全合规建设,4.2.75以后不再采集"); +/// 设备型号 +@property (copy, readonly) NSString *deviceModel; +/// 设备类型 +@property (copy, readonly) NSString *deviceType; +/// 电池 +@property (copy, readonly) NSString *battery; +/// aesKey +@property (copy) NSString *aesKey; +/// 加密 key +@property (nonatomic, copy) NSString *aesKeyEncrypt; +/// 与服务器进行时钟同步的时间差(单位毫秒) +@property (assign) NSTimeInterval serverTimeDelta; +/// app安装时间 +@property (assign, readonly) long long appInstallTime; + +// 延迟初始化相关需要耗时的参数,需在子线程调用 +- (void)initBaseInfo; + +// 初始化最基础infos,目前(4.1.29)只在检查appkey为异常时的201错误上报使用。 +- (void)initBaseSimpleInfo; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInterface.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInterface.h new file mode 100644 index 0000000..ddb769f --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInterface.h @@ -0,0 +1,213 @@ +// +// COSBeaconBaseInterface.h +// +// Created by tencent on 16/1/19. +// Copyright © 2016年 tencent. All rights reserved. +// + +#import "COSBeaconEventUploader.h" +#import "COSBeaconBaseInfoModel.h" + +#define COSBeacon_CLASS_DEPRECATED_APP(versionBegin, versionDeprecated, description, ...) __attribute__((deprecated("从 "#versionDeprecated" 版本开始废弃, "#description", "#__VA_ARGS__""))) __attribute__((weak_import)) +COSBeacon_CLASS_DEPRECATED_APP(1.0.0, 3.2.0, "推荐使用COSBeaconReport类") +@interface COSBeaconBaseInterface : NSObject + +//设置appKey(灯塔事件),启动灯塔SDK ++ (void)setAppKey:(NSString *)appKey; + +//1 fetal 2 error 3 warn 4 info +//in debug version: 5 debug 10 all ++ (void)setLogLevel:(int)logLevel; + +//得到灯塔sdk的版本 ++ (NSString *)getSDKVersion; + +//打开事件上报功能的开关 ++ (BOOL)enableEventRecord:(BOOL)enable; + +//实时用户事件上报通用接口,该接口会保存用户事件实时上报 +//event 事件名称 isSucceed 事件执行是否成功 elapse 事件执行耗时,单位ms size 上报包大小,单位kb params 其他参数,用户自定义 ++ (BOOL)onDirectUserAction: (NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDirectUserAction: (NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; + ++ (BOOL)onDirectUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDirectUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; + +//用户事件上报通用接口,该接口会保存用户事件到本地,根据上报策略择机上报 +//event 事件名称 isSucceed 事件执行是否成功 elapse 事件执行耗时,单位ms size 上报包大小,单位kb params 其他参数,用户自定义 ++ (BOOL)onUserAction:(NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onUserAction: (NSString*) eventName isSucceed:(BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params isOnlyWifiUpload:(BOOL)isOnlyWifiUpload; + ++ (BOOL)onUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isSucceed:(BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params isOnlyWifiUpload:(BOOL)isOnlyWifiUpload; + +// 大同SDK 专属接口 其他三方禁止调用 ++ (BOOL)onDTDirectUserAction: (NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDTDirectUserAction: (NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; +/// 大同多通道上报接口 ++ (BOOL)onDTDirectUserActionToTunnel:(NSString *)appKey eventName: (NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDTDirectUserActionToTunnel:(NSString *)appKey eventName: (NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; + +//设置实时事件上报的间隔,默认为5s,单位是秒 保护区间<=60 >=1 ++ (void)setUserRealEventDurationSecond:(int)seconds; + +//设置实时事件每次上报的最大上报条数, 默认为24,保护区间<=50 >=1 ++ (BOOL)setRealTimeEventUploaMaxCount:(int)maxPkgSize; + +//为通道设置userId ++ (void)setUserIdToTunnel:(NSString *)appKey userId:(NSString *)userId; + +//为主通道设置渠道 ++ (void)setChannelIdToTunnel:(NSString *)appKey channelId:(NSString *)channelId; + +//设置一个GUID的标识,用以通过GUID标识和分类异常用户信息 ++ (void)setGUID:(NSString *)guid; + +//更换用户时设置userId ++ (void)setUserId:(NSString *)userId; + +//打开海外版本,需要在初始化之前设置,默认关闭 ++ (void)enableAbroad:(BOOL)enalbe; + +//sessionid 设置sessionid可以帮您区分哪些事件属于同一次会话 ++ (void)setSessionid:(NSString *)sessionid; + ++ (NSString *)getSessionid; + +//设置omgId ++ (void)setOmgId:(NSString *)omgId; + +//设置渠道(灯塔事件) ++ (void)setChannelId:(NSString*)chanId; + +//设置appVersion ++ (void)setAppVersion:(NSString *)bundleVer; + ++ (void)setGatewayIp:(NSString *)gateWayIp; + +//设置事件上报的最大累计上报条数(满足条数即上报),及本地数据库的最大容量(超过限额不予存储) +//默认分别为20 10000,保护区间10~100, 100~10000 +//注意:采用默认调用方式,sdk会在与服务器通讯获取策略后更新本地策略,所以该模式下调用该API无效 ++ (BOOL)setStrategyForMaxPkgSize:(int)maxPkgSize dbMaxSize:(int)dbMaxSize; + +//登录事件 ++ (BOOL)onLogin: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//上传图片事件 ++ (BOOL)onUploadPicture: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//写日志事件 ++ (BOOL)onWriteBlog: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; + +//启动事件 ++ (BOOL)onStart: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//写操作 ++ (BOOL)onWrite: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//刷新操作 ++ (BOOL)onRefresh: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//界面渲染 ++ (BOOL)onRender: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; + +/** + 主通道的通用参数, 设置所有事件都会带的参数 + **/ ++ (void)setAdditionalInfo:(NSDictionary *)dic; + ++ (COSBeaconEventUploader *)getMixDataUploader; + +/** + 提供一个Model存放所有灯塔已默认采集的公参 + **/ ++ (COSBeaconBaseInfoModel *)getCommonParams; + +//2.3.4 +/** + * 事件接口总开关 + * @param isEventUpOnOff 默认为YES + */ ++ (void)setEventUpOnOff:(BOOL)isEventUpOnOff; + +/** + * 设置严苛模式用于上线前排查问题, 严苛模式下SDK会主动触发crash, 默认关闭,上线请务必关闭!!!!!!!!!!! + */ ++ (void)setStrictModeOnOff:(BOOL)yesOrNo; + + +#pragma mark -- 已废弃的无效接口 +//sdk的状态,未开启,初始化中,初始化完成,与服务器同步完成,错误 +typedef enum { + notenabled, initialing, initialed, syncedwithserver, initerror +} sdkstatus; + +//获取当前sdk的运行状态 ++ (sdkstatus)getSDKStatus; + +//设置sdk进行与服务器同步的延时(初次启动不会有延时,如果上次发生crash也不会延迟) +//主要是控制sdk在启动过程中占用更多资源 ++ (void)setSynchServerTimerDelay:(int)delay; + +//注册监控服务,将会向服务器查询策略,并初始化各个模块的默认数据上传器,参数userId为用户qua,参数gateWayIP为当前网络网关IP,不填则默认使用服务器下发的IP ++ (BOOL)enableAnalytics:(NSString *)userId gatewayIP:(NSString *)gatewayIP; + ++ (BOOL)enableAnalyticsWithoutNetwork:(NSString *)userId gatewayIP:(NSString *)gatewayIP; + +//注册通道 ++ (void)registerTunnel:(NSString *)appKey userId:(NSString *)userId channelId:(NSString *)channelId appVersion:(NSString *)appVersion; + +//为通道设置app版本 ++ (void)setAppVersionToTunnel:(NSString *)appKey appVersion:(NSString *)appVersion; + +//该开关为YES的时候会在本地策略生效的时候就开启功能开关(测速/异常),等服务器策略生效后再更新一次 +//如果为NO那么会等到服务器策略生效后才开启功能开关 +//影响范围:服务器策略生效之前的事件记录和异常处理函数的问题注册 ++ (BOOL)enableModuleFunctionBeforeSeverStrategy:(BOOL)enable; + +/** + 测试接口,只在Test的模式下生效 + **/ +// 这是控查询serverUlr ++ (BOOL)setAnalyticsServer:(NSString *)serverUrl; + +//开启和关闭灯塔上报(包括属性采集/启动上报/退出事件/使用状况上报) ++ (BOOL)setEnableReport:(BOOL)enabled; + +//1.8.4 +/** + * wifi上报控制 + */ ++ (void)isOnlyWifiUpload:(BOOL)yesOrNo; + +/** + * 临时关掉灯塔上报, 达到上报条件的事件先存数据库 + */ ++ (void)setEventUploadClose:(BOOL)isClose; + +// 1.9.0实时联调测试功能 ++ (void)setAccessTest:(BOOL)yesOrNo; + +/** + * 业务事件接口开关 + * @param isBizEventUpload 默认为YES + */ ++ (void)setBizEventUpload:(BOOL)isBizEventUpload; + +/** + * 路径分析功能开启/关闭接口,默认关闭此功能 + */ ++ (void)enablePagePath:(BOOL)yesOrNo; + +/** + * Socket上报开启/关闭接口,默认开启 + */ ++ (void)setSocketOnOff:(BOOL)yesOrNo; + +/** + * 进入页面跟踪,在viewWillAppear或viewDidAppear方法里调用此方法 + */ ++ (void)onPageBegin:(NSString *)pageName; + +/** + * 离开页面跟踪,在viewWillDisappear或viewDidDisappear方法里调用此方法 + */ ++ (void)onPageEnd:(NSString *)pageName; + + +@end diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconCallBackManager.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconCallBackManager.h new file mode 100644 index 0000000..cd3ac2c --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconCallBackManager.h @@ -0,0 +1,40 @@ +// +// COSBeaconCallBackManager.h +// COSBeaconAPI_Base +// +// Created by 吴小二哥 on 2021/9/17. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import +#import "COSBeaconResult.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^COSBeaconMsfSendCallback)(COSBeaconMsfSendResult *beaconResult); + +/** + * 长连接Msf回调Manger,Msf是通过代理方式回调手Q端,为了简化手Q接入逻辑,多线程代理回调由灯塔内部处理. + */ +@interface COSBeaconCallBackManager : NSObject + ++ (instancetype)sharedInstance; + +/** + * 获取callback记录个数 + */ +- (NSInteger)getCallbackMapCount; + +/** + * 灯塔内部存储callback并关联sequenceId + */ +- (void)addCallBack:(COSBeaconMsfSendCallback )beaconCallBack withSequenceId:(NSInteger )sequenceId; + +/** + * msf 回调接入层回调灯塔 + */ +- (void)callBackSendResult:(COSBeaconMsfSendResult *)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconEvent.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconEvent.h new file mode 100644 index 0000000..aa7849a --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconEvent.h @@ -0,0 +1,87 @@ +// +// COSBeaconEvent.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/6. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 事件类型 +typedef NS_ENUM(NSInteger, COSBeaconEventType) { + COSBeaconEventTypeNormal, // 普通事件 + COSBeaconEventTypeRealTime, // 实时事件 + COSBeaconEventTypeDTNormal, // 普通的大同事件,大同SDK业务专用 + COSBeaconEventTypeDTRealTime, // 实时的大同事件,大同SDK业务专用 + COSBeaconEventTypeImmediate, // 立即上报的事件,相对于实时事件有更高的上报及时性 +}; + +/** + 事件(model)类:业务方通过COSBeaconEvent对象封装事件各种参数 + */ +@interface COSBeaconEvent : NSObject + +/// 事件上报的归属appkey,如果不设置,则默认是start初始化接口设置的appkey +/// !!!为明确上报到哪个appkey,推荐接入方都主动设置自己的appkey +@property (nonatomic, copy, nullable) NSString *appKey; + +/// 事件标识code,接入方设置的对事件的唯一标识,后续数据分析可以通过事件code区分事件, +/// 如'APP启动事件'可定义code为:app_launch,'首页页面曝光事件'可定义为:homepage_exposure +@property (nonatomic, copy) NSString *code; + +/// 事件类型,默认是普通事件 +@property (nonatomic, assign) COSBeaconEventType type; + +/// 事件是否执行成功,默认YES +@property (nonatomic, assign) BOOL success DEPRECATED_MSG_ATTRIBUTE("在4.0+版本已废弃,可不设置"); + +/// 事件的自定义参数,key和value类型要求是NSString或者NSNumber类型,使用其他类型的事件不会上报 +/// 单个value的长度最大为20K,超出20K部分会被截断后上报,所有value长度之和最大为45k,超过45k不会上报此条事件 +@property (nonatomic, strong, nullable) NSDictionary *params; + + + +/// 标记事件是否是O16和O36都为空的补报事件 +@property (nonatomic, assign) BOOL reportAgainAfterOStarNotNull; + +/// 实时事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 ++ (instancetype)realTimeEventWithCode:(NSString *)code params:(nullable NSDictionary *)params DEPRECATED_MSG_ATTRIBUTE("在4.2.73+版本已废弃,请使用realTimeEventWithCode:appKey:params:"); + +/// 实时事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 +/// @param appKey 事件所上报的appkey ++ (instancetype)realTimeEventWithCode:(NSString *)code appKey:(NSString *)appKey params:(nullable NSDictionary *)params; + + +/// 普通事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 ++ (instancetype)normalEventWithCode:(NSString *)code params:(nullable NSDictionary *)params DEPRECATED_MSG_ATTRIBUTE("在4.2.73+版本已废弃,请使用normalEventWithCode:appKey:params:"); + +/// 普通事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 +/// @param appKey 事件所上报的appkey ++ (instancetype)normalEventWithCode:(NSString *)code appKey:(NSString *)appKey params:(nullable NSDictionary *)params; + +/// 构造函数,兼容老版本的事件初始化 +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +/// @param code 事件标识code +/// @param type 事件类型 +/// @param success 事件是否执行成功 +/// @param params 事件的自定义参数 +- (instancetype)initWithAppKey:(nullable NSString *)appKey + code:(NSString *)code + type:(COSBeaconEventType)type + success:(BOOL)success + params:(nullable NSDictionary *)params; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconEventUploader.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconEventUploader.h new file mode 100644 index 0000000..f586d0e --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconEventUploader.h @@ -0,0 +1,30 @@ +// +// COSBeaconEventUploader.h +// COSBeacon +// +// Created by dong kerry on 12-3-5. +// Copyright (c) 2012年 tencent.com. All rights reserved. +// + +@class COSBeaconEventRecord; + +/** + 事件上报器:内部开启轮询,定时查询本地的事件并上报 + */ +@interface COSBeaconEventUploader : NSObject +/// 上报 url +@property (atomic, retain) NSString *uploadUrl; + +/// 默认上报器(主通道),内部会开启定时器轮询上报 ++ (COSBeaconEventUploader *)defaultUploader; + +/// 无论数据库存储的事件有多少条都立即上报,且如果定时器没有开启,则开启定时器轮询 +- (void)uploadImmediately; + +/// 事件不入DB,直接进行上报 +- (void)uploadEventsInMemory:(NSArray *)eventRecords; + +/// 如果定时器没有开启,则开启定时器轮询 +- (void)openTimerAgain; + +@end diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconMsfSendArgs.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconMsfSendArgs.h new file mode 100644 index 0000000..83e0dd2 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconMsfSendArgs.h @@ -0,0 +1,24 @@ +// +// COSBeaconMsfSendArgs.h +// COSBeaconAPI_Base +// +// Created by 吴小二哥 on 2021/4/27. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * 转发Msf携带的参数对象 + */ +@interface COSBeaconMsfSendArgs : NSObject +/// 业务上报的事件的二进制内容 +@property (nonatomic, strong) NSData *data; +/// 请求命令字 +@property (nonatomic, copy) NSString *command; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconOStarContent.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconOStarContent.h new file mode 100644 index 0000000..b102ddc --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconOStarContent.h @@ -0,0 +1,22 @@ +// +// COSBeaconOStarContent.h +// COSBeaconAPI_Base +// +// Created by 吴小二哥 on 2021/7/8. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@interface COSBeaconOStarContent : NSObject +/// o16,A3字段 +@property (nonatomic, copy, nullable) NSString *o16; +/// o36,A153字段 +@property (nonatomic, copy, nullable) NSString *o36; + +- (instancetype)initWithO36:(NSString *)o36 withO16:(NSString *)o16; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconQUICArgs.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconQUICArgs.h new file mode 100644 index 0000000..f6ac813 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconQUICArgs.h @@ -0,0 +1,32 @@ +// +// COSBeaconTransferArgs.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2021/3/2. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * QUIC转发传递的参数对象 + */ +@interface COSBeaconQUICArgs : NSObject + +/// 请求实体 +@property (nonatomic, copy) NSMutableURLRequest *reqeust; + +/// 连接超时时间 +@property (nonatomic, assign) NSTimeInterval connectTimeoutMillis; + +/// 事件名 +@property (nonatomic, copy) NSString *eventCode; + +/// 事件appkey +@property (nonatomic, copy) NSString *appKey; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconReport.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconReport.h new file mode 100644 index 0000000..7350834 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconReport.h @@ -0,0 +1,170 @@ +// +// COSBeacon.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/6. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import +#import "COSBeaconResult.h" +#import "COSBeaconEvent.h" +#import "COSBeaconBaseInfoModel.h" +#import "COSBeaconReportConfig.h" +#import "COSBeaconQUICArgs.h" +#import "COSBeaconMsfSendArgs.h" +#import "COSBeaconCallBackManager.h" +NS_ASSUME_NONNULL_BEGIN + + +typedef void (^COSBeaconQUICCallback)(COSBeaconQUICArgs *args, COSBeaconQUICResult *result); + +typedef void (^COSBeaconMsfSendCallback)(COSBeaconMsfSendResult *beaconResult); +/** + 长连接网络数据传输的适配协议(可选):当业务对灯塔上报数据实时性有要求时,可开启长连接上报功能. + 开启此功能需要业务集成TQUIC SDK. 初始化TQUIC SDK并实现TUQIC SDK数据传输的代理接口. + */ +@protocol COSBeaconTransferProtocal +@optional +/// QUIC 数据传输的代理接口 +- (void)transferArgs:(COSBeaconQUICArgs *)args + delegate:(COSBeaconQUICCallback)callBack; + +/** + * MSFSDK数据传输的代理接口 + * callbackManager: 回调管理类. 收到msf回调后,接入层可以通过COSBeaconCallBackManager单例对象,直接调用callBackSendResult回传结果.4.1.36版本msfSDK 是通过代理回调结果,为了简化接入层逻辑,所以这里构建了COSBeaconCallBackManager中间层. + * return: sequenceId. 接入层需要保证sequenceId合法,非法id(如:0,nil,NULL)灯塔会拦截走原通道, 非法情况下继续调 MSF,有可能造成数据重复. + */ +- (NSInteger)sendArgs:(COSBeaconMsfSendArgs *)beaconArgs callback:(COSBeaconCallBackManager *)callbackManager; + + +@end + +/// COSBeaconMttProtocal穿上甲日志协议 +@protocol COSBeaconMttProtocal +- (void)mttLog:(NSString *)message + file:(const char *)file + function:(const char *)function + line:(NSUInteger)line + threadID:(NSInteger)threadID + module:(NSString *)module + folder:(int)folder level:(int)level; + +@end + +extern BOOL COSBeaconHasStarted; + +/** + 上报模块的接口类:提供SDK对外API + */ +@interface COSBeaconReport : NSObject + +/// 原来使用的设备标识符,通过OMGID SDK获取 +@property (copy, nullable) NSString *omgId; + +/// 渠道ID +@property (copy, nullable) NSString *channelId; + +/// 是否开启严苛模式,默认为NO,严苛模式开启时用于上线前排查问题, SDK会主动触发crash, 上线务必关闭!!! +@property (assign) BOOL strictMode; + +/// 设置本地调试时控制台输出的日志级别:1 fetal, 2 error, 3 warn, 4 info, debug, 5 debug, 10 all, 默认为0,不打印日志 +/// 线上正式环境,必须设置为0关闭此日志 +@property (nonatomic, assign) int logLevel; + +/// 是否采集WiFiMac地址,参数为NO时不采集,默认采集,如果需要关闭则需要在初始化前设置为NO +@property (assign) BOOL collectMacEnable DEPRECATED_MSG_ATTRIBUTE("4.2.74以后不再采集,如需使用请自行采集后通过[COSBeaconReport.sharedInstance setWifiName:/setWifiMac:]填充"); + +/// 是否采集idfa,参数为NO时不采集,默认采集,如果需要关闭则需要在初始化前设置为NO +@property (assign) BOOL collectIdfaEnable DEPRECATED_MSG_ATTRIBUTE("4.2.74以后不再采集,如需使用请自行采集后通过[COSBeaconReport.sharedInstance setIDFA:]填充"); + + +/// 是否采集idfv,默认采集。无特殊情况不要关闭 ! 若关闭后务必在授权后填充IDFV(setIDFV:) +@property (assign) BOOL collectIdfvEnable; + +/// 网络数据传输通道代理 +@property (nonatomic, weak) id transferDelegate; + +/// 穿山甲日志代理 +@property (nonatomic, weak) id mttDelegate; + + ++ (COSBeaconReport *)sharedInstance; + +/** + * 初始化接口,开启灯塔服务,会向服务器查询策略,初始化各个模块的默认数据上传器等 + * 1.宿主(应用)集成灯塔时: + * a:建议在didFinishLaunchingWithOptions中最早位置调用灯塔,避免其他组件SDK提前初始化灯塔而引起数据错误问题. + * b:应用中多份组件SDK同时使用灯塔,强烈建议配置COSBeaconInfo.plist文件记录beacon_main_appkey, + * 配置后灯塔初始化以配置文件为准,所以务必确保配置文件appkey正确!! 非必要情况不要修改配置文件!! + * 2.二方(中台,组件)SDK集成灯塔: + * a:使用公版灯塔(和宿主共用)情况下, 禁止调用此方法!!! + * b:使用前缀版本灯塔情况下,需要调用此方法. 通常一个二方SDK业务对应一份前缀版本灯塔,彼此是相互隔离. + * @param appKey 各业务在灯塔平台申请的业务唯一标识 + * @param config 全局配置,可配置一些开关和策略等 + */ +- (void)startWithAppkey:(NSString *)appKey config:(nullable COSBeaconReportConfig *)config; + +/// 上报事件 +/// @param event 事件,包括所有用户行为事件、APP启动事件等,事件的具体定义参考COSBeaconEvent模型类 +/// @return 返回事件上报结果,此同步返回的结果只代表事件符合上报要求,可以进行上报, +/// 但不一定代表事件当前已成功上报到服务端,有可能存在事件在本地缓存并等待上报等情况 +- (COSBeaconReportResult *)reportEvent:(COSBeaconEvent *)event; + +/// 给指定的appKey设置附加参数,此appKey的所有事件都会带上这些参数 +/// @param additionalParams 附加参数 +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +/// @return 返回设置参数结果,参数非法将返回NO, 设置成功返回 YES. (参数类型要求是:NSNumber 和 NSString) +- (BOOL)setAdditionalParams:(NSDictionary *)additionalParams forAppKey:(NSString *)appKey; + +/// 用户设置抽样事件,根据appkey和eventCode进行抽样 +/// @param appkey 多通道 +/// @param sampleEventDict key是事件名(EventCode),value是抽样比例的分子,分母固定10000,分子区分范围:0~10000. +/// 比如,输入1代表抽样留万分之一,输入10代表抽样留千分之一,输入0为不上报 +/// @return 返回设置抽样配置结果,参数非法将返回NO, 设置成功返回 YES +- (BOOL)setUserSampleEvents:(NSDictionary *)sampleEventDict forAppKey:(NSString *)appkey; + +/// 给指定的appKey设置userId +/// @param userId 用户唯一标识符 +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +- (void)setUserId:(NSString *)userId forAppKey:(NSString *)appKey; + +/// 给指定的appKey设置openid +/// @param openId 小程序、H5设置的开放平台的id +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +- (void)setOpenId:(NSString *)openId forAppKey:(NSString *)appKey; + + +/** + * 设置O16和O36参数 + * 填充设备id: 灯塔默认只使用IDFV来区分设备, 通常建议集成时填充稳定的设备ID, 比如IDFA,或者专门的SDK产生的设备ID + */ +- (void)setOStarO16:(NSString *)o16 o36:(nullable NSString *)o36; + +/// 把OStarSDK的版本号透传给灯塔 +- (void)setOStarVersion:(NSString *)ostarVersion; + +/// 默认不采集idfa,由需采集idfa的应用宿主填充. +- (void)setIDFA:(NSString *)idfa; + +/// 默认采集IDFV,业务如有关闭IDFV,用户同意隐私采集后,需填充给灯塔 +- (void)setIDFV:(NSString *)idfv; + +/// 设置wifiName. 用户授权隐私数据采集后,可统一采集后填充到灯塔 +- (void)setWifiName:(NSString *)wifiName; + +/// 设置wifiMac. 用户授权隐私数据采集后,可统一采集后填充到灯塔 +- (void)setWifiMac:(NSString *)wifiMac; + + +/// 获取所有灯塔已默认采集的公参 +- (COSBeaconBaseInfoModel *)getCommonParams; + +///Socket上报开启/关闭接口,默认YES,如果需要关闭则需要设置为NO +- (void)setSocketOnOff:(BOOL)yesOrNo; + +@end + +NS_ASSUME_NONNULL_END + +#define BEACON_SDK_VERSION @"4.2.76.52" \ No newline at end of file diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconReportConfig.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconReportConfig.h new file mode 100644 index 0000000..ac79072 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconReportConfig.h @@ -0,0 +1,60 @@ +// +// COSBeaconReportConfig.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2014/4/8. +// Copyright © 2014 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +typedef NS_ENUM(NSInteger, COSBeaconCompressionType) { + COSBeaconCompressionGZIP = 2, // GZIP压缩(默认) + COSBeaconCompressionLZMA = 4, // LZMA +}; + +/** + 基础策略配置:通过此配置类可以灯塔基础配置项进行硬编码设置,如果进行云配置可联系对接人. + */ +@interface COSBeaconReportConfig : NSObject + +/// 开启或者关闭事件上报功能,默认为YES可进行上报,如果有给用户提供关闭事件上报的接口等情况,可设置为NO. 关闭后事件不作任何处理 +@property (nonatomic, assign) BOOL eventReportEnabled; + +/// 开启或关闭内置事件上报, 默认为YES开启。 如果需要关闭, 可设置为NO, 关闭后拦截内置事件:[rqd_applaunched, rqd_appresumed, rqd_appexited, rqd_heartbeat] +@property (nonatomic, assign) BOOL internalEventEnabled; + +/// 开启或者关闭策略请求功能,默认为YES进行策略请求,如果需要关闭,可设置为NO +@property (nonatomic, assign) BOOL configQueryEnabled; + +/// 事件轮询上传开关,默认打开. 关闭后业务生成的事件会入库,但不上传到服务端,达到DB上限后丢弃剩余事件. +@property (nonatomic, assign) BOOL eventUploadEnabled; +/// 二进制请求包压缩方式,默认GZIP +@property (nonatomic, assign) COSBeaconCompressionType compressionType; + +/// 本地数据库的最大容量(超过限额不予存储),默认10000条,保护区间是100~100000条,云端优先级高于本地设置 +@property (nonatomic, assign) NSInteger maxDBCount; + +/// 实时事件上报的轮询间隔,默认2s,允许区间是[0.1,20]s +@property (nonatomic, assign) NSInteger realTimeEventPollingInterval; +/// 普通事件上报的轮询间隔,默认5s,允许区间是[1,50]s +@property (nonatomic, assign) NSInteger normalEventPollingInterval; +/// 实时事件上报条数,默认48s,允许区间是[10,1000] +@property (nonatomic, assign) NSInteger realTimeEventMaxUploadCount; +/// 普通事件上报条数,默认48s,允许区间是[10,1000] +@property (nonatomic, assign) NSInteger normalEventMaxUploadCount; +/// 上报后及时补报开关 默认为YES开启。 如果需要关闭, 可设置为NO +@property (nonatomic, assign) BOOL uploadImmediatelyEnabled; +/// 当使用QUIC 上报时是否开启7层,默认NO +@property (nonatomic, assign) BOOL H3OverQUICEnabled; + +/// 事件上报服务的域名,一般不需要设置,有特殊需求时找SDK同学对接 +@property (nonatomic, copy, nullable) NSString *uploadURL; + +/// 配置服务的域名,一般不需要设置,有特殊需求时找SDK同学对接 +@property (nonatomic, copy, nullable) NSString *configURL; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconResult.h b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconResult.h new file mode 100644 index 0000000..79b84e8 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_armv7/COSBeaconAPI_Base.framework/Headers/COSBeaconResult.h @@ -0,0 +1,71 @@ +// +// COSBeaconResult.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/6. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, COSBeaconResultType) { + COSBeaconResultTypeSuccess = 0, // 成功 + COSBeaconResultTypeIllegalParameters, // 参数非法,一般是接口入参校验不通过 + COSBeaconResultTypeConfigOff, // 配置关闭,导致上报失败或者不需要上报 + COSBeaconResultTypeParamsExceededLength, // 参数长度过长 + COSBeaconResultTypeSDKNotStarted, // SDK未初始化就进行上报 + COSBeaconResultTypeUnknow, // 未知错误 +}; +/** + COSBeaconBaseResult:基础结果类 + */ +@interface COSBeaconBaseResult : NSObject + +/// 上报结果的状态类型,此结果类型一般只代表事件在本地校验的结果,不一定代表事件成功上报到服务端 +@property (nonatomic, assign) COSBeaconResultType type; + +/// 具体错误信息,成功时为空 +@property (nonatomic, copy) NSString *errorMessage; + +/// 事件ID,实时和普通事件的id分开计算,有可能相同 +@property (nonatomic, copy) NSString *eventId; + +@end + +/** + COSBeaconReportResult:上报事件结果类 + */ +@interface COSBeaconReportResult : COSBeaconBaseResult +@end + +/** + COSBeacon QUIC 回调参数对象 + */ +@interface COSBeaconQUICResult : NSObject + +@property(nonatomic, strong) NSURLResponse * _Nonnull response; + +@property(nonatomic, strong) id _Nonnull responseObject; + +@property(nonatomic, strong) NSError * _Nonnull error; + +@end + +/** + MSFSDK 发送数据结果回调: 0 代表成功 非零则是对应错误码 + */ +@interface COSBeaconMsfSendResult : NSObject +/// sequenceId +@property(nonatomic, assign) NSInteger sequenceId; +/// 发送状态码 +@property(nonatomic, assign) NSInteger sendCode; +/// 发送错误信息 +@property(nonatomic, copy) NSString *sendMsg; + + +@end + + + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/COSBeaconAPI_Base b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/COSBeaconAPI_Base new file mode 100644 index 0000000..0ea4e2f Binary files /dev/null and b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/COSBeaconAPI_Base differ diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInfoModel.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInfoModel.h new file mode 100644 index 0000000..2654ddf --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInfoModel.h @@ -0,0 +1,147 @@ +// +// COSBeaconBaseInfoModel.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/14. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import +#import "COSBeaconOStarContent.h" +#import "COSBeaconReportConfig.h" + + +typedef enum : NSInteger +{ + COSBeaconNotReachable = 0, + COSBeaconReachableViaWiFi, + COSBeaconReachableViaWWAN, + COSBeaconReachableUnknow +} COSBeaconNetworkStatus; + +@class COSBeaconLocalConfig; + +NS_ASSUME_NONNULL_BEGIN + +/** + 灯塔SDK采集的公共基础信息 + 存储在单例里的属性,在多线程,采用atomic控制线程同步,重写set/get方法的属性需手动控制同步,不同步的属性在多线程时可能引起crash或计算结果不是预期的 + */ +@interface COSBeaconBaseInfoModel : NSObject + +/// 主App的appKey +@property (copy) NSString *mainAppKey; +/// 上报策略配置 +@property (strong) COSBeaconReportConfig *config; +/// 缓存各appKey的的附加参数,以通道的appKey作为key进行缓存 +@property (copy) NSMutableDictionary *additionalInfoDict; +/// 缓存各appKet的的userId,以通道的appKey作为key进行缓存 +@property (copy) NSMutableDictionary *userIdDict; +/// 缓存各appKet的的openId,以通道的appKey作为key进行缓存 +@property (copy) NSMutableDictionary *openIdDict; + + +/// COSBeaconOStar对象 +@property (nonatomic, strong) COSBeaconOStarContent *ostar; +/// ostarSDK版本号 +@property (copy) NSString *ostarVersion; + + +/// bundle相关 +@property (copy, readonly) NSString *bundleId; +/// 平台 id +@property (assign, readonly) int platformId; +/// 网关 ip +@property (copy) NSString *gatewayIP; +/// 硬件型号 +@property (copy, readonly) NSString *hardwareModel; +/// 国家 +@property (copy, readonly) NSString *country; +/// 语言 +@property (copy, readonly) NSString *language; +/// 单位GB +@property (assign, readonly) long long romSize; +/// openuuid 自建 +@property (copy, readonly) NSString *openUdid; +/// idfv +@property (copy) NSString *idfv; +/// idfa +@property (copy) NSString *idfa; +/// 是否越狱 +@property (assign, readonly) BOOL isReet; +/// 主通道的channelId +@property (copy) NSString *channelId; +/// 分辨率 +@property (copy, readonly) NSString *resolution; +/// sessionId +@property (copy) NSString *sessionId; + +/// 缓存服务端返回的sId,请求时带上,给服务端从缓存取解密后的密钥 +@property (copy) NSString *sId; + +/// 版本相关 +@property (copy) NSString *appVersion; +/// sdk 版本 +@property (copy, readonly) NSString *sdkVersion; +/// 系统版本 +@property (copy, readonly) NSString *osVer; +/// 系统版本 +@property (assign, readonly) float osVerFloat; +/// 是否纯新增用户,纯新增用户的定义是首次在某台设备上安装APP,卸载重装的不算纯新增 +@property (assign) BOOL isnew; +/// 是否版本新增用户 +@property (assign) BOOL isNewWithVer; +/// 是否升级版本 +@property (assign, readonly) BOOL versionChanged; +/// sdk是否升级版本 +@property (assign, readonly) BOOL sdkVersionChanged; + +/// 网络相关 +@property (copy, nullable) NSString *wifiName; +/// imsi +@property (copy, readonly) NSString *imsi; +/// mac +@property (copy, nullable) NSString *wifiMac; +/// 终端获取的APN信息(cmwap、cmnet等) +@property (copy) NSString *apn; +/// 网络状态 +@property (assign) COSBeaconNetworkStatus currentNetStatus; +/// all_ssid +@property (copy, readonly) NSString *wlanDevices; + +/// APP或者此SDK在运行过程中的一些运行时参数的模型类 +@property (strong) COSBeaconLocalConfig *localConfig; +/// 是否在后台 +@property (assign) BOOL isBackground; +/// 是否模拟器 +@property (assign, readonly) BOOL isSimulator; +/// 是否冷启动 +@property (assign) BOOL isCold; +/// 启动来源 +@property (copy) NSString *launchSource; +/// 设备名 +@property (copy, readonly) NSString *deviceName DEPRECATED_MSG_ATTRIBUTE("安全合规建设,4.2.75以后不再采集"); +/// 设备型号 +@property (copy, readonly) NSString *deviceModel; +/// 设备类型 +@property (copy, readonly) NSString *deviceType; +/// 电池 +@property (copy, readonly) NSString *battery; +/// aesKey +@property (copy) NSString *aesKey; +/// 加密 key +@property (nonatomic, copy) NSString *aesKeyEncrypt; +/// 与服务器进行时钟同步的时间差(单位毫秒) +@property (assign) NSTimeInterval serverTimeDelta; +/// app安装时间 +@property (assign, readonly) long long appInstallTime; + +// 延迟初始化相关需要耗时的参数,需在子线程调用 +- (void)initBaseInfo; + +// 初始化最基础infos,目前(4.1.29)只在检查appkey为异常时的201错误上报使用。 +- (void)initBaseSimpleInfo; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInterface.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInterface.h new file mode 100644 index 0000000..ddb769f --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInterface.h @@ -0,0 +1,213 @@ +// +// COSBeaconBaseInterface.h +// +// Created by tencent on 16/1/19. +// Copyright © 2016年 tencent. All rights reserved. +// + +#import "COSBeaconEventUploader.h" +#import "COSBeaconBaseInfoModel.h" + +#define COSBeacon_CLASS_DEPRECATED_APP(versionBegin, versionDeprecated, description, ...) __attribute__((deprecated("从 "#versionDeprecated" 版本开始废弃, "#description", "#__VA_ARGS__""))) __attribute__((weak_import)) +COSBeacon_CLASS_DEPRECATED_APP(1.0.0, 3.2.0, "推荐使用COSBeaconReport类") +@interface COSBeaconBaseInterface : NSObject + +//设置appKey(灯塔事件),启动灯塔SDK ++ (void)setAppKey:(NSString *)appKey; + +//1 fetal 2 error 3 warn 4 info +//in debug version: 5 debug 10 all ++ (void)setLogLevel:(int)logLevel; + +//得到灯塔sdk的版本 ++ (NSString *)getSDKVersion; + +//打开事件上报功能的开关 ++ (BOOL)enableEventRecord:(BOOL)enable; + +//实时用户事件上报通用接口,该接口会保存用户事件实时上报 +//event 事件名称 isSucceed 事件执行是否成功 elapse 事件执行耗时,单位ms size 上报包大小,单位kb params 其他参数,用户自定义 ++ (BOOL)onDirectUserAction: (NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDirectUserAction: (NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; + ++ (BOOL)onDirectUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDirectUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; + +//用户事件上报通用接口,该接口会保存用户事件到本地,根据上报策略择机上报 +//event 事件名称 isSucceed 事件执行是否成功 elapse 事件执行耗时,单位ms size 上报包大小,单位kb params 其他参数,用户自定义 ++ (BOOL)onUserAction:(NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onUserAction: (NSString*) eventName isSucceed:(BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params isOnlyWifiUpload:(BOOL)isOnlyWifiUpload; + ++ (BOOL)onUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isSucceed:(BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params isOnlyWifiUpload:(BOOL)isOnlyWifiUpload; + +// 大同SDK 专属接口 其他三方禁止调用 ++ (BOOL)onDTDirectUserAction: (NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDTDirectUserAction: (NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; +/// 大同多通道上报接口 ++ (BOOL)onDTDirectUserActionToTunnel:(NSString *)appKey eventName: (NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDTDirectUserActionToTunnel:(NSString *)appKey eventName: (NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; + +//设置实时事件上报的间隔,默认为5s,单位是秒 保护区间<=60 >=1 ++ (void)setUserRealEventDurationSecond:(int)seconds; + +//设置实时事件每次上报的最大上报条数, 默认为24,保护区间<=50 >=1 ++ (BOOL)setRealTimeEventUploaMaxCount:(int)maxPkgSize; + +//为通道设置userId ++ (void)setUserIdToTunnel:(NSString *)appKey userId:(NSString *)userId; + +//为主通道设置渠道 ++ (void)setChannelIdToTunnel:(NSString *)appKey channelId:(NSString *)channelId; + +//设置一个GUID的标识,用以通过GUID标识和分类异常用户信息 ++ (void)setGUID:(NSString *)guid; + +//更换用户时设置userId ++ (void)setUserId:(NSString *)userId; + +//打开海外版本,需要在初始化之前设置,默认关闭 ++ (void)enableAbroad:(BOOL)enalbe; + +//sessionid 设置sessionid可以帮您区分哪些事件属于同一次会话 ++ (void)setSessionid:(NSString *)sessionid; + ++ (NSString *)getSessionid; + +//设置omgId ++ (void)setOmgId:(NSString *)omgId; + +//设置渠道(灯塔事件) ++ (void)setChannelId:(NSString*)chanId; + +//设置appVersion ++ (void)setAppVersion:(NSString *)bundleVer; + ++ (void)setGatewayIp:(NSString *)gateWayIp; + +//设置事件上报的最大累计上报条数(满足条数即上报),及本地数据库的最大容量(超过限额不予存储) +//默认分别为20 10000,保护区间10~100, 100~10000 +//注意:采用默认调用方式,sdk会在与服务器通讯获取策略后更新本地策略,所以该模式下调用该API无效 ++ (BOOL)setStrategyForMaxPkgSize:(int)maxPkgSize dbMaxSize:(int)dbMaxSize; + +//登录事件 ++ (BOOL)onLogin: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//上传图片事件 ++ (BOOL)onUploadPicture: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//写日志事件 ++ (BOOL)onWriteBlog: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; + +//启动事件 ++ (BOOL)onStart: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//写操作 ++ (BOOL)onWrite: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//刷新操作 ++ (BOOL)onRefresh: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//界面渲染 ++ (BOOL)onRender: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; + +/** + 主通道的通用参数, 设置所有事件都会带的参数 + **/ ++ (void)setAdditionalInfo:(NSDictionary *)dic; + ++ (COSBeaconEventUploader *)getMixDataUploader; + +/** + 提供一个Model存放所有灯塔已默认采集的公参 + **/ ++ (COSBeaconBaseInfoModel *)getCommonParams; + +//2.3.4 +/** + * 事件接口总开关 + * @param isEventUpOnOff 默认为YES + */ ++ (void)setEventUpOnOff:(BOOL)isEventUpOnOff; + +/** + * 设置严苛模式用于上线前排查问题, 严苛模式下SDK会主动触发crash, 默认关闭,上线请务必关闭!!!!!!!!!!! + */ ++ (void)setStrictModeOnOff:(BOOL)yesOrNo; + + +#pragma mark -- 已废弃的无效接口 +//sdk的状态,未开启,初始化中,初始化完成,与服务器同步完成,错误 +typedef enum { + notenabled, initialing, initialed, syncedwithserver, initerror +} sdkstatus; + +//获取当前sdk的运行状态 ++ (sdkstatus)getSDKStatus; + +//设置sdk进行与服务器同步的延时(初次启动不会有延时,如果上次发生crash也不会延迟) +//主要是控制sdk在启动过程中占用更多资源 ++ (void)setSynchServerTimerDelay:(int)delay; + +//注册监控服务,将会向服务器查询策略,并初始化各个模块的默认数据上传器,参数userId为用户qua,参数gateWayIP为当前网络网关IP,不填则默认使用服务器下发的IP ++ (BOOL)enableAnalytics:(NSString *)userId gatewayIP:(NSString *)gatewayIP; + ++ (BOOL)enableAnalyticsWithoutNetwork:(NSString *)userId gatewayIP:(NSString *)gatewayIP; + +//注册通道 ++ (void)registerTunnel:(NSString *)appKey userId:(NSString *)userId channelId:(NSString *)channelId appVersion:(NSString *)appVersion; + +//为通道设置app版本 ++ (void)setAppVersionToTunnel:(NSString *)appKey appVersion:(NSString *)appVersion; + +//该开关为YES的时候会在本地策略生效的时候就开启功能开关(测速/异常),等服务器策略生效后再更新一次 +//如果为NO那么会等到服务器策略生效后才开启功能开关 +//影响范围:服务器策略生效之前的事件记录和异常处理函数的问题注册 ++ (BOOL)enableModuleFunctionBeforeSeverStrategy:(BOOL)enable; + +/** + 测试接口,只在Test的模式下生效 + **/ +// 这是控查询serverUlr ++ (BOOL)setAnalyticsServer:(NSString *)serverUrl; + +//开启和关闭灯塔上报(包括属性采集/启动上报/退出事件/使用状况上报) ++ (BOOL)setEnableReport:(BOOL)enabled; + +//1.8.4 +/** + * wifi上报控制 + */ ++ (void)isOnlyWifiUpload:(BOOL)yesOrNo; + +/** + * 临时关掉灯塔上报, 达到上报条件的事件先存数据库 + */ ++ (void)setEventUploadClose:(BOOL)isClose; + +// 1.9.0实时联调测试功能 ++ (void)setAccessTest:(BOOL)yesOrNo; + +/** + * 业务事件接口开关 + * @param isBizEventUpload 默认为YES + */ ++ (void)setBizEventUpload:(BOOL)isBizEventUpload; + +/** + * 路径分析功能开启/关闭接口,默认关闭此功能 + */ ++ (void)enablePagePath:(BOOL)yesOrNo; + +/** + * Socket上报开启/关闭接口,默认开启 + */ ++ (void)setSocketOnOff:(BOOL)yesOrNo; + +/** + * 进入页面跟踪,在viewWillAppear或viewDidAppear方法里调用此方法 + */ ++ (void)onPageBegin:(NSString *)pageName; + +/** + * 离开页面跟踪,在viewWillDisappear或viewDidDisappear方法里调用此方法 + */ ++ (void)onPageEnd:(NSString *)pageName; + + +@end diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconCallBackManager.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconCallBackManager.h new file mode 100644 index 0000000..cd3ac2c --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconCallBackManager.h @@ -0,0 +1,40 @@ +// +// COSBeaconCallBackManager.h +// COSBeaconAPI_Base +// +// Created by 吴小二哥 on 2021/9/17. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import +#import "COSBeaconResult.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^COSBeaconMsfSendCallback)(COSBeaconMsfSendResult *beaconResult); + +/** + * 长连接Msf回调Manger,Msf是通过代理方式回调手Q端,为了简化手Q接入逻辑,多线程代理回调由灯塔内部处理. + */ +@interface COSBeaconCallBackManager : NSObject + ++ (instancetype)sharedInstance; + +/** + * 获取callback记录个数 + */ +- (NSInteger)getCallbackMapCount; + +/** + * 灯塔内部存储callback并关联sequenceId + */ +- (void)addCallBack:(COSBeaconMsfSendCallback )beaconCallBack withSequenceId:(NSInteger )sequenceId; + +/** + * msf 回调接入层回调灯塔 + */ +- (void)callBackSendResult:(COSBeaconMsfSendResult *)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconEvent.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconEvent.h new file mode 100644 index 0000000..aa7849a --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconEvent.h @@ -0,0 +1,87 @@ +// +// COSBeaconEvent.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/6. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 事件类型 +typedef NS_ENUM(NSInteger, COSBeaconEventType) { + COSBeaconEventTypeNormal, // 普通事件 + COSBeaconEventTypeRealTime, // 实时事件 + COSBeaconEventTypeDTNormal, // 普通的大同事件,大同SDK业务专用 + COSBeaconEventTypeDTRealTime, // 实时的大同事件,大同SDK业务专用 + COSBeaconEventTypeImmediate, // 立即上报的事件,相对于实时事件有更高的上报及时性 +}; + +/** + 事件(model)类:业务方通过COSBeaconEvent对象封装事件各种参数 + */ +@interface COSBeaconEvent : NSObject + +/// 事件上报的归属appkey,如果不设置,则默认是start初始化接口设置的appkey +/// !!!为明确上报到哪个appkey,推荐接入方都主动设置自己的appkey +@property (nonatomic, copy, nullable) NSString *appKey; + +/// 事件标识code,接入方设置的对事件的唯一标识,后续数据分析可以通过事件code区分事件, +/// 如'APP启动事件'可定义code为:app_launch,'首页页面曝光事件'可定义为:homepage_exposure +@property (nonatomic, copy) NSString *code; + +/// 事件类型,默认是普通事件 +@property (nonatomic, assign) COSBeaconEventType type; + +/// 事件是否执行成功,默认YES +@property (nonatomic, assign) BOOL success DEPRECATED_MSG_ATTRIBUTE("在4.0+版本已废弃,可不设置"); + +/// 事件的自定义参数,key和value类型要求是NSString或者NSNumber类型,使用其他类型的事件不会上报 +/// 单个value的长度最大为20K,超出20K部分会被截断后上报,所有value长度之和最大为45k,超过45k不会上报此条事件 +@property (nonatomic, strong, nullable) NSDictionary *params; + + + +/// 标记事件是否是O16和O36都为空的补报事件 +@property (nonatomic, assign) BOOL reportAgainAfterOStarNotNull; + +/// 实时事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 ++ (instancetype)realTimeEventWithCode:(NSString *)code params:(nullable NSDictionary *)params DEPRECATED_MSG_ATTRIBUTE("在4.2.73+版本已废弃,请使用realTimeEventWithCode:appKey:params:"); + +/// 实时事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 +/// @param appKey 事件所上报的appkey ++ (instancetype)realTimeEventWithCode:(NSString *)code appKey:(NSString *)appKey params:(nullable NSDictionary *)params; + + +/// 普通事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 ++ (instancetype)normalEventWithCode:(NSString *)code params:(nullable NSDictionary *)params DEPRECATED_MSG_ATTRIBUTE("在4.2.73+版本已废弃,请使用normalEventWithCode:appKey:params:"); + +/// 普通事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 +/// @param appKey 事件所上报的appkey ++ (instancetype)normalEventWithCode:(NSString *)code appKey:(NSString *)appKey params:(nullable NSDictionary *)params; + +/// 构造函数,兼容老版本的事件初始化 +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +/// @param code 事件标识code +/// @param type 事件类型 +/// @param success 事件是否执行成功 +/// @param params 事件的自定义参数 +- (instancetype)initWithAppKey:(nullable NSString *)appKey + code:(NSString *)code + type:(COSBeaconEventType)type + success:(BOOL)success + params:(nullable NSDictionary *)params; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconEventUploader.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconEventUploader.h new file mode 100644 index 0000000..f586d0e --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconEventUploader.h @@ -0,0 +1,30 @@ +// +// COSBeaconEventUploader.h +// COSBeacon +// +// Created by dong kerry on 12-3-5. +// Copyright (c) 2012年 tencent.com. All rights reserved. +// + +@class COSBeaconEventRecord; + +/** + 事件上报器:内部开启轮询,定时查询本地的事件并上报 + */ +@interface COSBeaconEventUploader : NSObject +/// 上报 url +@property (atomic, retain) NSString *uploadUrl; + +/// 默认上报器(主通道),内部会开启定时器轮询上报 ++ (COSBeaconEventUploader *)defaultUploader; + +/// 无论数据库存储的事件有多少条都立即上报,且如果定时器没有开启,则开启定时器轮询 +- (void)uploadImmediately; + +/// 事件不入DB,直接进行上报 +- (void)uploadEventsInMemory:(NSArray *)eventRecords; + +/// 如果定时器没有开启,则开启定时器轮询 +- (void)openTimerAgain; + +@end diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconMsfSendArgs.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconMsfSendArgs.h new file mode 100644 index 0000000..83e0dd2 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconMsfSendArgs.h @@ -0,0 +1,24 @@ +// +// COSBeaconMsfSendArgs.h +// COSBeaconAPI_Base +// +// Created by 吴小二哥 on 2021/4/27. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * 转发Msf携带的参数对象 + */ +@interface COSBeaconMsfSendArgs : NSObject +/// 业务上报的事件的二进制内容 +@property (nonatomic, strong) NSData *data; +/// 请求命令字 +@property (nonatomic, copy) NSString *command; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconOStarContent.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconOStarContent.h new file mode 100644 index 0000000..b102ddc --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconOStarContent.h @@ -0,0 +1,22 @@ +// +// COSBeaconOStarContent.h +// COSBeaconAPI_Base +// +// Created by 吴小二哥 on 2021/7/8. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@interface COSBeaconOStarContent : NSObject +/// o16,A3字段 +@property (nonatomic, copy, nullable) NSString *o16; +/// o36,A153字段 +@property (nonatomic, copy, nullable) NSString *o36; + +- (instancetype)initWithO36:(NSString *)o36 withO16:(NSString *)o16; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconQUICArgs.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconQUICArgs.h new file mode 100644 index 0000000..f6ac813 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconQUICArgs.h @@ -0,0 +1,32 @@ +// +// COSBeaconTransferArgs.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2021/3/2. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * QUIC转发传递的参数对象 + */ +@interface COSBeaconQUICArgs : NSObject + +/// 请求实体 +@property (nonatomic, copy) NSMutableURLRequest *reqeust; + +/// 连接超时时间 +@property (nonatomic, assign) NSTimeInterval connectTimeoutMillis; + +/// 事件名 +@property (nonatomic, copy) NSString *eventCode; + +/// 事件appkey +@property (nonatomic, copy) NSString *appKey; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconReport.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconReport.h new file mode 100644 index 0000000..7350834 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconReport.h @@ -0,0 +1,170 @@ +// +// COSBeacon.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/6. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import +#import "COSBeaconResult.h" +#import "COSBeaconEvent.h" +#import "COSBeaconBaseInfoModel.h" +#import "COSBeaconReportConfig.h" +#import "COSBeaconQUICArgs.h" +#import "COSBeaconMsfSendArgs.h" +#import "COSBeaconCallBackManager.h" +NS_ASSUME_NONNULL_BEGIN + + +typedef void (^COSBeaconQUICCallback)(COSBeaconQUICArgs *args, COSBeaconQUICResult *result); + +typedef void (^COSBeaconMsfSendCallback)(COSBeaconMsfSendResult *beaconResult); +/** + 长连接网络数据传输的适配协议(可选):当业务对灯塔上报数据实时性有要求时,可开启长连接上报功能. + 开启此功能需要业务集成TQUIC SDK. 初始化TQUIC SDK并实现TUQIC SDK数据传输的代理接口. + */ +@protocol COSBeaconTransferProtocal +@optional +/// QUIC 数据传输的代理接口 +- (void)transferArgs:(COSBeaconQUICArgs *)args + delegate:(COSBeaconQUICCallback)callBack; + +/** + * MSFSDK数据传输的代理接口 + * callbackManager: 回调管理类. 收到msf回调后,接入层可以通过COSBeaconCallBackManager单例对象,直接调用callBackSendResult回传结果.4.1.36版本msfSDK 是通过代理回调结果,为了简化接入层逻辑,所以这里构建了COSBeaconCallBackManager中间层. + * return: sequenceId. 接入层需要保证sequenceId合法,非法id(如:0,nil,NULL)灯塔会拦截走原通道, 非法情况下继续调 MSF,有可能造成数据重复. + */ +- (NSInteger)sendArgs:(COSBeaconMsfSendArgs *)beaconArgs callback:(COSBeaconCallBackManager *)callbackManager; + + +@end + +/// COSBeaconMttProtocal穿上甲日志协议 +@protocol COSBeaconMttProtocal +- (void)mttLog:(NSString *)message + file:(const char *)file + function:(const char *)function + line:(NSUInteger)line + threadID:(NSInteger)threadID + module:(NSString *)module + folder:(int)folder level:(int)level; + +@end + +extern BOOL COSBeaconHasStarted; + +/** + 上报模块的接口类:提供SDK对外API + */ +@interface COSBeaconReport : NSObject + +/// 原来使用的设备标识符,通过OMGID SDK获取 +@property (copy, nullable) NSString *omgId; + +/// 渠道ID +@property (copy, nullable) NSString *channelId; + +/// 是否开启严苛模式,默认为NO,严苛模式开启时用于上线前排查问题, SDK会主动触发crash, 上线务必关闭!!! +@property (assign) BOOL strictMode; + +/// 设置本地调试时控制台输出的日志级别:1 fetal, 2 error, 3 warn, 4 info, debug, 5 debug, 10 all, 默认为0,不打印日志 +/// 线上正式环境,必须设置为0关闭此日志 +@property (nonatomic, assign) int logLevel; + +/// 是否采集WiFiMac地址,参数为NO时不采集,默认采集,如果需要关闭则需要在初始化前设置为NO +@property (assign) BOOL collectMacEnable DEPRECATED_MSG_ATTRIBUTE("4.2.74以后不再采集,如需使用请自行采集后通过[COSBeaconReport.sharedInstance setWifiName:/setWifiMac:]填充"); + +/// 是否采集idfa,参数为NO时不采集,默认采集,如果需要关闭则需要在初始化前设置为NO +@property (assign) BOOL collectIdfaEnable DEPRECATED_MSG_ATTRIBUTE("4.2.74以后不再采集,如需使用请自行采集后通过[COSBeaconReport.sharedInstance setIDFA:]填充"); + + +/// 是否采集idfv,默认采集。无特殊情况不要关闭 ! 若关闭后务必在授权后填充IDFV(setIDFV:) +@property (assign) BOOL collectIdfvEnable; + +/// 网络数据传输通道代理 +@property (nonatomic, weak) id transferDelegate; + +/// 穿山甲日志代理 +@property (nonatomic, weak) id mttDelegate; + + ++ (COSBeaconReport *)sharedInstance; + +/** + * 初始化接口,开启灯塔服务,会向服务器查询策略,初始化各个模块的默认数据上传器等 + * 1.宿主(应用)集成灯塔时: + * a:建议在didFinishLaunchingWithOptions中最早位置调用灯塔,避免其他组件SDK提前初始化灯塔而引起数据错误问题. + * b:应用中多份组件SDK同时使用灯塔,强烈建议配置COSBeaconInfo.plist文件记录beacon_main_appkey, + * 配置后灯塔初始化以配置文件为准,所以务必确保配置文件appkey正确!! 非必要情况不要修改配置文件!! + * 2.二方(中台,组件)SDK集成灯塔: + * a:使用公版灯塔(和宿主共用)情况下, 禁止调用此方法!!! + * b:使用前缀版本灯塔情况下,需要调用此方法. 通常一个二方SDK业务对应一份前缀版本灯塔,彼此是相互隔离. + * @param appKey 各业务在灯塔平台申请的业务唯一标识 + * @param config 全局配置,可配置一些开关和策略等 + */ +- (void)startWithAppkey:(NSString *)appKey config:(nullable COSBeaconReportConfig *)config; + +/// 上报事件 +/// @param event 事件,包括所有用户行为事件、APP启动事件等,事件的具体定义参考COSBeaconEvent模型类 +/// @return 返回事件上报结果,此同步返回的结果只代表事件符合上报要求,可以进行上报, +/// 但不一定代表事件当前已成功上报到服务端,有可能存在事件在本地缓存并等待上报等情况 +- (COSBeaconReportResult *)reportEvent:(COSBeaconEvent *)event; + +/// 给指定的appKey设置附加参数,此appKey的所有事件都会带上这些参数 +/// @param additionalParams 附加参数 +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +/// @return 返回设置参数结果,参数非法将返回NO, 设置成功返回 YES. (参数类型要求是:NSNumber 和 NSString) +- (BOOL)setAdditionalParams:(NSDictionary *)additionalParams forAppKey:(NSString *)appKey; + +/// 用户设置抽样事件,根据appkey和eventCode进行抽样 +/// @param appkey 多通道 +/// @param sampleEventDict key是事件名(EventCode),value是抽样比例的分子,分母固定10000,分子区分范围:0~10000. +/// 比如,输入1代表抽样留万分之一,输入10代表抽样留千分之一,输入0为不上报 +/// @return 返回设置抽样配置结果,参数非法将返回NO, 设置成功返回 YES +- (BOOL)setUserSampleEvents:(NSDictionary *)sampleEventDict forAppKey:(NSString *)appkey; + +/// 给指定的appKey设置userId +/// @param userId 用户唯一标识符 +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +- (void)setUserId:(NSString *)userId forAppKey:(NSString *)appKey; + +/// 给指定的appKey设置openid +/// @param openId 小程序、H5设置的开放平台的id +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +- (void)setOpenId:(NSString *)openId forAppKey:(NSString *)appKey; + + +/** + * 设置O16和O36参数 + * 填充设备id: 灯塔默认只使用IDFV来区分设备, 通常建议集成时填充稳定的设备ID, 比如IDFA,或者专门的SDK产生的设备ID + */ +- (void)setOStarO16:(NSString *)o16 o36:(nullable NSString *)o36; + +/// 把OStarSDK的版本号透传给灯塔 +- (void)setOStarVersion:(NSString *)ostarVersion; + +/// 默认不采集idfa,由需采集idfa的应用宿主填充. +- (void)setIDFA:(NSString *)idfa; + +/// 默认采集IDFV,业务如有关闭IDFV,用户同意隐私采集后,需填充给灯塔 +- (void)setIDFV:(NSString *)idfv; + +/// 设置wifiName. 用户授权隐私数据采集后,可统一采集后填充到灯塔 +- (void)setWifiName:(NSString *)wifiName; + +/// 设置wifiMac. 用户授权隐私数据采集后,可统一采集后填充到灯塔 +- (void)setWifiMac:(NSString *)wifiMac; + + +/// 获取所有灯塔已默认采集的公参 +- (COSBeaconBaseInfoModel *)getCommonParams; + +///Socket上报开启/关闭接口,默认YES,如果需要关闭则需要设置为NO +- (void)setSocketOnOff:(BOOL)yesOrNo; + +@end + +NS_ASSUME_NONNULL_END + +#define BEACON_SDK_VERSION @"4.2.76.52" \ No newline at end of file diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconReportConfig.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconReportConfig.h new file mode 100644 index 0000000..ac79072 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconReportConfig.h @@ -0,0 +1,60 @@ +// +// COSBeaconReportConfig.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2014/4/8. +// Copyright © 2014 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +typedef NS_ENUM(NSInteger, COSBeaconCompressionType) { + COSBeaconCompressionGZIP = 2, // GZIP压缩(默认) + COSBeaconCompressionLZMA = 4, // LZMA +}; + +/** + 基础策略配置:通过此配置类可以灯塔基础配置项进行硬编码设置,如果进行云配置可联系对接人. + */ +@interface COSBeaconReportConfig : NSObject + +/// 开启或者关闭事件上报功能,默认为YES可进行上报,如果有给用户提供关闭事件上报的接口等情况,可设置为NO. 关闭后事件不作任何处理 +@property (nonatomic, assign) BOOL eventReportEnabled; + +/// 开启或关闭内置事件上报, 默认为YES开启。 如果需要关闭, 可设置为NO, 关闭后拦截内置事件:[rqd_applaunched, rqd_appresumed, rqd_appexited, rqd_heartbeat] +@property (nonatomic, assign) BOOL internalEventEnabled; + +/// 开启或者关闭策略请求功能,默认为YES进行策略请求,如果需要关闭,可设置为NO +@property (nonatomic, assign) BOOL configQueryEnabled; + +/// 事件轮询上传开关,默认打开. 关闭后业务生成的事件会入库,但不上传到服务端,达到DB上限后丢弃剩余事件. +@property (nonatomic, assign) BOOL eventUploadEnabled; +/// 二进制请求包压缩方式,默认GZIP +@property (nonatomic, assign) COSBeaconCompressionType compressionType; + +/// 本地数据库的最大容量(超过限额不予存储),默认10000条,保护区间是100~100000条,云端优先级高于本地设置 +@property (nonatomic, assign) NSInteger maxDBCount; + +/// 实时事件上报的轮询间隔,默认2s,允许区间是[0.1,20]s +@property (nonatomic, assign) NSInteger realTimeEventPollingInterval; +/// 普通事件上报的轮询间隔,默认5s,允许区间是[1,50]s +@property (nonatomic, assign) NSInteger normalEventPollingInterval; +/// 实时事件上报条数,默认48s,允许区间是[10,1000] +@property (nonatomic, assign) NSInteger realTimeEventMaxUploadCount; +/// 普通事件上报条数,默认48s,允许区间是[10,1000] +@property (nonatomic, assign) NSInteger normalEventMaxUploadCount; +/// 上报后及时补报开关 默认为YES开启。 如果需要关闭, 可设置为NO +@property (nonatomic, assign) BOOL uploadImmediatelyEnabled; +/// 当使用QUIC 上报时是否开启7层,默认NO +@property (nonatomic, assign) BOOL H3OverQUICEnabled; + +/// 事件上报服务的域名,一般不需要设置,有特殊需求时找SDK同学对接 +@property (nonatomic, copy, nullable) NSString *uploadURL; + +/// 配置服务的域名,一般不需要设置,有特殊需求时找SDK同学对接 +@property (nonatomic, copy, nullable) NSString *configURL; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconResult.h b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconResult.h new file mode 100644 index 0000000..79b84e8 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_i386_x86_64-simulator/COSBeaconAPI_Base.framework/Headers/COSBeaconResult.h @@ -0,0 +1,71 @@ +// +// COSBeaconResult.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/6. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, COSBeaconResultType) { + COSBeaconResultTypeSuccess = 0, // 成功 + COSBeaconResultTypeIllegalParameters, // 参数非法,一般是接口入参校验不通过 + COSBeaconResultTypeConfigOff, // 配置关闭,导致上报失败或者不需要上报 + COSBeaconResultTypeParamsExceededLength, // 参数长度过长 + COSBeaconResultTypeSDKNotStarted, // SDK未初始化就进行上报 + COSBeaconResultTypeUnknow, // 未知错误 +}; +/** + COSBeaconBaseResult:基础结果类 + */ +@interface COSBeaconBaseResult : NSObject + +/// 上报结果的状态类型,此结果类型一般只代表事件在本地校验的结果,不一定代表事件成功上报到服务端 +@property (nonatomic, assign) COSBeaconResultType type; + +/// 具体错误信息,成功时为空 +@property (nonatomic, copy) NSString *errorMessage; + +/// 事件ID,实时和普通事件的id分开计算,有可能相同 +@property (nonatomic, copy) NSString *eventId; + +@end + +/** + COSBeaconReportResult:上报事件结果类 + */ +@interface COSBeaconReportResult : COSBeaconBaseResult +@end + +/** + COSBeacon QUIC 回调参数对象 + */ +@interface COSBeaconQUICResult : NSObject + +@property(nonatomic, strong) NSURLResponse * _Nonnull response; + +@property(nonatomic, strong) id _Nonnull responseObject; + +@property(nonatomic, strong) NSError * _Nonnull error; + +@end + +/** + MSFSDK 发送数据结果回调: 0 代表成功 非零则是对应错误码 + */ +@interface COSBeaconMsfSendResult : NSObject +/// sequenceId +@property(nonatomic, assign) NSInteger sequenceId; +/// 发送状态码 +@property(nonatomic, assign) NSInteger sendCode; +/// 发送错误信息 +@property(nonatomic, copy) NSString *sendMsg; + + +@end + + + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/COSBeaconAPI_Base b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/COSBeaconAPI_Base new file mode 100644 index 0000000..76c0ad4 Binary files /dev/null and b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/COSBeaconAPI_Base differ diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInfoModel.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInfoModel.h new file mode 100644 index 0000000..2654ddf --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInfoModel.h @@ -0,0 +1,147 @@ +// +// COSBeaconBaseInfoModel.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/14. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import +#import "COSBeaconOStarContent.h" +#import "COSBeaconReportConfig.h" + + +typedef enum : NSInteger +{ + COSBeaconNotReachable = 0, + COSBeaconReachableViaWiFi, + COSBeaconReachableViaWWAN, + COSBeaconReachableUnknow +} COSBeaconNetworkStatus; + +@class COSBeaconLocalConfig; + +NS_ASSUME_NONNULL_BEGIN + +/** + 灯塔SDK采集的公共基础信息 + 存储在单例里的属性,在多线程,采用atomic控制线程同步,重写set/get方法的属性需手动控制同步,不同步的属性在多线程时可能引起crash或计算结果不是预期的 + */ +@interface COSBeaconBaseInfoModel : NSObject + +/// 主App的appKey +@property (copy) NSString *mainAppKey; +/// 上报策略配置 +@property (strong) COSBeaconReportConfig *config; +/// 缓存各appKey的的附加参数,以通道的appKey作为key进行缓存 +@property (copy) NSMutableDictionary *additionalInfoDict; +/// 缓存各appKet的的userId,以通道的appKey作为key进行缓存 +@property (copy) NSMutableDictionary *userIdDict; +/// 缓存各appKet的的openId,以通道的appKey作为key进行缓存 +@property (copy) NSMutableDictionary *openIdDict; + + +/// COSBeaconOStar对象 +@property (nonatomic, strong) COSBeaconOStarContent *ostar; +/// ostarSDK版本号 +@property (copy) NSString *ostarVersion; + + +/// bundle相关 +@property (copy, readonly) NSString *bundleId; +/// 平台 id +@property (assign, readonly) int platformId; +/// 网关 ip +@property (copy) NSString *gatewayIP; +/// 硬件型号 +@property (copy, readonly) NSString *hardwareModel; +/// 国家 +@property (copy, readonly) NSString *country; +/// 语言 +@property (copy, readonly) NSString *language; +/// 单位GB +@property (assign, readonly) long long romSize; +/// openuuid 自建 +@property (copy, readonly) NSString *openUdid; +/// idfv +@property (copy) NSString *idfv; +/// idfa +@property (copy) NSString *idfa; +/// 是否越狱 +@property (assign, readonly) BOOL isReet; +/// 主通道的channelId +@property (copy) NSString *channelId; +/// 分辨率 +@property (copy, readonly) NSString *resolution; +/// sessionId +@property (copy) NSString *sessionId; + +/// 缓存服务端返回的sId,请求时带上,给服务端从缓存取解密后的密钥 +@property (copy) NSString *sId; + +/// 版本相关 +@property (copy) NSString *appVersion; +/// sdk 版本 +@property (copy, readonly) NSString *sdkVersion; +/// 系统版本 +@property (copy, readonly) NSString *osVer; +/// 系统版本 +@property (assign, readonly) float osVerFloat; +/// 是否纯新增用户,纯新增用户的定义是首次在某台设备上安装APP,卸载重装的不算纯新增 +@property (assign) BOOL isnew; +/// 是否版本新增用户 +@property (assign) BOOL isNewWithVer; +/// 是否升级版本 +@property (assign, readonly) BOOL versionChanged; +/// sdk是否升级版本 +@property (assign, readonly) BOOL sdkVersionChanged; + +/// 网络相关 +@property (copy, nullable) NSString *wifiName; +/// imsi +@property (copy, readonly) NSString *imsi; +/// mac +@property (copy, nullable) NSString *wifiMac; +/// 终端获取的APN信息(cmwap、cmnet等) +@property (copy) NSString *apn; +/// 网络状态 +@property (assign) COSBeaconNetworkStatus currentNetStatus; +/// all_ssid +@property (copy, readonly) NSString *wlanDevices; + +/// APP或者此SDK在运行过程中的一些运行时参数的模型类 +@property (strong) COSBeaconLocalConfig *localConfig; +/// 是否在后台 +@property (assign) BOOL isBackground; +/// 是否模拟器 +@property (assign, readonly) BOOL isSimulator; +/// 是否冷启动 +@property (assign) BOOL isCold; +/// 启动来源 +@property (copy) NSString *launchSource; +/// 设备名 +@property (copy, readonly) NSString *deviceName DEPRECATED_MSG_ATTRIBUTE("安全合规建设,4.2.75以后不再采集"); +/// 设备型号 +@property (copy, readonly) NSString *deviceModel; +/// 设备类型 +@property (copy, readonly) NSString *deviceType; +/// 电池 +@property (copy, readonly) NSString *battery; +/// aesKey +@property (copy) NSString *aesKey; +/// 加密 key +@property (nonatomic, copy) NSString *aesKeyEncrypt; +/// 与服务器进行时钟同步的时间差(单位毫秒) +@property (assign) NSTimeInterval serverTimeDelta; +/// app安装时间 +@property (assign, readonly) long long appInstallTime; + +// 延迟初始化相关需要耗时的参数,需在子线程调用 +- (void)initBaseInfo; + +// 初始化最基础infos,目前(4.1.29)只在检查appkey为异常时的201错误上报使用。 +- (void)initBaseSimpleInfo; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInterface.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInterface.h new file mode 100644 index 0000000..ddb769f --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconBaseInterface.h @@ -0,0 +1,213 @@ +// +// COSBeaconBaseInterface.h +// +// Created by tencent on 16/1/19. +// Copyright © 2016年 tencent. All rights reserved. +// + +#import "COSBeaconEventUploader.h" +#import "COSBeaconBaseInfoModel.h" + +#define COSBeacon_CLASS_DEPRECATED_APP(versionBegin, versionDeprecated, description, ...) __attribute__((deprecated("从 "#versionDeprecated" 版本开始废弃, "#description", "#__VA_ARGS__""))) __attribute__((weak_import)) +COSBeacon_CLASS_DEPRECATED_APP(1.0.0, 3.2.0, "推荐使用COSBeaconReport类") +@interface COSBeaconBaseInterface : NSObject + +//设置appKey(灯塔事件),启动灯塔SDK ++ (void)setAppKey:(NSString *)appKey; + +//1 fetal 2 error 3 warn 4 info +//in debug version: 5 debug 10 all ++ (void)setLogLevel:(int)logLevel; + +//得到灯塔sdk的版本 ++ (NSString *)getSDKVersion; + +//打开事件上报功能的开关 ++ (BOOL)enableEventRecord:(BOOL)enable; + +//实时用户事件上报通用接口,该接口会保存用户事件实时上报 +//event 事件名称 isSucceed 事件执行是否成功 elapse 事件执行耗时,单位ms size 上报包大小,单位kb params 其他参数,用户自定义 ++ (BOOL)onDirectUserAction: (NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDirectUserAction: (NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; + ++ (BOOL)onDirectUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDirectUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; + +//用户事件上报通用接口,该接口会保存用户事件到本地,根据上报策略择机上报 +//event 事件名称 isSucceed 事件执行是否成功 elapse 事件执行耗时,单位ms size 上报包大小,单位kb params 其他参数,用户自定义 ++ (BOOL)onUserAction:(NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onUserAction: (NSString*) eventName isSucceed:(BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params isOnlyWifiUpload:(BOOL)isOnlyWifiUpload; + ++ (BOOL)onUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onUserActionToTunnel:(NSString *)appKey eventName:(NSString *)eventName isSucceed:(BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params isOnlyWifiUpload:(BOOL)isOnlyWifiUpload; + +// 大同SDK 专属接口 其他三方禁止调用 ++ (BOOL)onDTDirectUserAction: (NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDTDirectUserAction: (NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; +/// 大同多通道上报接口 ++ (BOOL)onDTDirectUserActionToTunnel:(NSString *)appKey eventName: (NSString *)eventName isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; ++ (BOOL)onDTDirectUserActionToTunnel:(NSString *)appKey eventName: (NSString *)eventName isImmediately:(BOOL)isImmediately isSucceed:(BOOL)isSucceed elapse:(long)elapse size:(long)size params:(NSDictionary *)params; + +//设置实时事件上报的间隔,默认为5s,单位是秒 保护区间<=60 >=1 ++ (void)setUserRealEventDurationSecond:(int)seconds; + +//设置实时事件每次上报的最大上报条数, 默认为24,保护区间<=50 >=1 ++ (BOOL)setRealTimeEventUploaMaxCount:(int)maxPkgSize; + +//为通道设置userId ++ (void)setUserIdToTunnel:(NSString *)appKey userId:(NSString *)userId; + +//为主通道设置渠道 ++ (void)setChannelIdToTunnel:(NSString *)appKey channelId:(NSString *)channelId; + +//设置一个GUID的标识,用以通过GUID标识和分类异常用户信息 ++ (void)setGUID:(NSString *)guid; + +//更换用户时设置userId ++ (void)setUserId:(NSString *)userId; + +//打开海外版本,需要在初始化之前设置,默认关闭 ++ (void)enableAbroad:(BOOL)enalbe; + +//sessionid 设置sessionid可以帮您区分哪些事件属于同一次会话 ++ (void)setSessionid:(NSString *)sessionid; + ++ (NSString *)getSessionid; + +//设置omgId ++ (void)setOmgId:(NSString *)omgId; + +//设置渠道(灯塔事件) ++ (void)setChannelId:(NSString*)chanId; + +//设置appVersion ++ (void)setAppVersion:(NSString *)bundleVer; + ++ (void)setGatewayIp:(NSString *)gateWayIp; + +//设置事件上报的最大累计上报条数(满足条数即上报),及本地数据库的最大容量(超过限额不予存储) +//默认分别为20 10000,保护区间10~100, 100~10000 +//注意:采用默认调用方式,sdk会在与服务器通讯获取策略后更新本地策略,所以该模式下调用该API无效 ++ (BOOL)setStrategyForMaxPkgSize:(int)maxPkgSize dbMaxSize:(int)dbMaxSize; + +//登录事件 ++ (BOOL)onLogin: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//上传图片事件 ++ (BOOL)onUploadPicture: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//写日志事件 ++ (BOOL)onWriteBlog: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; + +//启动事件 ++ (BOOL)onStart: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//写操作 ++ (BOOL)onWrite: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//刷新操作 ++ (BOOL)onRefresh: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; +//界面渲染 ++ (BOOL)onRender: (BOOL) isSucceed elapse:(long) elapse size:(long) size params:(NSDictionary *) params; + +/** + 主通道的通用参数, 设置所有事件都会带的参数 + **/ ++ (void)setAdditionalInfo:(NSDictionary *)dic; + ++ (COSBeaconEventUploader *)getMixDataUploader; + +/** + 提供一个Model存放所有灯塔已默认采集的公参 + **/ ++ (COSBeaconBaseInfoModel *)getCommonParams; + +//2.3.4 +/** + * 事件接口总开关 + * @param isEventUpOnOff 默认为YES + */ ++ (void)setEventUpOnOff:(BOOL)isEventUpOnOff; + +/** + * 设置严苛模式用于上线前排查问题, 严苛模式下SDK会主动触发crash, 默认关闭,上线请务必关闭!!!!!!!!!!! + */ ++ (void)setStrictModeOnOff:(BOOL)yesOrNo; + + +#pragma mark -- 已废弃的无效接口 +//sdk的状态,未开启,初始化中,初始化完成,与服务器同步完成,错误 +typedef enum { + notenabled, initialing, initialed, syncedwithserver, initerror +} sdkstatus; + +//获取当前sdk的运行状态 ++ (sdkstatus)getSDKStatus; + +//设置sdk进行与服务器同步的延时(初次启动不会有延时,如果上次发生crash也不会延迟) +//主要是控制sdk在启动过程中占用更多资源 ++ (void)setSynchServerTimerDelay:(int)delay; + +//注册监控服务,将会向服务器查询策略,并初始化各个模块的默认数据上传器,参数userId为用户qua,参数gateWayIP为当前网络网关IP,不填则默认使用服务器下发的IP ++ (BOOL)enableAnalytics:(NSString *)userId gatewayIP:(NSString *)gatewayIP; + ++ (BOOL)enableAnalyticsWithoutNetwork:(NSString *)userId gatewayIP:(NSString *)gatewayIP; + +//注册通道 ++ (void)registerTunnel:(NSString *)appKey userId:(NSString *)userId channelId:(NSString *)channelId appVersion:(NSString *)appVersion; + +//为通道设置app版本 ++ (void)setAppVersionToTunnel:(NSString *)appKey appVersion:(NSString *)appVersion; + +//该开关为YES的时候会在本地策略生效的时候就开启功能开关(测速/异常),等服务器策略生效后再更新一次 +//如果为NO那么会等到服务器策略生效后才开启功能开关 +//影响范围:服务器策略生效之前的事件记录和异常处理函数的问题注册 ++ (BOOL)enableModuleFunctionBeforeSeverStrategy:(BOOL)enable; + +/** + 测试接口,只在Test的模式下生效 + **/ +// 这是控查询serverUlr ++ (BOOL)setAnalyticsServer:(NSString *)serverUrl; + +//开启和关闭灯塔上报(包括属性采集/启动上报/退出事件/使用状况上报) ++ (BOOL)setEnableReport:(BOOL)enabled; + +//1.8.4 +/** + * wifi上报控制 + */ ++ (void)isOnlyWifiUpload:(BOOL)yesOrNo; + +/** + * 临时关掉灯塔上报, 达到上报条件的事件先存数据库 + */ ++ (void)setEventUploadClose:(BOOL)isClose; + +// 1.9.0实时联调测试功能 ++ (void)setAccessTest:(BOOL)yesOrNo; + +/** + * 业务事件接口开关 + * @param isBizEventUpload 默认为YES + */ ++ (void)setBizEventUpload:(BOOL)isBizEventUpload; + +/** + * 路径分析功能开启/关闭接口,默认关闭此功能 + */ ++ (void)enablePagePath:(BOOL)yesOrNo; + +/** + * Socket上报开启/关闭接口,默认开启 + */ ++ (void)setSocketOnOff:(BOOL)yesOrNo; + +/** + * 进入页面跟踪,在viewWillAppear或viewDidAppear方法里调用此方法 + */ ++ (void)onPageBegin:(NSString *)pageName; + +/** + * 离开页面跟踪,在viewWillDisappear或viewDidDisappear方法里调用此方法 + */ ++ (void)onPageEnd:(NSString *)pageName; + + +@end diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconCallBackManager.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconCallBackManager.h new file mode 100644 index 0000000..cd3ac2c --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconCallBackManager.h @@ -0,0 +1,40 @@ +// +// COSBeaconCallBackManager.h +// COSBeaconAPI_Base +// +// Created by 吴小二哥 on 2021/9/17. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import +#import "COSBeaconResult.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^COSBeaconMsfSendCallback)(COSBeaconMsfSendResult *beaconResult); + +/** + * 长连接Msf回调Manger,Msf是通过代理方式回调手Q端,为了简化手Q接入逻辑,多线程代理回调由灯塔内部处理. + */ +@interface COSBeaconCallBackManager : NSObject + ++ (instancetype)sharedInstance; + +/** + * 获取callback记录个数 + */ +- (NSInteger)getCallbackMapCount; + +/** + * 灯塔内部存储callback并关联sequenceId + */ +- (void)addCallBack:(COSBeaconMsfSendCallback )beaconCallBack withSequenceId:(NSInteger )sequenceId; + +/** + * msf 回调接入层回调灯塔 + */ +- (void)callBackSendResult:(COSBeaconMsfSendResult *)result; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconEvent.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconEvent.h new file mode 100644 index 0000000..aa7849a --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconEvent.h @@ -0,0 +1,87 @@ +// +// COSBeaconEvent.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/6. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 事件类型 +typedef NS_ENUM(NSInteger, COSBeaconEventType) { + COSBeaconEventTypeNormal, // 普通事件 + COSBeaconEventTypeRealTime, // 实时事件 + COSBeaconEventTypeDTNormal, // 普通的大同事件,大同SDK业务专用 + COSBeaconEventTypeDTRealTime, // 实时的大同事件,大同SDK业务专用 + COSBeaconEventTypeImmediate, // 立即上报的事件,相对于实时事件有更高的上报及时性 +}; + +/** + 事件(model)类:业务方通过COSBeaconEvent对象封装事件各种参数 + */ +@interface COSBeaconEvent : NSObject + +/// 事件上报的归属appkey,如果不设置,则默认是start初始化接口设置的appkey +/// !!!为明确上报到哪个appkey,推荐接入方都主动设置自己的appkey +@property (nonatomic, copy, nullable) NSString *appKey; + +/// 事件标识code,接入方设置的对事件的唯一标识,后续数据分析可以通过事件code区分事件, +/// 如'APP启动事件'可定义code为:app_launch,'首页页面曝光事件'可定义为:homepage_exposure +@property (nonatomic, copy) NSString *code; + +/// 事件类型,默认是普通事件 +@property (nonatomic, assign) COSBeaconEventType type; + +/// 事件是否执行成功,默认YES +@property (nonatomic, assign) BOOL success DEPRECATED_MSG_ATTRIBUTE("在4.0+版本已废弃,可不设置"); + +/// 事件的自定义参数,key和value类型要求是NSString或者NSNumber类型,使用其他类型的事件不会上报 +/// 单个value的长度最大为20K,超出20K部分会被截断后上报,所有value长度之和最大为45k,超过45k不会上报此条事件 +@property (nonatomic, strong, nullable) NSDictionary *params; + + + +/// 标记事件是否是O16和O36都为空的补报事件 +@property (nonatomic, assign) BOOL reportAgainAfterOStarNotNull; + +/// 实时事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 ++ (instancetype)realTimeEventWithCode:(NSString *)code params:(nullable NSDictionary *)params DEPRECATED_MSG_ATTRIBUTE("在4.2.73+版本已废弃,请使用realTimeEventWithCode:appKey:params:"); + +/// 实时事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 +/// @param appKey 事件所上报的appkey ++ (instancetype)realTimeEventWithCode:(NSString *)code appKey:(NSString *)appKey params:(nullable NSDictionary *)params; + + +/// 普通事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 ++ (instancetype)normalEventWithCode:(NSString *)code params:(nullable NSDictionary *)params DEPRECATED_MSG_ATTRIBUTE("在4.2.73+版本已废弃,请使用normalEventWithCode:appKey:params:"); + +/// 普通事件的构造函数 +/// @param code 事件标识code +/// @param params 事件的自定义参数 +/// @param appKey 事件所上报的appkey ++ (instancetype)normalEventWithCode:(NSString *)code appKey:(NSString *)appKey params:(nullable NSDictionary *)params; + +/// 构造函数,兼容老版本的事件初始化 +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +/// @param code 事件标识code +/// @param type 事件类型 +/// @param success 事件是否执行成功 +/// @param params 事件的自定义参数 +- (instancetype)initWithAppKey:(nullable NSString *)appKey + code:(NSString *)code + type:(COSBeaconEventType)type + success:(BOOL)success + params:(nullable NSDictionary *)params; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconEventUploader.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconEventUploader.h new file mode 100644 index 0000000..f586d0e --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconEventUploader.h @@ -0,0 +1,30 @@ +// +// COSBeaconEventUploader.h +// COSBeacon +// +// Created by dong kerry on 12-3-5. +// Copyright (c) 2012年 tencent.com. All rights reserved. +// + +@class COSBeaconEventRecord; + +/** + 事件上报器:内部开启轮询,定时查询本地的事件并上报 + */ +@interface COSBeaconEventUploader : NSObject +/// 上报 url +@property (atomic, retain) NSString *uploadUrl; + +/// 默认上报器(主通道),内部会开启定时器轮询上报 ++ (COSBeaconEventUploader *)defaultUploader; + +/// 无论数据库存储的事件有多少条都立即上报,且如果定时器没有开启,则开启定时器轮询 +- (void)uploadImmediately; + +/// 事件不入DB,直接进行上报 +- (void)uploadEventsInMemory:(NSArray *)eventRecords; + +/// 如果定时器没有开启,则开启定时器轮询 +- (void)openTimerAgain; + +@end diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconMsfSendArgs.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconMsfSendArgs.h new file mode 100644 index 0000000..83e0dd2 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconMsfSendArgs.h @@ -0,0 +1,24 @@ +// +// COSBeaconMsfSendArgs.h +// COSBeaconAPI_Base +// +// Created by 吴小二哥 on 2021/4/27. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * 转发Msf携带的参数对象 + */ +@interface COSBeaconMsfSendArgs : NSObject +/// 业务上报的事件的二进制内容 +@property (nonatomic, strong) NSData *data; +/// 请求命令字 +@property (nonatomic, copy) NSString *command; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconOStarContent.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconOStarContent.h new file mode 100644 index 0000000..b102ddc --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconOStarContent.h @@ -0,0 +1,22 @@ +// +// COSBeaconOStarContent.h +// COSBeaconAPI_Base +// +// Created by 吴小二哥 on 2021/7/8. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@interface COSBeaconOStarContent : NSObject +/// o16,A3字段 +@property (nonatomic, copy, nullable) NSString *o16; +/// o36,A153字段 +@property (nonatomic, copy, nullable) NSString *o36; + +- (instancetype)initWithO36:(NSString *)o36 withO16:(NSString *)o16; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconQUICArgs.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconQUICArgs.h new file mode 100644 index 0000000..f6ac813 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconQUICArgs.h @@ -0,0 +1,32 @@ +// +// COSBeaconTransferArgs.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2021/3/2. +// Copyright © 2021 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * QUIC转发传递的参数对象 + */ +@interface COSBeaconQUICArgs : NSObject + +/// 请求实体 +@property (nonatomic, copy) NSMutableURLRequest *reqeust; + +/// 连接超时时间 +@property (nonatomic, assign) NSTimeInterval connectTimeoutMillis; + +/// 事件名 +@property (nonatomic, copy) NSString *eventCode; + +/// 事件appkey +@property (nonatomic, copy) NSString *appKey; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconReport.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconReport.h new file mode 100644 index 0000000..7350834 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconReport.h @@ -0,0 +1,170 @@ +// +// COSBeacon.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/6. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import +#import "COSBeaconResult.h" +#import "COSBeaconEvent.h" +#import "COSBeaconBaseInfoModel.h" +#import "COSBeaconReportConfig.h" +#import "COSBeaconQUICArgs.h" +#import "COSBeaconMsfSendArgs.h" +#import "COSBeaconCallBackManager.h" +NS_ASSUME_NONNULL_BEGIN + + +typedef void (^COSBeaconQUICCallback)(COSBeaconQUICArgs *args, COSBeaconQUICResult *result); + +typedef void (^COSBeaconMsfSendCallback)(COSBeaconMsfSendResult *beaconResult); +/** + 长连接网络数据传输的适配协议(可选):当业务对灯塔上报数据实时性有要求时,可开启长连接上报功能. + 开启此功能需要业务集成TQUIC SDK. 初始化TQUIC SDK并实现TUQIC SDK数据传输的代理接口. + */ +@protocol COSBeaconTransferProtocal +@optional +/// QUIC 数据传输的代理接口 +- (void)transferArgs:(COSBeaconQUICArgs *)args + delegate:(COSBeaconQUICCallback)callBack; + +/** + * MSFSDK数据传输的代理接口 + * callbackManager: 回调管理类. 收到msf回调后,接入层可以通过COSBeaconCallBackManager单例对象,直接调用callBackSendResult回传结果.4.1.36版本msfSDK 是通过代理回调结果,为了简化接入层逻辑,所以这里构建了COSBeaconCallBackManager中间层. + * return: sequenceId. 接入层需要保证sequenceId合法,非法id(如:0,nil,NULL)灯塔会拦截走原通道, 非法情况下继续调 MSF,有可能造成数据重复. + */ +- (NSInteger)sendArgs:(COSBeaconMsfSendArgs *)beaconArgs callback:(COSBeaconCallBackManager *)callbackManager; + + +@end + +/// COSBeaconMttProtocal穿上甲日志协议 +@protocol COSBeaconMttProtocal +- (void)mttLog:(NSString *)message + file:(const char *)file + function:(const char *)function + line:(NSUInteger)line + threadID:(NSInteger)threadID + module:(NSString *)module + folder:(int)folder level:(int)level; + +@end + +extern BOOL COSBeaconHasStarted; + +/** + 上报模块的接口类:提供SDK对外API + */ +@interface COSBeaconReport : NSObject + +/// 原来使用的设备标识符,通过OMGID SDK获取 +@property (copy, nullable) NSString *omgId; + +/// 渠道ID +@property (copy, nullable) NSString *channelId; + +/// 是否开启严苛模式,默认为NO,严苛模式开启时用于上线前排查问题, SDK会主动触发crash, 上线务必关闭!!! +@property (assign) BOOL strictMode; + +/// 设置本地调试时控制台输出的日志级别:1 fetal, 2 error, 3 warn, 4 info, debug, 5 debug, 10 all, 默认为0,不打印日志 +/// 线上正式环境,必须设置为0关闭此日志 +@property (nonatomic, assign) int logLevel; + +/// 是否采集WiFiMac地址,参数为NO时不采集,默认采集,如果需要关闭则需要在初始化前设置为NO +@property (assign) BOOL collectMacEnable DEPRECATED_MSG_ATTRIBUTE("4.2.74以后不再采集,如需使用请自行采集后通过[COSBeaconReport.sharedInstance setWifiName:/setWifiMac:]填充"); + +/// 是否采集idfa,参数为NO时不采集,默认采集,如果需要关闭则需要在初始化前设置为NO +@property (assign) BOOL collectIdfaEnable DEPRECATED_MSG_ATTRIBUTE("4.2.74以后不再采集,如需使用请自行采集后通过[COSBeaconReport.sharedInstance setIDFA:]填充"); + + +/// 是否采集idfv,默认采集。无特殊情况不要关闭 ! 若关闭后务必在授权后填充IDFV(setIDFV:) +@property (assign) BOOL collectIdfvEnable; + +/// 网络数据传输通道代理 +@property (nonatomic, weak) id transferDelegate; + +/// 穿山甲日志代理 +@property (nonatomic, weak) id mttDelegate; + + ++ (COSBeaconReport *)sharedInstance; + +/** + * 初始化接口,开启灯塔服务,会向服务器查询策略,初始化各个模块的默认数据上传器等 + * 1.宿主(应用)集成灯塔时: + * a:建议在didFinishLaunchingWithOptions中最早位置调用灯塔,避免其他组件SDK提前初始化灯塔而引起数据错误问题. + * b:应用中多份组件SDK同时使用灯塔,强烈建议配置COSBeaconInfo.plist文件记录beacon_main_appkey, + * 配置后灯塔初始化以配置文件为准,所以务必确保配置文件appkey正确!! 非必要情况不要修改配置文件!! + * 2.二方(中台,组件)SDK集成灯塔: + * a:使用公版灯塔(和宿主共用)情况下, 禁止调用此方法!!! + * b:使用前缀版本灯塔情况下,需要调用此方法. 通常一个二方SDK业务对应一份前缀版本灯塔,彼此是相互隔离. + * @param appKey 各业务在灯塔平台申请的业务唯一标识 + * @param config 全局配置,可配置一些开关和策略等 + */ +- (void)startWithAppkey:(NSString *)appKey config:(nullable COSBeaconReportConfig *)config; + +/// 上报事件 +/// @param event 事件,包括所有用户行为事件、APP启动事件等,事件的具体定义参考COSBeaconEvent模型类 +/// @return 返回事件上报结果,此同步返回的结果只代表事件符合上报要求,可以进行上报, +/// 但不一定代表事件当前已成功上报到服务端,有可能存在事件在本地缓存并等待上报等情况 +- (COSBeaconReportResult *)reportEvent:(COSBeaconEvent *)event; + +/// 给指定的appKey设置附加参数,此appKey的所有事件都会带上这些参数 +/// @param additionalParams 附加参数 +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +/// @return 返回设置参数结果,参数非法将返回NO, 设置成功返回 YES. (参数类型要求是:NSNumber 和 NSString) +- (BOOL)setAdditionalParams:(NSDictionary *)additionalParams forAppKey:(NSString *)appKey; + +/// 用户设置抽样事件,根据appkey和eventCode进行抽样 +/// @param appkey 多通道 +/// @param sampleEventDict key是事件名(EventCode),value是抽样比例的分子,分母固定10000,分子区分范围:0~10000. +/// 比如,输入1代表抽样留万分之一,输入10代表抽样留千分之一,输入0为不上报 +/// @return 返回设置抽样配置结果,参数非法将返回NO, 设置成功返回 YES +- (BOOL)setUserSampleEvents:(NSDictionary *)sampleEventDict forAppKey:(NSString *)appkey; + +/// 给指定的appKey设置userId +/// @param userId 用户唯一标识符 +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +- (void)setUserId:(NSString *)userId forAppKey:(NSString *)appKey; + +/// 给指定的appKey设置openid +/// @param openId 小程序、H5设置的开放平台的id +/// @param appKey 各业务在灯塔平台申请的业务唯一标识 +- (void)setOpenId:(NSString *)openId forAppKey:(NSString *)appKey; + + +/** + * 设置O16和O36参数 + * 填充设备id: 灯塔默认只使用IDFV来区分设备, 通常建议集成时填充稳定的设备ID, 比如IDFA,或者专门的SDK产生的设备ID + */ +- (void)setOStarO16:(NSString *)o16 o36:(nullable NSString *)o36; + +/// 把OStarSDK的版本号透传给灯塔 +- (void)setOStarVersion:(NSString *)ostarVersion; + +/// 默认不采集idfa,由需采集idfa的应用宿主填充. +- (void)setIDFA:(NSString *)idfa; + +/// 默认采集IDFV,业务如有关闭IDFV,用户同意隐私采集后,需填充给灯塔 +- (void)setIDFV:(NSString *)idfv; + +/// 设置wifiName. 用户授权隐私数据采集后,可统一采集后填充到灯塔 +- (void)setWifiName:(NSString *)wifiName; + +/// 设置wifiMac. 用户授权隐私数据采集后,可统一采集后填充到灯塔 +- (void)setWifiMac:(NSString *)wifiMac; + + +/// 获取所有灯塔已默认采集的公参 +- (COSBeaconBaseInfoModel *)getCommonParams; + +///Socket上报开启/关闭接口,默认YES,如果需要关闭则需要设置为NO +- (void)setSocketOnOff:(BOOL)yesOrNo; + +@end + +NS_ASSUME_NONNULL_END + +#define BEACON_SDK_VERSION @"4.2.76.52" \ No newline at end of file diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconReportConfig.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconReportConfig.h new file mode 100644 index 0000000..ac79072 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconReportConfig.h @@ -0,0 +1,60 @@ +// +// COSBeaconReportConfig.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2014/4/8. +// Copyright © 2014 tencent.com. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +typedef NS_ENUM(NSInteger, COSBeaconCompressionType) { + COSBeaconCompressionGZIP = 2, // GZIP压缩(默认) + COSBeaconCompressionLZMA = 4, // LZMA +}; + +/** + 基础策略配置:通过此配置类可以灯塔基础配置项进行硬编码设置,如果进行云配置可联系对接人. + */ +@interface COSBeaconReportConfig : NSObject + +/// 开启或者关闭事件上报功能,默认为YES可进行上报,如果有给用户提供关闭事件上报的接口等情况,可设置为NO. 关闭后事件不作任何处理 +@property (nonatomic, assign) BOOL eventReportEnabled; + +/// 开启或关闭内置事件上报, 默认为YES开启。 如果需要关闭, 可设置为NO, 关闭后拦截内置事件:[rqd_applaunched, rqd_appresumed, rqd_appexited, rqd_heartbeat] +@property (nonatomic, assign) BOOL internalEventEnabled; + +/// 开启或者关闭策略请求功能,默认为YES进行策略请求,如果需要关闭,可设置为NO +@property (nonatomic, assign) BOOL configQueryEnabled; + +/// 事件轮询上传开关,默认打开. 关闭后业务生成的事件会入库,但不上传到服务端,达到DB上限后丢弃剩余事件. +@property (nonatomic, assign) BOOL eventUploadEnabled; +/// 二进制请求包压缩方式,默认GZIP +@property (nonatomic, assign) COSBeaconCompressionType compressionType; + +/// 本地数据库的最大容量(超过限额不予存储),默认10000条,保护区间是100~100000条,云端优先级高于本地设置 +@property (nonatomic, assign) NSInteger maxDBCount; + +/// 实时事件上报的轮询间隔,默认2s,允许区间是[0.1,20]s +@property (nonatomic, assign) NSInteger realTimeEventPollingInterval; +/// 普通事件上报的轮询间隔,默认5s,允许区间是[1,50]s +@property (nonatomic, assign) NSInteger normalEventPollingInterval; +/// 实时事件上报条数,默认48s,允许区间是[10,1000] +@property (nonatomic, assign) NSInteger realTimeEventMaxUploadCount; +/// 普通事件上报条数,默认48s,允许区间是[10,1000] +@property (nonatomic, assign) NSInteger normalEventMaxUploadCount; +/// 上报后及时补报开关 默认为YES开启。 如果需要关闭, 可设置为NO +@property (nonatomic, assign) BOOL uploadImmediatelyEnabled; +/// 当使用QUIC 上报时是否开启7层,默认NO +@property (nonatomic, assign) BOOL H3OverQUICEnabled; + +/// 事件上报服务的域名,一般不需要设置,有特殊需求时找SDK同学对接 +@property (nonatomic, copy, nullable) NSString *uploadURL; + +/// 配置服务的域名,一般不需要设置,有特殊需求时找SDK同学对接 +@property (nonatomic, copy, nullable) NSString *configURL; + +@end + +NS_ASSUME_NONNULL_END diff --git a/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconResult.h b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconResult.h new file mode 100644 index 0000000..79b84e8 --- /dev/null +++ b/COSBeaconAPI_Base.xcframework/ios-arm64_x86_64-maccatalyst/COSBeaconAPI_Base.framework/Headers/COSBeaconResult.h @@ -0,0 +1,71 @@ +// +// COSBeaconResult.h +// COSBeaconAPI_Base +// +// Created by jackhuali on 2020/4/6. +// Copyright © 2020 tencent.com. All rights reserved. +// + +#import +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, COSBeaconResultType) { + COSBeaconResultTypeSuccess = 0, // 成功 + COSBeaconResultTypeIllegalParameters, // 参数非法,一般是接口入参校验不通过 + COSBeaconResultTypeConfigOff, // 配置关闭,导致上报失败或者不需要上报 + COSBeaconResultTypeParamsExceededLength, // 参数长度过长 + COSBeaconResultTypeSDKNotStarted, // SDK未初始化就进行上报 + COSBeaconResultTypeUnknow, // 未知错误 +}; +/** + COSBeaconBaseResult:基础结果类 + */ +@interface COSBeaconBaseResult : NSObject + +/// 上报结果的状态类型,此结果类型一般只代表事件在本地校验的结果,不一定代表事件成功上报到服务端 +@property (nonatomic, assign) COSBeaconResultType type; + +/// 具体错误信息,成功时为空 +@property (nonatomic, copy) NSString *errorMessage; + +/// 事件ID,实时和普通事件的id分开计算,有可能相同 +@property (nonatomic, copy) NSString *eventId; + +@end + +/** + COSBeaconReportResult:上报事件结果类 + */ +@interface COSBeaconReportResult : COSBeaconBaseResult +@end + +/** + COSBeacon QUIC 回调参数对象 + */ +@interface COSBeaconQUICResult : NSObject + +@property(nonatomic, strong) NSURLResponse * _Nonnull response; + +@property(nonatomic, strong) id _Nonnull responseObject; + +@property(nonatomic, strong) NSError * _Nonnull error; + +@end + +/** + MSFSDK 发送数据结果回调: 0 代表成功 非零则是对应错误码 + */ +@interface COSBeaconMsfSendResult : NSObject +/// sequenceId +@property(nonatomic, assign) NSInteger sequenceId; +/// 发送状态码 +@property(nonatomic, assign) NSInteger sendCode; +/// 发送错误信息 +@property(nonatomic, copy) NSString *sendMsg; + + +@end + + + +NS_ASSUME_NONNULL_END diff --git a/QimeiSDK.xcframework/Info.plist b/QimeiSDK.xcframework/Info.plist new file mode 100644 index 0000000..2809993 --- /dev/null +++ b/QimeiSDK.xcframework/Info.plist @@ -0,0 +1,57 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + QimeiSDK.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64_x86_64-maccatalyst + LibraryPath + QimeiSDK.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + QimeiSDK.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiAuditService.h b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiAuditService.h new file mode 100644 index 0000000..6f2dc0b --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiAuditService.h @@ -0,0 +1,33 @@ +// +// QimeiAuditService.h +// QimeiAudit +// +// Created by pariszhao on 2021/3/29. +// Copyright © 2021 tencent. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface QimeiAuditService : NSObject + ++ (instancetype)shareInstance; + +- (void)startWithAppkey:(nonnull NSString *)appkey; + +- (NSString *)tick; + +@end + +NS_ASSUME_NONNULL_END + + +// 摄像头检测 +FOUNDATION_EXPORT const char* _Nullable kCameraDefaultId; + + /// 开始检测摄像头环境,在开始视频之后再调用 + /// - Parameter camera_id: 传入当前AVCaptureDevice的uniqueID,如果不清楚传入默认值kCameraDefaultId +FOUNDATION_EXPORT void camera_detect(const char* _Nullable camera_id); + + diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiCommon.h b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiCommon.h new file mode 100644 index 0000000..a7ea746 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiCommon.h @@ -0,0 +1,7 @@ +#ifndef QimeiCommon_h +#define QimeiCommon_h +#import + +#define KEEP_CLASS_AVAILABLE NS_CLASS_AVAILABLE(10_11, 9_0) + +#endif /* QimeiCommon_h */ diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiContent.h b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiContent.h new file mode 100644 index 0000000..8d4fd36 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiContent.h @@ -0,0 +1,23 @@ +// +// QimeiContent.h +// QimeiSDK +// +// Created by pariszhao on 2020/9/27. +// Copyright © 2020 tencent. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +//Qimei的具体内容载体 +@interface QimeiContent : NSObject + +/// 旧Qimei,A3字段, q16 +@property (nonatomic, copy, readonly, nullable) NSString *qimeiOld; +/// 新Qimei,A153字段, q36 +@property (nonatomic, copy, readonly, nullable) NSString *qimeiNew; + +@end + +NS_ASSUME_NONNULL_END diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiSDK.h b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiSDK.h new file mode 100644 index 0000000..35144e4 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiSDK.h @@ -0,0 +1,10 @@ +// QimeiSDK 主接口 + +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiService.h b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiService.h new file mode 100644 index 0000000..ffa1e10 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiService.h @@ -0,0 +1,98 @@ +// +// QimeiService.h +// QimeiSDK +// +// Created by pariszhao on 2020/9/24. +// Copyright © 2020 tencent. All rights reserved. +// + +#import +#import "QimeiContent.h" +#import "QimeiServiceConfig.h" + +NS_ASSUME_NONNULL_BEGIN + +//获取Qimei的入口类 +@interface QimeiService : NSObject + +//标记service是否被初始化 +@property (nonatomic, assign, readonly) BOOL hasStart; + ++ (instancetype)serviceWithAppkey:(NSString *)appkey; + +// isMainService 在app初始化时填Yes, 二方sdk初始化时填NO +- (void)setIsMainService:(BOOL)isMainService; + +//debug打开可以打印更多信息,建议只是debug模式下开启 +- (void)setDebugMode:(BOOL)debug; + +//设置userid,userid类型可自定义 QQ/GUID/OMGID等, 可调用多次,设置多个账号 +- (void)setUserId:(NSString *)userId forType:(NSString *)type; + +//设置渠道号 +- (void)setChannelId:(NSString *)channelId; + +//设置appVersion,业务不设置的话,sdk内部会自己采集 +- (void)setAppVersion:(NSString *)appVersion; + +//设置log打印,建议都接入自己的log日志中,方便定位问题 +- (void)setLogBlock:(void(^)(NSString *msg))logBlock; + + + +/* + 设置配置,可以关闭采集的字段idfa/idfv + */ +- (void)setConfig:(QimeiServiceConfig *)config; + +/* + 初始化接口,调用该接口前完成channelId,userId等的设置工作 + */ +- (void)start; + +/* + 同步获取qimei,里面的内容(qimeiold/qimeinew)可能为空 + */ +- (nullable QimeiContent *)getQimei; + +/* + 异步获取qimei,如果本地没有则等待网络请求的回调,针对的是APP首次安装本地没有qimei的场景。 + !!!只建议在APP启动阶段调用一次本异步接口,其余阶段使用同步接口获取qimei + */ +- (void)getQimeiWithBlock:(void(^_Nullable)(QimeiContent *_Nullable qimei))qimeiBlock; + +/* + only for 灯塔 + */ +- (nullable NSString *)getBeaconTicket; + +/* + 背景:在第一次启动app时,因为生成qimei需要网络,此时还没有qimei,但是部分网络接口需要使用到。 + 使用:携带该token到server,server传token给qimei的server可以换取一个qimei。 + */ +- (NSString *)getToken; + +/* + 仅sdk需要设置 + */ +- (void)setSdkName:(NSString *)sdkName; + +/* + 开启稽核 + */ +- (void)enableAudit:(BOOL)enable; + +//获取SDK版本号 +- (nonnull NSString *)sdkVersion; + +/* + 默认为同意隐私协议,如果要不同意,请在调用start之前设置NO + 不同意隐私协议将不会再下发Qimei36 + 然后设置隐私协议为YES,会触发QimeiSDK的真实初始化 + */ +- (void)setAgreePrivacy:(BOOL)agreePrivacy; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiServiceConfig.h b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiServiceConfig.h new file mode 100644 index 0000000..1127db5 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/QimeiServiceConfig.h @@ -0,0 +1,28 @@ +// +// QimeiServiceConfig.h +// QimeiSDK +// +// Created by pariszhao on 2020/12/17. +// Copyright © 2020 tencent. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +//QimeiService配置项 +@interface QimeiServiceConfig : NSObject + +//是否采集idfa,默认采集 +@property (nonatomic, assign) BOOL collectIdfa; + +//是否采集idfv,默认采集 +@property (nonatomic, assign) BOOL collectIdfv; + +//是否开启jsBridge,默认开启 +//开启jsBridge之后,web可以通过特定的jsapi访问Qimei信息 +@property (nonatomic, assign) BOOL openJsBridge; + +@end + +NS_ASSUME_NONNULL_END diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/ckey_lib.h b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/ckey_lib.h new file mode 100644 index 0000000..79ae2d6 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/ckey_lib.h @@ -0,0 +1,295 @@ +#import + +#define KEEP_CLASS_AVAILABLE NS_CLASS_AVAILABLE(10_11, 9_0) + +NS_ASSUME_NONNULL_BEGIN + +/// TODO 是否删除 +KEEP_CLASS_AVAILABLE +@protocol reportProtocol +/// @brief 上报接口 +/// @param event event +/// @param reportInfo 上报的信息 +- (void)report: (NSString*)appkey + event:(NSString*)event + param:(NSDictionary*)reportInfo; + +/// @brief 获取 qimei +/// @param appkey 灯塔appkey +/// @return 返回灯塔Qimei36 +- (NSString*)getQimei36: (NSString*)appkey; +@end + +KEEP_CLASS_AVAILABLE +@interface CKeyInfo : NSObject +// 加密后数据 +@property (nonatomic, copy) NSString *data; +// ckey +@property (nonatomic, copy) NSString *ckey; +@end + +// vsckey 旧版本接口 +KEEP_CLASS_AVAILABLE +@interface ckey_lib : NSObject + +// reportProtocol接口调用业务实现的getQimei和上报接口 +@property (nonatomic,weak) id reportDelegate; + +/// 单实例 ++ (instancetype)sharedInstance; + +/// @brief 初始化 ckey 接口 +/// @param delegate 上报协议, 当前不使用 +/// @param guid 业务guid +/// @param vsAppKey 具体业务 key,需要在 http://wp.pcg.com/#/apps/service/00000000/db/platform?platformid=530603 申请 +/// @return 初始化成功返回 YES,否则为 NO +- (BOOL)initCkeyLib : (id)delegate + guid : (NSString*)guid + vsAppkey: (NSString*)vsAppKey; + +/// @brief 获取 ckey 库版本 +- (NSString *)getSoVersion; + +/// @brief 添加多 vsappkey 可以通过多次初始化或使用 addVsAppKey +/// @param vsAppKey 具体业务key,需要在http://wp.pcg.com/#/apps/service/00000000/db/platform?platformid=530603申请 +/// @return 添加成功返回 YES,否则为 NO +- (BOOL) addVsAppKey : (NSString*)vsAppKey; + +/// @brief 传入 base64 后的加密数据, 双清单解密算法 +/// @return 返回解密数据 +- (NSString *)decrypt : (NSString*)data; + +/// @brief 双清单加密, data 为明文字符串 +- (NSString *)encrypt : (NSString *)data; + +/// @brief 使用公钥解密数据 +/// @param cipher base64 字符串 +/// @param pubkey 公钥, der 格式 +/// @return 返回解密结果 ++ (NSData *)decryptRSA : (NSString *)cipher pubkey:(NSString *)pubkey; + +/// @brief 签名接口 +/// @param userID 用户 ID +/// @param moudleID 模块 ID +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名结果, 可见字符 ++ (NSMutableData*)signWith:(NSString *)userID + moudleID:(NSString *)moudleID + salt:(void*)salt + saltsz:(int)saltsz; + +/// @brief 协议签名接口 +/// @param userID 用户账号或者 ID +/// @param moudleID 模块ID, 用于区分业务使用场景 +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名数据可见数据 ++ (NSString*)strSignWith:(NSString *)userID + moudleID:(NSString *)moudleID + salt:(void*)salt + saltsz:(int)saltsz; + +/// @brief 轻签名 +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名数据不可见字符 ++ (NSMutableData *)lwsign:(void*)salt + saltsz:(unsigned)saltsz; + +/// @brief 轻签名 +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名数据可见数据 ++ (NSString *)strLwsign:(void*)salt + saltsz:(unsigned)saltsz; + +/// @brief 获取 token, 当前无用, 直接返回 "2" + guid +- (NSString*) getToken : (NSString*) guid + platForm : (int)platForm + strappVer : (NSString*) strappVer; + +/// @brief 获取本地 token, 当前无用, 直接返回 "2" + guid +- (NSString *)getLocalToken:(NSString*) guid; + +/// @brief 获取 ckey v3 接口 +/// @param strToken token +/// @param unPlatform 平台 ID, 需要申请 +/// @param unEncVer 加密版本 +/// @param strappVer 业务版本 +/// @param strAppKey app key +/// @param strvid 视频 vid +/// @param sdtFrom 申请的 sdtfrom +/// @param strRandflag 非必须, 可空 +/// @param strBundleID bundle id +/// @param strGuid 常规 guid(如手 Q 等) +/// @param strStkey stkey +/// @param intA 业务额外数据 +/// @param ArrLen 业务额外数据长度 +/// @param uTime 当前时间 +/// @param deviceModel 设备 module, 上报使用 +/// @param currentDevice 当前设备名称 +/// @return 返回 ckey +- (NSString *)getCKey : (NSString*) strToken + unPlatform : (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + strAppKey : (NSString*) strAppKey + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + strStkey : (NSString*) strStkey + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen + deviceModel : (NSString*) deviceModel + currentDevice : (NSString*) currentDevice; + +/// @brief 获取 ckey 旧接口 +/// @param strToken token +/// @param unPlatform 平台 ID, 需要申请 +/// @param strappVer 业务版本 +/// @param strAppKey app key +/// @param strvid 视频 vid +/// @param sdtFrom 申请的 sdtfrom +/// @param strRandflag 非必须, 可空 +/// @param uTime 当前时间 +/// @return 返回 ckey +- (NSString *)getCKey_O : (NSString*) strToken + unPlatform : (int) unPlatform + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + strAppKey : (NSString*) strAppKey + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + uTime : (int) uTime; + +/// @brief 任务数据加密接口 +/// @param seqid 请求 id +/// @param vid 视频 vid +/// @param omgid omg id +/// @param guid 常规 guid(如手 Q 等) +/// @param taskid 任务 id +/// @param type 任务类型 +/// @param systemtype 系统类型 +/// @param timestamp 当前时间 +/// @param rand 随机数 +/// @param struin 账号 +/// @return 返回加密后数据 +- (NSString *)getTaskEncrypt : (NSString*) seqid + vid : (NSString*) vid + omgid : (NSString*) omgid + guid : (NSString*) guid + taskid : (int) taskid + type : (int) type + systemtype : (int) systemtype + timestamp : (int) timestamp + rand : (int) rand + struin : (NSString*) struin; + +/// @brief ckey 生成函数 +/// @param unPlatform 平台号, 申请获得 +/// @param unEncVer 不需要 +/// @param strappVer 业务版本号 +/// @param strvid 视频VID, 点播vid, 直播channelid +/// @param uTime 当前时间, 点播85 -3 、直播 32 -3 需要使用服务器时间生成ckey重试。 +/// @param sdtFrom 平台号对应的dtfrom +/// @param strRandflag rand ,非必须, 无可传空 +/// @param strBundleID bundleID +/// @param strGuid 业务guid,用户唯一标识 +/// @param intA 视频额外字段 +/// @param ArrLen 额外字段数组长度 +/// @return ckey 返回ckey , 长度大于 10 为正常,否则为错误码 ? +- (NSString *)getCKeyAll: (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen; + +/// @brief ckey 生成函数 +/// @param unPlatform 平台号, 申请获得 +/// @param unEncVer 不需要 +/// @param strappVer 业务版本号 +/// @param strvid 视频VID, 点播vid, 直播channelid +/// @param uTime 当前时间, 点播85 -3 、直播 32 -3 需要使用服务器时间生成ckey重试。 +/// @param sdtFrom 平台号对应的dtfrom +/// @param strRandflag rand ,非必须, 无可传空 +/// @param strBundleID bundleID +/// @param strGuid 业务guid,用户唯一标识 +/// @param intA 视频额外字段 +/// @param ArrLen 额外字段数组长度 +/// @param strBusJson 额外数据 +/// @return ckey 返回ckey , 长度大于 10 为正常,否则为错误码 ? +- (NSString *)getCKeyAll: (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen + busJson : (NSString *) strBusJson; + +/// @brief ckey 生成函数, 可附加 post 数据, 用于签名校验 +/// @param unPlatform 平台号, 申请获得 +/// @param unEncVer 不需要 +/// @param strappVer 业务版本号 +/// @param strvid 视频VID, 点播vid, 直播channelid +/// @param uTime 当前时间, 点播85 -3 、直播 32 -3 需要使用服务器时间生成ckey重试。 +/// @param sdtFrom 平台号对应的dtfrom +/// @param strRandflag rand ,非必须, 无可传空 +/// @param strBundleID bundleID +/// @param strGuid 业务guid,用户唯一标识 +/// @param intA 视频额外字段 +/// @param ArrLen 额外字段数组长度 +/// @param strBusJson 额外数据 +/// @param postData 发送 ckey 时待签名数据, 为 nil 或者长度为 0 时不签名 +/// @return { encyrpt_data, ckey } 返回 加密后请求数据 && ckey, ckey 长度大于 10 为正常,否则为错误码 ? +- (CKeyInfo *)getCKeyAll: (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen + busJson : (NSString *) strBusJson + postData : (NSData *) postData; + +@end + +NS_ASSUME_NONNULL_END + +/// @brief 开启反调试 +FOUNDATION_EXPORT void qimei_enable_ptrace(void); + +/// @brief 加密日志 +/// @param from 协商的 from 来源 +/// @param log 待加密的日志 +/// @return char *, 返回加密的日志信息, 需要调用方 qimei_free_data +FOUNDATION_EXPORT char * _Nullable qimei_encrypt_log(const char * _Nonnull from, const char * _Nonnull log); + +/// @brief 解密安全加密后的返回数据 +/// @param data 待解密数据, 为 base64 数据 , 以 '\0' 结束 +/// @param out_data 返回数据, 需要调用方 qimei_free_data, 如果解密失败, 则返回 NULL +/// @param out_data_len 返回数据长度 +/// @return 解密状态, 0 成功, 其他为具体错误 +FOUNDATION_EXPORT int qimei_decrpt_ckey_sec_data(const char * _Nonnull data, char * _Nullable * _Nonnull out_data, int * _Nonnull out_data_len); + +/// @brief 释放数据 +/// @param data 待释放的数据 +FOUNDATION_EXPORT void qimei_free_data(char * _Nullable * _Nonnull data); diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/uskey.h b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/uskey.h new file mode 100644 index 0000000..4d640ae --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Headers/uskey.h @@ -0,0 +1,39 @@ +// +// uskey.h +// +// Created by pariszhao on 2024/8/29. +// + +#include + +#define KEEP_PUBLIC __attribute__((visibility("default"))) + +typedef const struct __UKInstance* UKInstance; + +#ifdef __cplusplus +extern "C" { +#endif + + /// 获取Key单例 +KEEP_PUBLIC UKInstance UKInstanceGetDefault(); + + /// USkey初始化 +KEEP_PUBLIC void UKInstanceInit(UKInstance instance, const char *app_key, const char *app_ver); + + + /// 生成uskey加密字符串 + /// - Parameters: + /// - UKInstance, uskey实例对象 + /// - bus_id, 由星迹分配,标识一个业务场景 + /// - q36:调用QimeiSDK接口拿到的Q36 + /// - bus_infos: k1=v1&k2=v2&k3=v3&k4=&k5=v5 +KEEP_PUBLIC const char* UKInstanceGetUSkey(UKInstance instance, const char *bus_id, const char *q36, const char *bus_infos); + + + /// 在用完uskey后需要调用该函数进行释放 + /// - Parameter uskey:UKInstanceGetUSkey返回的内容 +KEEP_PUBLIC void UKInstanceFreeUskey(const char *uskey); + +#ifdef __cplusplus +} +#endif diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Info.plist b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Info.plist new file mode 100644 index 0000000..b7b77b0 Binary files /dev/null and b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Info.plist differ diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Modules/module.modulemap b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Modules/module.modulemap new file mode 100644 index 0000000..b2028a6 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module QimeiSDK { + umbrella header "QimeiSDK.h" + + export * + module * { export * } +} diff --git a/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/QimeiSDK b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/QimeiSDK new file mode 100644 index 0000000..1127db3 Binary files /dev/null and b/QimeiSDK.xcframework/ios-arm64_armv7/QimeiSDK.framework/QimeiSDK differ diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiAuditService.h b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiAuditService.h new file mode 100644 index 0000000..6f2dc0b --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiAuditService.h @@ -0,0 +1,33 @@ +// +// QimeiAuditService.h +// QimeiAudit +// +// Created by pariszhao on 2021/3/29. +// Copyright © 2021 tencent. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface QimeiAuditService : NSObject + ++ (instancetype)shareInstance; + +- (void)startWithAppkey:(nonnull NSString *)appkey; + +- (NSString *)tick; + +@end + +NS_ASSUME_NONNULL_END + + +// 摄像头检测 +FOUNDATION_EXPORT const char* _Nullable kCameraDefaultId; + + /// 开始检测摄像头环境,在开始视频之后再调用 + /// - Parameter camera_id: 传入当前AVCaptureDevice的uniqueID,如果不清楚传入默认值kCameraDefaultId +FOUNDATION_EXPORT void camera_detect(const char* _Nullable camera_id); + + diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiCommon.h b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiCommon.h new file mode 100644 index 0000000..a7ea746 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiCommon.h @@ -0,0 +1,7 @@ +#ifndef QimeiCommon_h +#define QimeiCommon_h +#import + +#define KEEP_CLASS_AVAILABLE NS_CLASS_AVAILABLE(10_11, 9_0) + +#endif /* QimeiCommon_h */ diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiContent.h b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiContent.h new file mode 100644 index 0000000..8d4fd36 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiContent.h @@ -0,0 +1,23 @@ +// +// QimeiContent.h +// QimeiSDK +// +// Created by pariszhao on 2020/9/27. +// Copyright © 2020 tencent. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +//Qimei的具体内容载体 +@interface QimeiContent : NSObject + +/// 旧Qimei,A3字段, q16 +@property (nonatomic, copy, readonly, nullable) NSString *qimeiOld; +/// 新Qimei,A153字段, q36 +@property (nonatomic, copy, readonly, nullable) NSString *qimeiNew; + +@end + +NS_ASSUME_NONNULL_END diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiSDK.h b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiSDK.h new file mode 100644 index 0000000..35144e4 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiSDK.h @@ -0,0 +1,10 @@ +// QimeiSDK 主接口 + +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiService.h b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiService.h new file mode 100644 index 0000000..ffa1e10 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiService.h @@ -0,0 +1,98 @@ +// +// QimeiService.h +// QimeiSDK +// +// Created by pariszhao on 2020/9/24. +// Copyright © 2020 tencent. All rights reserved. +// + +#import +#import "QimeiContent.h" +#import "QimeiServiceConfig.h" + +NS_ASSUME_NONNULL_BEGIN + +//获取Qimei的入口类 +@interface QimeiService : NSObject + +//标记service是否被初始化 +@property (nonatomic, assign, readonly) BOOL hasStart; + ++ (instancetype)serviceWithAppkey:(NSString *)appkey; + +// isMainService 在app初始化时填Yes, 二方sdk初始化时填NO +- (void)setIsMainService:(BOOL)isMainService; + +//debug打开可以打印更多信息,建议只是debug模式下开启 +- (void)setDebugMode:(BOOL)debug; + +//设置userid,userid类型可自定义 QQ/GUID/OMGID等, 可调用多次,设置多个账号 +- (void)setUserId:(NSString *)userId forType:(NSString *)type; + +//设置渠道号 +- (void)setChannelId:(NSString *)channelId; + +//设置appVersion,业务不设置的话,sdk内部会自己采集 +- (void)setAppVersion:(NSString *)appVersion; + +//设置log打印,建议都接入自己的log日志中,方便定位问题 +- (void)setLogBlock:(void(^)(NSString *msg))logBlock; + + + +/* + 设置配置,可以关闭采集的字段idfa/idfv + */ +- (void)setConfig:(QimeiServiceConfig *)config; + +/* + 初始化接口,调用该接口前完成channelId,userId等的设置工作 + */ +- (void)start; + +/* + 同步获取qimei,里面的内容(qimeiold/qimeinew)可能为空 + */ +- (nullable QimeiContent *)getQimei; + +/* + 异步获取qimei,如果本地没有则等待网络请求的回调,针对的是APP首次安装本地没有qimei的场景。 + !!!只建议在APP启动阶段调用一次本异步接口,其余阶段使用同步接口获取qimei + */ +- (void)getQimeiWithBlock:(void(^_Nullable)(QimeiContent *_Nullable qimei))qimeiBlock; + +/* + only for 灯塔 + */ +- (nullable NSString *)getBeaconTicket; + +/* + 背景:在第一次启动app时,因为生成qimei需要网络,此时还没有qimei,但是部分网络接口需要使用到。 + 使用:携带该token到server,server传token给qimei的server可以换取一个qimei。 + */ +- (NSString *)getToken; + +/* + 仅sdk需要设置 + */ +- (void)setSdkName:(NSString *)sdkName; + +/* + 开启稽核 + */ +- (void)enableAudit:(BOOL)enable; + +//获取SDK版本号 +- (nonnull NSString *)sdkVersion; + +/* + 默认为同意隐私协议,如果要不同意,请在调用start之前设置NO + 不同意隐私协议将不会再下发Qimei36 + 然后设置隐私协议为YES,会触发QimeiSDK的真实初始化 + */ +- (void)setAgreePrivacy:(BOOL)agreePrivacy; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiServiceConfig.h b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiServiceConfig.h new file mode 100644 index 0000000..1127db5 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/QimeiServiceConfig.h @@ -0,0 +1,28 @@ +// +// QimeiServiceConfig.h +// QimeiSDK +// +// Created by pariszhao on 2020/12/17. +// Copyright © 2020 tencent. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +//QimeiService配置项 +@interface QimeiServiceConfig : NSObject + +//是否采集idfa,默认采集 +@property (nonatomic, assign) BOOL collectIdfa; + +//是否采集idfv,默认采集 +@property (nonatomic, assign) BOOL collectIdfv; + +//是否开启jsBridge,默认开启 +//开启jsBridge之后,web可以通过特定的jsapi访问Qimei信息 +@property (nonatomic, assign) BOOL openJsBridge; + +@end + +NS_ASSUME_NONNULL_END diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/ckey_lib.h b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/ckey_lib.h new file mode 100644 index 0000000..79ae2d6 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/ckey_lib.h @@ -0,0 +1,295 @@ +#import + +#define KEEP_CLASS_AVAILABLE NS_CLASS_AVAILABLE(10_11, 9_0) + +NS_ASSUME_NONNULL_BEGIN + +/// TODO 是否删除 +KEEP_CLASS_AVAILABLE +@protocol reportProtocol +/// @brief 上报接口 +/// @param event event +/// @param reportInfo 上报的信息 +- (void)report: (NSString*)appkey + event:(NSString*)event + param:(NSDictionary*)reportInfo; + +/// @brief 获取 qimei +/// @param appkey 灯塔appkey +/// @return 返回灯塔Qimei36 +- (NSString*)getQimei36: (NSString*)appkey; +@end + +KEEP_CLASS_AVAILABLE +@interface CKeyInfo : NSObject +// 加密后数据 +@property (nonatomic, copy) NSString *data; +// ckey +@property (nonatomic, copy) NSString *ckey; +@end + +// vsckey 旧版本接口 +KEEP_CLASS_AVAILABLE +@interface ckey_lib : NSObject + +// reportProtocol接口调用业务实现的getQimei和上报接口 +@property (nonatomic,weak) id reportDelegate; + +/// 单实例 ++ (instancetype)sharedInstance; + +/// @brief 初始化 ckey 接口 +/// @param delegate 上报协议, 当前不使用 +/// @param guid 业务guid +/// @param vsAppKey 具体业务 key,需要在 http://wp.pcg.com/#/apps/service/00000000/db/platform?platformid=530603 申请 +/// @return 初始化成功返回 YES,否则为 NO +- (BOOL)initCkeyLib : (id)delegate + guid : (NSString*)guid + vsAppkey: (NSString*)vsAppKey; + +/// @brief 获取 ckey 库版本 +- (NSString *)getSoVersion; + +/// @brief 添加多 vsappkey 可以通过多次初始化或使用 addVsAppKey +/// @param vsAppKey 具体业务key,需要在http://wp.pcg.com/#/apps/service/00000000/db/platform?platformid=530603申请 +/// @return 添加成功返回 YES,否则为 NO +- (BOOL) addVsAppKey : (NSString*)vsAppKey; + +/// @brief 传入 base64 后的加密数据, 双清单解密算法 +/// @return 返回解密数据 +- (NSString *)decrypt : (NSString*)data; + +/// @brief 双清单加密, data 为明文字符串 +- (NSString *)encrypt : (NSString *)data; + +/// @brief 使用公钥解密数据 +/// @param cipher base64 字符串 +/// @param pubkey 公钥, der 格式 +/// @return 返回解密结果 ++ (NSData *)decryptRSA : (NSString *)cipher pubkey:(NSString *)pubkey; + +/// @brief 签名接口 +/// @param userID 用户 ID +/// @param moudleID 模块 ID +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名结果, 可见字符 ++ (NSMutableData*)signWith:(NSString *)userID + moudleID:(NSString *)moudleID + salt:(void*)salt + saltsz:(int)saltsz; + +/// @brief 协议签名接口 +/// @param userID 用户账号或者 ID +/// @param moudleID 模块ID, 用于区分业务使用场景 +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名数据可见数据 ++ (NSString*)strSignWith:(NSString *)userID + moudleID:(NSString *)moudleID + salt:(void*)salt + saltsz:(int)saltsz; + +/// @brief 轻签名 +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名数据不可见字符 ++ (NSMutableData *)lwsign:(void*)salt + saltsz:(unsigned)saltsz; + +/// @brief 轻签名 +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名数据可见数据 ++ (NSString *)strLwsign:(void*)salt + saltsz:(unsigned)saltsz; + +/// @brief 获取 token, 当前无用, 直接返回 "2" + guid +- (NSString*) getToken : (NSString*) guid + platForm : (int)platForm + strappVer : (NSString*) strappVer; + +/// @brief 获取本地 token, 当前无用, 直接返回 "2" + guid +- (NSString *)getLocalToken:(NSString*) guid; + +/// @brief 获取 ckey v3 接口 +/// @param strToken token +/// @param unPlatform 平台 ID, 需要申请 +/// @param unEncVer 加密版本 +/// @param strappVer 业务版本 +/// @param strAppKey app key +/// @param strvid 视频 vid +/// @param sdtFrom 申请的 sdtfrom +/// @param strRandflag 非必须, 可空 +/// @param strBundleID bundle id +/// @param strGuid 常规 guid(如手 Q 等) +/// @param strStkey stkey +/// @param intA 业务额外数据 +/// @param ArrLen 业务额外数据长度 +/// @param uTime 当前时间 +/// @param deviceModel 设备 module, 上报使用 +/// @param currentDevice 当前设备名称 +/// @return 返回 ckey +- (NSString *)getCKey : (NSString*) strToken + unPlatform : (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + strAppKey : (NSString*) strAppKey + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + strStkey : (NSString*) strStkey + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen + deviceModel : (NSString*) deviceModel + currentDevice : (NSString*) currentDevice; + +/// @brief 获取 ckey 旧接口 +/// @param strToken token +/// @param unPlatform 平台 ID, 需要申请 +/// @param strappVer 业务版本 +/// @param strAppKey app key +/// @param strvid 视频 vid +/// @param sdtFrom 申请的 sdtfrom +/// @param strRandflag 非必须, 可空 +/// @param uTime 当前时间 +/// @return 返回 ckey +- (NSString *)getCKey_O : (NSString*) strToken + unPlatform : (int) unPlatform + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + strAppKey : (NSString*) strAppKey + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + uTime : (int) uTime; + +/// @brief 任务数据加密接口 +/// @param seqid 请求 id +/// @param vid 视频 vid +/// @param omgid omg id +/// @param guid 常规 guid(如手 Q 等) +/// @param taskid 任务 id +/// @param type 任务类型 +/// @param systemtype 系统类型 +/// @param timestamp 当前时间 +/// @param rand 随机数 +/// @param struin 账号 +/// @return 返回加密后数据 +- (NSString *)getTaskEncrypt : (NSString*) seqid + vid : (NSString*) vid + omgid : (NSString*) omgid + guid : (NSString*) guid + taskid : (int) taskid + type : (int) type + systemtype : (int) systemtype + timestamp : (int) timestamp + rand : (int) rand + struin : (NSString*) struin; + +/// @brief ckey 生成函数 +/// @param unPlatform 平台号, 申请获得 +/// @param unEncVer 不需要 +/// @param strappVer 业务版本号 +/// @param strvid 视频VID, 点播vid, 直播channelid +/// @param uTime 当前时间, 点播85 -3 、直播 32 -3 需要使用服务器时间生成ckey重试。 +/// @param sdtFrom 平台号对应的dtfrom +/// @param strRandflag rand ,非必须, 无可传空 +/// @param strBundleID bundleID +/// @param strGuid 业务guid,用户唯一标识 +/// @param intA 视频额外字段 +/// @param ArrLen 额外字段数组长度 +/// @return ckey 返回ckey , 长度大于 10 为正常,否则为错误码 ? +- (NSString *)getCKeyAll: (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen; + +/// @brief ckey 生成函数 +/// @param unPlatform 平台号, 申请获得 +/// @param unEncVer 不需要 +/// @param strappVer 业务版本号 +/// @param strvid 视频VID, 点播vid, 直播channelid +/// @param uTime 当前时间, 点播85 -3 、直播 32 -3 需要使用服务器时间生成ckey重试。 +/// @param sdtFrom 平台号对应的dtfrom +/// @param strRandflag rand ,非必须, 无可传空 +/// @param strBundleID bundleID +/// @param strGuid 业务guid,用户唯一标识 +/// @param intA 视频额外字段 +/// @param ArrLen 额外字段数组长度 +/// @param strBusJson 额外数据 +/// @return ckey 返回ckey , 长度大于 10 为正常,否则为错误码 ? +- (NSString *)getCKeyAll: (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen + busJson : (NSString *) strBusJson; + +/// @brief ckey 生成函数, 可附加 post 数据, 用于签名校验 +/// @param unPlatform 平台号, 申请获得 +/// @param unEncVer 不需要 +/// @param strappVer 业务版本号 +/// @param strvid 视频VID, 点播vid, 直播channelid +/// @param uTime 当前时间, 点播85 -3 、直播 32 -3 需要使用服务器时间生成ckey重试。 +/// @param sdtFrom 平台号对应的dtfrom +/// @param strRandflag rand ,非必须, 无可传空 +/// @param strBundleID bundleID +/// @param strGuid 业务guid,用户唯一标识 +/// @param intA 视频额外字段 +/// @param ArrLen 额外字段数组长度 +/// @param strBusJson 额外数据 +/// @param postData 发送 ckey 时待签名数据, 为 nil 或者长度为 0 时不签名 +/// @return { encyrpt_data, ckey } 返回 加密后请求数据 && ckey, ckey 长度大于 10 为正常,否则为错误码 ? +- (CKeyInfo *)getCKeyAll: (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen + busJson : (NSString *) strBusJson + postData : (NSData *) postData; + +@end + +NS_ASSUME_NONNULL_END + +/// @brief 开启反调试 +FOUNDATION_EXPORT void qimei_enable_ptrace(void); + +/// @brief 加密日志 +/// @param from 协商的 from 来源 +/// @param log 待加密的日志 +/// @return char *, 返回加密的日志信息, 需要调用方 qimei_free_data +FOUNDATION_EXPORT char * _Nullable qimei_encrypt_log(const char * _Nonnull from, const char * _Nonnull log); + +/// @brief 解密安全加密后的返回数据 +/// @param data 待解密数据, 为 base64 数据 , 以 '\0' 结束 +/// @param out_data 返回数据, 需要调用方 qimei_free_data, 如果解密失败, 则返回 NULL +/// @param out_data_len 返回数据长度 +/// @return 解密状态, 0 成功, 其他为具体错误 +FOUNDATION_EXPORT int qimei_decrpt_ckey_sec_data(const char * _Nonnull data, char * _Nullable * _Nonnull out_data, int * _Nonnull out_data_len); + +/// @brief 释放数据 +/// @param data 待释放的数据 +FOUNDATION_EXPORT void qimei_free_data(char * _Nullable * _Nonnull data); diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/uskey.h b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/uskey.h new file mode 100644 index 0000000..4d640ae --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Headers/uskey.h @@ -0,0 +1,39 @@ +// +// uskey.h +// +// Created by pariszhao on 2024/8/29. +// + +#include + +#define KEEP_PUBLIC __attribute__((visibility("default"))) + +typedef const struct __UKInstance* UKInstance; + +#ifdef __cplusplus +extern "C" { +#endif + + /// 获取Key单例 +KEEP_PUBLIC UKInstance UKInstanceGetDefault(); + + /// USkey初始化 +KEEP_PUBLIC void UKInstanceInit(UKInstance instance, const char *app_key, const char *app_ver); + + + /// 生成uskey加密字符串 + /// - Parameters: + /// - UKInstance, uskey实例对象 + /// - bus_id, 由星迹分配,标识一个业务场景 + /// - q36:调用QimeiSDK接口拿到的Q36 + /// - bus_infos: k1=v1&k2=v2&k3=v3&k4=&k5=v5 +KEEP_PUBLIC const char* UKInstanceGetUSkey(UKInstance instance, const char *bus_id, const char *q36, const char *bus_infos); + + + /// 在用完uskey后需要调用该函数进行释放 + /// - Parameter uskey:UKInstanceGetUSkey返回的内容 +KEEP_PUBLIC void UKInstanceFreeUskey(const char *uskey); + +#ifdef __cplusplus +} +#endif diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Info.plist b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Info.plist new file mode 100644 index 0000000..63cafea Binary files /dev/null and b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Info.plist differ diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Modules/module.modulemap b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Modules/module.modulemap new file mode 100644 index 0000000..b2028a6 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module QimeiSDK { + umbrella header "QimeiSDK.h" + + export * + module * { export * } +} diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/QimeiSDK b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/QimeiSDK new file mode 100644 index 0000000..91f78c9 Binary files /dev/null and b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/QimeiSDK differ diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeDirectory b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..814e3be Binary files /dev/null and b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeDirectory differ diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeRequirements b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..dbf9d61 Binary files /dev/null and b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeRequirements differ diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeRequirements-1 b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 0000000..28bee51 Binary files /dev/null and b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeResources b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..1490585 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeResources @@ -0,0 +1,237 @@ + + + + + files + + Headers/QimeiAuditService.h + + 1Ylutg7gTA+H0E+oaklr7FLvj9U= + + Headers/QimeiCommon.h + + ZiIj4lLw0ZYYL4OfWdQVRynQCS4= + + Headers/QimeiContent.h + + Sn0TSCLNkMTGdr3NyvddOdDjKIQ= + + Headers/QimeiSDK.h + + ZfeESQ82WzZjpHnXdo3JI9GdMkI= + + Headers/QimeiService.h + + MbzrPJe15HX+ypf6VlGvf+AMnGc= + + Headers/QimeiServiceConfig.h + + IL/p4AeCbc6wyE6A4Kxc93TeA6E= + + Headers/ckey_lib.h + + tQFM3a5RJPp8sphSZlxEgH2VbSU= + + Headers/uskey.h + + qs6jbG83zShgPaI+E8jj9ZDQ4kM= + + Info.plist + + Caq/VZyI2Uisj6z8anej0xGbMLo= + + Modules/module.modulemap + + zPr38mQ52ZB66x9vG9FMWN48yMI= + + + files2 + + Headers/QimeiAuditService.h + + hash + + 1Ylutg7gTA+H0E+oaklr7FLvj9U= + + hash2 + + A+hgk8UmZv8+MMsC+xDj+T4wVNZWWxIEsW9LLNxN8e4= + + + Headers/QimeiCommon.h + + hash + + ZiIj4lLw0ZYYL4OfWdQVRynQCS4= + + hash2 + + qVoN6m+80X6NMMvrNpc9MffxP+RQFa3vnNYGWE1lyXA= + + + Headers/QimeiContent.h + + hash + + Sn0TSCLNkMTGdr3NyvddOdDjKIQ= + + hash2 + + wvxmsdOLlO+Z32yx9eUn4kkSzzZoNdcWaG+1fxYZSUg= + + + Headers/QimeiSDK.h + + hash + + ZfeESQ82WzZjpHnXdo3JI9GdMkI= + + hash2 + + Qh69080dd/5gZqXR0BA6EeZ86goOODj/yUShCemp128= + + + Headers/QimeiService.h + + hash + + MbzrPJe15HX+ypf6VlGvf+AMnGc= + + hash2 + + sqjCMVYCnDujSeScLJlY5qsZkjWzac6JwXdj136R5m0= + + + Headers/QimeiServiceConfig.h + + hash + + IL/p4AeCbc6wyE6A4Kxc93TeA6E= + + hash2 + + OMst6SYWe83eFTu0SfP5rkoyej/0K0v/K8feSH2i88s= + + + Headers/ckey_lib.h + + hash + + tQFM3a5RJPp8sphSZlxEgH2VbSU= + + hash2 + + RH3v7SVGEgVlXri8pTR8qaCUPFfl8rrTIheD2BmHeaQ= + + + Headers/uskey.h + + hash + + qs6jbG83zShgPaI+E8jj9ZDQ4kM= + + hash2 + + terEMZIokAX5xZFRLoBZ6GsfRe9CEckZykgAVFiaI1w= + + + Modules/module.modulemap + + hash + + zPr38mQ52ZB66x9vG9FMWN48yMI= + + hash2 + + ZDUKDvgG1QoDC7RvPBXJF3goprvoJyD+zt7bd8G8TeE= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeSignature b/QimeiSDK.xcframework/ios-arm64_i386_x86_64-simulator/QimeiSDK.framework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..e69de29 diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Headers b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Modules b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Modules new file mode 120000 index 0000000..5736f31 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/QimeiSDK b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/QimeiSDK new file mode 120000 index 0000000..a1b6ea8 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/QimeiSDK @@ -0,0 +1 @@ +Versions/Current/QimeiSDK \ No newline at end of file diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Resources b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiAuditService.h b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiAuditService.h new file mode 100644 index 0000000..6f2dc0b --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiAuditService.h @@ -0,0 +1,33 @@ +// +// QimeiAuditService.h +// QimeiAudit +// +// Created by pariszhao on 2021/3/29. +// Copyright © 2021 tencent. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface QimeiAuditService : NSObject + ++ (instancetype)shareInstance; + +- (void)startWithAppkey:(nonnull NSString *)appkey; + +- (NSString *)tick; + +@end + +NS_ASSUME_NONNULL_END + + +// 摄像头检测 +FOUNDATION_EXPORT const char* _Nullable kCameraDefaultId; + + /// 开始检测摄像头环境,在开始视频之后再调用 + /// - Parameter camera_id: 传入当前AVCaptureDevice的uniqueID,如果不清楚传入默认值kCameraDefaultId +FOUNDATION_EXPORT void camera_detect(const char* _Nullable camera_id); + + diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiCommon.h b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiCommon.h new file mode 100644 index 0000000..a7ea746 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiCommon.h @@ -0,0 +1,7 @@ +#ifndef QimeiCommon_h +#define QimeiCommon_h +#import + +#define KEEP_CLASS_AVAILABLE NS_CLASS_AVAILABLE(10_11, 9_0) + +#endif /* QimeiCommon_h */ diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiContent.h b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiContent.h new file mode 100644 index 0000000..8d4fd36 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiContent.h @@ -0,0 +1,23 @@ +// +// QimeiContent.h +// QimeiSDK +// +// Created by pariszhao on 2020/9/27. +// Copyright © 2020 tencent. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +//Qimei的具体内容载体 +@interface QimeiContent : NSObject + +/// 旧Qimei,A3字段, q16 +@property (nonatomic, copy, readonly, nullable) NSString *qimeiOld; +/// 新Qimei,A153字段, q36 +@property (nonatomic, copy, readonly, nullable) NSString *qimeiNew; + +@end + +NS_ASSUME_NONNULL_END diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiSDK.h b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiSDK.h new file mode 100644 index 0000000..35144e4 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiSDK.h @@ -0,0 +1,10 @@ +// QimeiSDK 主接口 + +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiService.h b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiService.h new file mode 100644 index 0000000..ffa1e10 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiService.h @@ -0,0 +1,98 @@ +// +// QimeiService.h +// QimeiSDK +// +// Created by pariszhao on 2020/9/24. +// Copyright © 2020 tencent. All rights reserved. +// + +#import +#import "QimeiContent.h" +#import "QimeiServiceConfig.h" + +NS_ASSUME_NONNULL_BEGIN + +//获取Qimei的入口类 +@interface QimeiService : NSObject + +//标记service是否被初始化 +@property (nonatomic, assign, readonly) BOOL hasStart; + ++ (instancetype)serviceWithAppkey:(NSString *)appkey; + +// isMainService 在app初始化时填Yes, 二方sdk初始化时填NO +- (void)setIsMainService:(BOOL)isMainService; + +//debug打开可以打印更多信息,建议只是debug模式下开启 +- (void)setDebugMode:(BOOL)debug; + +//设置userid,userid类型可自定义 QQ/GUID/OMGID等, 可调用多次,设置多个账号 +- (void)setUserId:(NSString *)userId forType:(NSString *)type; + +//设置渠道号 +- (void)setChannelId:(NSString *)channelId; + +//设置appVersion,业务不设置的话,sdk内部会自己采集 +- (void)setAppVersion:(NSString *)appVersion; + +//设置log打印,建议都接入自己的log日志中,方便定位问题 +- (void)setLogBlock:(void(^)(NSString *msg))logBlock; + + + +/* + 设置配置,可以关闭采集的字段idfa/idfv + */ +- (void)setConfig:(QimeiServiceConfig *)config; + +/* + 初始化接口,调用该接口前完成channelId,userId等的设置工作 + */ +- (void)start; + +/* + 同步获取qimei,里面的内容(qimeiold/qimeinew)可能为空 + */ +- (nullable QimeiContent *)getQimei; + +/* + 异步获取qimei,如果本地没有则等待网络请求的回调,针对的是APP首次安装本地没有qimei的场景。 + !!!只建议在APP启动阶段调用一次本异步接口,其余阶段使用同步接口获取qimei + */ +- (void)getQimeiWithBlock:(void(^_Nullable)(QimeiContent *_Nullable qimei))qimeiBlock; + +/* + only for 灯塔 + */ +- (nullable NSString *)getBeaconTicket; + +/* + 背景:在第一次启动app时,因为生成qimei需要网络,此时还没有qimei,但是部分网络接口需要使用到。 + 使用:携带该token到server,server传token给qimei的server可以换取一个qimei。 + */ +- (NSString *)getToken; + +/* + 仅sdk需要设置 + */ +- (void)setSdkName:(NSString *)sdkName; + +/* + 开启稽核 + */ +- (void)enableAudit:(BOOL)enable; + +//获取SDK版本号 +- (nonnull NSString *)sdkVersion; + +/* + 默认为同意隐私协议,如果要不同意,请在调用start之前设置NO + 不同意隐私协议将不会再下发Qimei36 + 然后设置隐私协议为YES,会触发QimeiSDK的真实初始化 + */ +- (void)setAgreePrivacy:(BOOL)agreePrivacy; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiServiceConfig.h b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiServiceConfig.h new file mode 100644 index 0000000..1127db5 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/QimeiServiceConfig.h @@ -0,0 +1,28 @@ +// +// QimeiServiceConfig.h +// QimeiSDK +// +// Created by pariszhao on 2020/12/17. +// Copyright © 2020 tencent. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +//QimeiService配置项 +@interface QimeiServiceConfig : NSObject + +//是否采集idfa,默认采集 +@property (nonatomic, assign) BOOL collectIdfa; + +//是否采集idfv,默认采集 +@property (nonatomic, assign) BOOL collectIdfv; + +//是否开启jsBridge,默认开启 +//开启jsBridge之后,web可以通过特定的jsapi访问Qimei信息 +@property (nonatomic, assign) BOOL openJsBridge; + +@end + +NS_ASSUME_NONNULL_END diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/ckey_lib.h b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/ckey_lib.h new file mode 100644 index 0000000..79ae2d6 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/ckey_lib.h @@ -0,0 +1,295 @@ +#import + +#define KEEP_CLASS_AVAILABLE NS_CLASS_AVAILABLE(10_11, 9_0) + +NS_ASSUME_NONNULL_BEGIN + +/// TODO 是否删除 +KEEP_CLASS_AVAILABLE +@protocol reportProtocol +/// @brief 上报接口 +/// @param event event +/// @param reportInfo 上报的信息 +- (void)report: (NSString*)appkey + event:(NSString*)event + param:(NSDictionary*)reportInfo; + +/// @brief 获取 qimei +/// @param appkey 灯塔appkey +/// @return 返回灯塔Qimei36 +- (NSString*)getQimei36: (NSString*)appkey; +@end + +KEEP_CLASS_AVAILABLE +@interface CKeyInfo : NSObject +// 加密后数据 +@property (nonatomic, copy) NSString *data; +// ckey +@property (nonatomic, copy) NSString *ckey; +@end + +// vsckey 旧版本接口 +KEEP_CLASS_AVAILABLE +@interface ckey_lib : NSObject + +// reportProtocol接口调用业务实现的getQimei和上报接口 +@property (nonatomic,weak) id reportDelegate; + +/// 单实例 ++ (instancetype)sharedInstance; + +/// @brief 初始化 ckey 接口 +/// @param delegate 上报协议, 当前不使用 +/// @param guid 业务guid +/// @param vsAppKey 具体业务 key,需要在 http://wp.pcg.com/#/apps/service/00000000/db/platform?platformid=530603 申请 +/// @return 初始化成功返回 YES,否则为 NO +- (BOOL)initCkeyLib : (id)delegate + guid : (NSString*)guid + vsAppkey: (NSString*)vsAppKey; + +/// @brief 获取 ckey 库版本 +- (NSString *)getSoVersion; + +/// @brief 添加多 vsappkey 可以通过多次初始化或使用 addVsAppKey +/// @param vsAppKey 具体业务key,需要在http://wp.pcg.com/#/apps/service/00000000/db/platform?platformid=530603申请 +/// @return 添加成功返回 YES,否则为 NO +- (BOOL) addVsAppKey : (NSString*)vsAppKey; + +/// @brief 传入 base64 后的加密数据, 双清单解密算法 +/// @return 返回解密数据 +- (NSString *)decrypt : (NSString*)data; + +/// @brief 双清单加密, data 为明文字符串 +- (NSString *)encrypt : (NSString *)data; + +/// @brief 使用公钥解密数据 +/// @param cipher base64 字符串 +/// @param pubkey 公钥, der 格式 +/// @return 返回解密结果 ++ (NSData *)decryptRSA : (NSString *)cipher pubkey:(NSString *)pubkey; + +/// @brief 签名接口 +/// @param userID 用户 ID +/// @param moudleID 模块 ID +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名结果, 可见字符 ++ (NSMutableData*)signWith:(NSString *)userID + moudleID:(NSString *)moudleID + salt:(void*)salt + saltsz:(int)saltsz; + +/// @brief 协议签名接口 +/// @param userID 用户账号或者 ID +/// @param moudleID 模块ID, 用于区分业务使用场景 +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名数据可见数据 ++ (NSString*)strSignWith:(NSString *)userID + moudleID:(NSString *)moudleID + salt:(void*)salt + saltsz:(int)saltsz; + +/// @brief 轻签名 +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名数据不可见字符 ++ (NSMutableData *)lwsign:(void*)salt + saltsz:(unsigned)saltsz; + +/// @brief 轻签名 +/// @param salt 待签名数据 +/// @param saltsz 待签名数据长度 +/// @return 返回签名数据可见数据 ++ (NSString *)strLwsign:(void*)salt + saltsz:(unsigned)saltsz; + +/// @brief 获取 token, 当前无用, 直接返回 "2" + guid +- (NSString*) getToken : (NSString*) guid + platForm : (int)platForm + strappVer : (NSString*) strappVer; + +/// @brief 获取本地 token, 当前无用, 直接返回 "2" + guid +- (NSString *)getLocalToken:(NSString*) guid; + +/// @brief 获取 ckey v3 接口 +/// @param strToken token +/// @param unPlatform 平台 ID, 需要申请 +/// @param unEncVer 加密版本 +/// @param strappVer 业务版本 +/// @param strAppKey app key +/// @param strvid 视频 vid +/// @param sdtFrom 申请的 sdtfrom +/// @param strRandflag 非必须, 可空 +/// @param strBundleID bundle id +/// @param strGuid 常规 guid(如手 Q 等) +/// @param strStkey stkey +/// @param intA 业务额外数据 +/// @param ArrLen 业务额外数据长度 +/// @param uTime 当前时间 +/// @param deviceModel 设备 module, 上报使用 +/// @param currentDevice 当前设备名称 +/// @return 返回 ckey +- (NSString *)getCKey : (NSString*) strToken + unPlatform : (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + strAppKey : (NSString*) strAppKey + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + strStkey : (NSString*) strStkey + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen + deviceModel : (NSString*) deviceModel + currentDevice : (NSString*) currentDevice; + +/// @brief 获取 ckey 旧接口 +/// @param strToken token +/// @param unPlatform 平台 ID, 需要申请 +/// @param strappVer 业务版本 +/// @param strAppKey app key +/// @param strvid 视频 vid +/// @param sdtFrom 申请的 sdtfrom +/// @param strRandflag 非必须, 可空 +/// @param uTime 当前时间 +/// @return 返回 ckey +- (NSString *)getCKey_O : (NSString*) strToken + unPlatform : (int) unPlatform + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + strAppKey : (NSString*) strAppKey + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + uTime : (int) uTime; + +/// @brief 任务数据加密接口 +/// @param seqid 请求 id +/// @param vid 视频 vid +/// @param omgid omg id +/// @param guid 常规 guid(如手 Q 等) +/// @param taskid 任务 id +/// @param type 任务类型 +/// @param systemtype 系统类型 +/// @param timestamp 当前时间 +/// @param rand 随机数 +/// @param struin 账号 +/// @return 返回加密后数据 +- (NSString *)getTaskEncrypt : (NSString*) seqid + vid : (NSString*) vid + omgid : (NSString*) omgid + guid : (NSString*) guid + taskid : (int) taskid + type : (int) type + systemtype : (int) systemtype + timestamp : (int) timestamp + rand : (int) rand + struin : (NSString*) struin; + +/// @brief ckey 生成函数 +/// @param unPlatform 平台号, 申请获得 +/// @param unEncVer 不需要 +/// @param strappVer 业务版本号 +/// @param strvid 视频VID, 点播vid, 直播channelid +/// @param uTime 当前时间, 点播85 -3 、直播 32 -3 需要使用服务器时间生成ckey重试。 +/// @param sdtFrom 平台号对应的dtfrom +/// @param strRandflag rand ,非必须, 无可传空 +/// @param strBundleID bundleID +/// @param strGuid 业务guid,用户唯一标识 +/// @param intA 视频额外字段 +/// @param ArrLen 额外字段数组长度 +/// @return ckey 返回ckey , 长度大于 10 为正常,否则为错误码 ? +- (NSString *)getCKeyAll: (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen; + +/// @brief ckey 生成函数 +/// @param unPlatform 平台号, 申请获得 +/// @param unEncVer 不需要 +/// @param strappVer 业务版本号 +/// @param strvid 视频VID, 点播vid, 直播channelid +/// @param uTime 当前时间, 点播85 -3 、直播 32 -3 需要使用服务器时间生成ckey重试。 +/// @param sdtFrom 平台号对应的dtfrom +/// @param strRandflag rand ,非必须, 无可传空 +/// @param strBundleID bundleID +/// @param strGuid 业务guid,用户唯一标识 +/// @param intA 视频额外字段 +/// @param ArrLen 额外字段数组长度 +/// @param strBusJson 额外数据 +/// @return ckey 返回ckey , 长度大于 10 为正常,否则为错误码 ? +- (NSString *)getCKeyAll: (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen + busJson : (NSString *) strBusJson; + +/// @brief ckey 生成函数, 可附加 post 数据, 用于签名校验 +/// @param unPlatform 平台号, 申请获得 +/// @param unEncVer 不需要 +/// @param strappVer 业务版本号 +/// @param strvid 视频VID, 点播vid, 直播channelid +/// @param uTime 当前时间, 点播85 -3 、直播 32 -3 需要使用服务器时间生成ckey重试。 +/// @param sdtFrom 平台号对应的dtfrom +/// @param strRandflag rand ,非必须, 无可传空 +/// @param strBundleID bundleID +/// @param strGuid 业务guid,用户唯一标识 +/// @param intA 视频额外字段 +/// @param ArrLen 额外字段数组长度 +/// @param strBusJson 额外数据 +/// @param postData 发送 ckey 时待签名数据, 为 nil 或者长度为 0 时不签名 +/// @return { encyrpt_data, ckey } 返回 加密后请求数据 && ckey, ckey 长度大于 10 为正常,否则为错误码 ? +- (CKeyInfo *)getCKeyAll: (int) unPlatform + unEncVer : (int) unEncVer + strappVer : (NSString*) strappVer + strvid : (NSString*) strvid + uTime : (int) uTime + sdtFrom : (NSString*) sdtFrom + strRandflag : (NSString*) strRandflag + strBundleID : (NSString*) strBundleID + strGuid : (NSString*) strGuid + intA : (int[_Nullable]) intA + ArrLen : (int) ArrLen + busJson : (NSString *) strBusJson + postData : (NSData *) postData; + +@end + +NS_ASSUME_NONNULL_END + +/// @brief 开启反调试 +FOUNDATION_EXPORT void qimei_enable_ptrace(void); + +/// @brief 加密日志 +/// @param from 协商的 from 来源 +/// @param log 待加密的日志 +/// @return char *, 返回加密的日志信息, 需要调用方 qimei_free_data +FOUNDATION_EXPORT char * _Nullable qimei_encrypt_log(const char * _Nonnull from, const char * _Nonnull log); + +/// @brief 解密安全加密后的返回数据 +/// @param data 待解密数据, 为 base64 数据 , 以 '\0' 结束 +/// @param out_data 返回数据, 需要调用方 qimei_free_data, 如果解密失败, 则返回 NULL +/// @param out_data_len 返回数据长度 +/// @return 解密状态, 0 成功, 其他为具体错误 +FOUNDATION_EXPORT int qimei_decrpt_ckey_sec_data(const char * _Nonnull data, char * _Nullable * _Nonnull out_data, int * _Nonnull out_data_len); + +/// @brief 释放数据 +/// @param data 待释放的数据 +FOUNDATION_EXPORT void qimei_free_data(char * _Nullable * _Nonnull data); diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/uskey.h b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/uskey.h new file mode 100644 index 0000000..4d640ae --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Headers/uskey.h @@ -0,0 +1,39 @@ +// +// uskey.h +// +// Created by pariszhao on 2024/8/29. +// + +#include + +#define KEEP_PUBLIC __attribute__((visibility("default"))) + +typedef const struct __UKInstance* UKInstance; + +#ifdef __cplusplus +extern "C" { +#endif + + /// 获取Key单例 +KEEP_PUBLIC UKInstance UKInstanceGetDefault(); + + /// USkey初始化 +KEEP_PUBLIC void UKInstanceInit(UKInstance instance, const char *app_key, const char *app_ver); + + + /// 生成uskey加密字符串 + /// - Parameters: + /// - UKInstance, uskey实例对象 + /// - bus_id, 由星迹分配,标识一个业务场景 + /// - q36:调用QimeiSDK接口拿到的Q36 + /// - bus_infos: k1=v1&k2=v2&k3=v3&k4=&k5=v5 +KEEP_PUBLIC const char* UKInstanceGetUSkey(UKInstance instance, const char *bus_id, const char *q36, const char *bus_infos); + + + /// 在用完uskey后需要调用该函数进行释放 + /// - Parameter uskey:UKInstanceGetUSkey返回的内容 +KEEP_PUBLIC void UKInstanceFreeUskey(const char *uskey); + +#ifdef __cplusplus +} +#endif diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Modules/module.modulemap b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 0000000..b2028a6 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module QimeiSDK { + umbrella header "QimeiSDK.h" + + export * + module * { export * } +} diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/QimeiSDK b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/QimeiSDK new file mode 100644 index 0000000..88d9933 Binary files /dev/null and b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/QimeiSDK differ diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Resources/Info.plist b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..cfc5d7c --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,52 @@ + + + + + BuildMachineOSBuild + 21G83 + CFBundleDevelopmentRegion + en + CFBundleExecutable + QimeiSDK + CFBundleIdentifier + com.tencent.QimeiSDKAll + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + QimeiSDK + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 8.1.0.1_7866a3e + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 13F100 + DTPlatformName + macosx + DTPlatformVersion + 12.3 + DTSDKBuild + 21E226 + DTSDKName + macosx12.3 + DTXcode + 1341 + DTXcodeBuild + 13F100 + LSMinimumSystemVersion + 10.15 + NSHumanReadableCopyright + + UIDeviceFamily + + 2 + + + diff --git a/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/Current b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/QimeiSDK.xcframework/ios-arm64_x86_64-maccatalyst/QimeiSDK.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/xcframework_build.sh b/xcframework_build.sh index f7a58d6..afffb72 100755 --- a/xcframework_build.sh +++ b/xcframework_build.sh @@ -25,5 +25,7 @@ cp -R "$OUTPUT_DIR"* "../" rm -rf "$OUTPUT_DIR" cd ".." +cp -R QimeiSDK.xcframework xcframework/ +cp -R COSBeaconAPI_Base.xcframework xcframework/ echo "编译完成. xcframework地址: $OUTPUT_DIR/"