diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..5b53faf --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Preserve vendor SDK bytes, including signed framework resources, across platforms. +uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/** -text diff --git a/App.vue b/App.vue index 633e5cc..ed1993c 100644 --- a/App.vue +++ b/App.vue @@ -1,4 +1,5 @@ - \ No newline at end of file + diff --git a/pages/order_package/order_submit/order_submit.vue b/pages/order_package/order_submit/order_submit.vue index 708ecf6..4e943e0 100644 --- a/pages/order_package/order_submit/order_submit.vue +++ b/pages/order_package/order_submit/order_submit.vue @@ -218,10 +218,13 @@ - - - {{ item.name }} + + {{ item.name }} + + 仅 App 支持 + + {{ item.name }} 可用: {{ item.balance }} @@ -317,6 +320,7 @@ diff --git a/tests/douyin-integration.test.cjs b/tests/douyin-integration.test.cjs new file mode 100644 index 0000000..84f8f29 --- /dev/null +++ b/tests/douyin-integration.test.cjs @@ -0,0 +1,157 @@ +const test = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const vm = require('node:vm'); +const root = path.resolve(__dirname, '..'); + +function preprocess(source, app) { + const stack = [true]; + return source.split('\n').filter(line => { + const directive = line.match(/\/\/\s*#(ifdef|ifndef) (APP-PLUS|H5)/); + if (directive) { + const enabled = directive[2] === 'APP-PLUS' ? app === true : app === 'h5'; + stack.push(stack.at(-1) && (directive[1] === 'ifdef' ? enabled : !enabled)); return false; + } + if (/\/\/\s*#endif/.test(line)) { stack.pop(); return false; } + return stack.at(-1); + }).join('\n'); +} +function loadModule(file, context, app = true) { + const source = preprocess(fs.readFileSync(path.join(root, file), 'utf8'), app) + .replace(/^import .*;\r?$/gm, '') + .replace(/export (async function|function)/g, '$1') + .replace(/export const /g, 'const ') + .replace(/export default request;/g, ''); + vm.createContext(context); + vm.runInContext(source, context, { filename: file }); + return context; +} +function uniMock() { + const storage = new Map([['token', 'test-token'], ['user', { userId: 7 }]]); + const messages = []; + return { storage, messages, getStorageSync: k => storage.get(k), setStorageSync: (k,v) => storage.set(k,v), + removeStorageSync: k => storage.delete(k), showToast: v => messages.push(v.title), $emit() {}, + showLoading() {}, hideLoading() {}, navigateTo() {} }; +} +const payment = { orderNum: 'order-1', douyin: { appId: 'app', mchId: 'mch', prepayId: 'prepay', + packageValue: 'Sign=DYPay', nonceStr: 'nonce', timeStamp: '1780000000', sign: 'sig' } }; +async function payContext(overrides = {}, app = true) { + const adapter = await import('../utils/douyin-pay-adapter.mjs'); + const context = { uni: uniMock(), BASE_URL: 'test-api', TOKEN_NAME: 'token', USER_DATA: 'user', + ...adapter, canOpenDypay: () => true, initDypay: () => true, + openDypay: (_, cb) => cb({ resultCode: '0' }), + request: async () => ({ bizcode: 100, data: { state: 2 } }), ...overrides }; + return loadModule('utils/douyin-pay.js', context, app); +} +test('SDK success is confirmed with server before showing success', async () => { + let queries = 0; + const ctx = await payContext({ request: async () => { queries++; return { bizcode:100, data:{state:2} }; } }); + await ctx.appDypayFun(payment); + assert.equal(queries, 1); + assert.equal(ctx.uni.messages.at(-1), '支付成功'); + assert.equal(ctx.uni.storage.has('tb-douyin:test-api:7'), false); +}); +test('SDK success plus network failure remains recoverable, never success', async () => { + const ctx = await payContext({ request: async () => { throw new Error('offline'); } }); + await ctx.appDypayFun(payment); + assert.equal(ctx.uni.storage.get('tb-douyin:test-api:7'), 'order-1'); + assert.equal(ctx.uni.messages.includes('支付成功'), false); +}); +test('cancel still queries authoritative server state', async () => { + const ctx = await payContext({ openDypay: (_, cb) => cb({ resultCode:'1' }) }); + await ctx.appDypayFun(payment); + assert.equal(ctx.uni.messages.at(-1), '支付成功'); +}); +test('old backend parameters never invoke native SDK', async () => { + let calls = 0; + const ctx = await payContext({ openDypay: () => calls++ }); + await ctx.appDypayFun({ orderNum:'old', douyin:{appId:'app'} }); + assert.equal(calls, 0); + assert.match(ctx.uni.messages.at(-1), /缺少支付参数/); +}); +test('new backend orderInfo (object or JSON) reaches native SDK with exact signed fields', async () => { + const { toSdkPayInfo } = await import('../utils/douyin-pay-adapter.mjs'); + const expected = toSdkPayInfo(payment); + for (const orderInfo of [expected, JSON.stringify(expected)]) { + let received; + const ctx = await payContext({ openDypay: (options, cb) => { received = options.payInfo; cb({resultCode:'0'}); } }); + const result = await ctx.appDypayFun({orderNum:'order-1', douyin:{type:'app', orderInfo}}); + assert.deepEqual(received, expected); + assert.equal(result.state, 'paid'); + } +}); +test('legacy douyinPayFun calls native bridge, never uni payment provider or URL fallback', async () => { + let nativeCalls = 0; + const ctx = await payContext({ openDypay: (_, cb) => { nativeCalls++; cb({resultCode:'0'}); } }); + ctx.uni.requestPayment = () => assert.fail('Must not use built-in payment provider for Douyin'); + ctx.plus = { runtime: { openURL: () => assert.fail('Must not synthesize cashier URLs') } }; + loadModule('utils/payUtils.js', ctx); + const result = await ctx.douyinPayFun(payment.douyin, 1, payment.orderNum); + assert.equal(nativeCalls, 1); + assert.equal(result.state, 'paid'); +}); +test('invalid JSON and Scheme-only payload do not call SDK or create pending state', async () => { + for (const douyin of [{orderInfo:'{'}, {orderStr:'snssdk1128://open'}, {type:'h5', prepayId:'prepay'}]) { + const ctx = await payContext({openDypay: () => assert.fail('Invalid data reached SDK')}); + const result = await ctx.appDypayFun({orderNum:'invalid', douyin}); + assert.equal(result.state, 'error'); + assert.equal(ctx.uni.storage.has('tb-douyin:test-api:7'), false); + } +}); +test('legacy retry of settled order queries state without opening payment again', async () => { + const ctx = await payContext({openDypay: () => assert.fail('Retry opened payment again')}); + ctx.uni.storage.set('tb-douyin:test-api:7', payment.orderNum); + const result = await ctx.appDypayFun(payment); + assert.equal(result.state, 'paid'); +}); +test('duplicate invocation does not open SDK twice', async () => { + let done; + let calls = 0; + const ctx = await payContext({ openDypay: (_, cb) => { calls++; done = cb; } }); + const first = ctx.appDypayFun(payment); + await ctx.appDypayFun(payment); + done({resultCode:'0'}); + await first; + assert.equal(calls, 1); +}); +test('account switch suppresses old account result and retains its pending record', async () => { + const ctx = await payContext(); + ctx.request = async () => { ctx.uni.storage.set('user', {userId:8}); return {bizcode:100,data:{state:2}}; }; + await ctx.appDypayFun(payment); + assert.equal(ctx.uni.messages.includes('支付成功'), false); + assert.equal(ctx.uni.storage.get('tb-douyin:test-api:7'), 'order-1'); +}); +test('cold start queries saved order; unavailable app does not create order', async () => { + const ctx = await payContext({ canOpenDypay: () => false }); + assert.equal(await ctx.prepareDouyinPay('douyin'), false); + ctx.uni.storage.set('tb-douyin:test-api:7', 'pending'); + await ctx.resumeDouyinPay(); + assert.equal(ctx.uni.messages.at(-1), '支付成功'); +}); +test('non-App excludes Douyin and never accesses native SDK', async () => { + const ctx = await payContext({}, false); + assert.equal(ctx.douyinPayTypes('1,2,3'), '1,2,3'); + assert.equal(ctx.filterDouyinPayWays([{type:'douyin'},{type:'wechat'}]).length, 1); + assert.equal(await ctx.prepareDouyinPay('douyin'), false); +}); + +test('H5 displays configured Douyin but blocks payment before order creation', async () => { + const ctx = await payContext({ canOpenDypay: () => { throw new Error('Native SDK must not run'); } }, 'h5'); + assert.equal(ctx.douyinPayTypes('1,2,3'), '1,2,3,6'); + assert.equal(ctx.douyinPayTypes('1,6'), '1,6'); + assert.equal(ctx.filterDouyinPayWays([{type:'douyin'},{type:'wechat'}]).length, 2); + assert.equal(ctx.filterDouyinPayWays([]).length, 0); + assert.equal(await ctx.prepareDouyinPay('douyin'), false); + assert.match(ctx.uni.messages.at(-1), /仅支持/); +}); +test('request terminates on HTTP500, business500, bad JSON, auth failure and offline', async () => { + for (const response of [{statusCode:500,data:{}}, {statusCode:200,data:{status:500}}, + {statusCode:200,data:''}, {statusCode:200,data:{bizcode:201,errcode:999}}, null]) { + const uni = uniMock(); + uni.request = options => response ? options.success(response) : options.fail(new Error('offline')); + const ctx = loadModule('utils/request.js', { uni, TOKEN_NAME:'token', USER_DATA:'user', + getStorageFun: () => '', BASE_URL:'test-api', Authorization:'test-only', console:{log(){}}, setTimeout, clearTimeout }); + await assert.rejects(ctx.request({url:'/payment/queryResult'})); + } +}); diff --git a/uni_modules/tb-douyin-pay/package.json b/uni_modules/tb-douyin-pay/package.json new file mode 100644 index 0000000..22e7bf9 --- /dev/null +++ b/uni_modules/tb-douyin-pay/package.json @@ -0,0 +1,18 @@ +{ + "id": "tb-douyin-pay", + "displayName": "TB 抖音支付", + "version": "0.1.0", + "description": "独立实现的抖音支付官方 SDK UTS 桥接", + "engines": { "HBuilderX": ">=4.36.0" }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "client": { + "App": { "app-android": "y", "app-ios": "y", "app-harmony": "n" }, + "H5-mobile": { "Safari": "n", "Android Browser": "n" }, + "小程序": { "微信": "n" } + } + } + } +} diff --git a/uni_modules/tb-douyin-pay/utssdk/app-android/AndroidManifest.xml b/uni_modules/tb-douyin-pay/utssdk/app-android/AndroidManifest.xml new file mode 100644 index 0000000..fef43af --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-android/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-android/TbDouyinPayNative.kt b/uni_modules/tb-douyin-pay/utssdk/app-android/TbDouyinPayNative.kt new file mode 100644 index 0000000..26c53ac --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-android/TbDouyinPayNative.kt @@ -0,0 +1,50 @@ +package uts.sdk.modules.tbDouyinPay + +import android.os.Handler +import android.os.Looper +import com.ss.android.dypay.api.DyPay +import com.ss.android.dypay.api.IDyPayResultCallback +import io.dcloud.uts.UTSAndroid +import org.json.JSONObject + +object TbDouyinPayNative { + private val main = Handler(Looper.getMainLooper()) + + fun initialize(appId: String) { DyPay.setAppId(appId) } + + fun available(): Boolean { + val activity = UTSAndroid.getUniActivity() ?: return false + return DyPay.isDypayAppUsable(activity) + } + + fun pay(payload: String, loading: Boolean, done: (String) -> Unit) { + main.post { + val activity = UTSAndroid.getUniActivity() + if (activity == null || activity.isFinishing) { + done("""{"resultCode":"2","errorMsg":"当前页面不可用"}""") + return@post + } + try { + if (!DyPay.isDypayAppUsable(activity)) { + done("""{"resultCode":"100","errorMsg":"请安装或升级抖音客户端"}""") + return@post + } + val json = JSONObject(payload) + val data = HashMap() + for (key in listOf("appid", "partnerid", "prepayid", "package", "noncestr", "timestamp", "sign")) { + data[key] = json.getString(key) + } + DyPay(activity).pay(data, object : IDyPayResultCallback { + override fun onResult(result: Map) { + val response = JSONObject() + .put("resultCode", result["resultCode"] ?: "3") + .put("errorMsg", result["errorMsg"] ?: "") + main.post { done(response.toString()) } + } + }, loading) + } catch (_: Exception) { + done("""{"resultCode":"2","errorMsg":"支付 SDK 调用异常,请查询订单"}""") + } + } + } +} diff --git a/uni_modules/tb-douyin-pay/utssdk/app-android/config.json b/uni_modules/tb-douyin-pay/utssdk/app-android/config.json new file mode 100644 index 0000000..0722d64 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-android/config.json @@ -0,0 +1,7 @@ +{ + "minSdkVersion": 21, + "dependencies": ["com.bytedance.caijing:dy-pay-sdk-tob:1.1.0.9"], + "project": { + "repositories": ["maven { url 'https://artifact.bytedance.com/repository/Volcengine/' }"] + } +} diff --git a/uni_modules/tb-douyin-pay/utssdk/app-android/index.uts b/uni_modules/tb-douyin-pay/utssdk/app-android/index.uts new file mode 100644 index 0000000..7c08c56 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-android/index.uts @@ -0,0 +1,18 @@ +import { InitOptions, PayOptions, PayCallback } from '../interface.uts' +import { configure, invoke } from '../common.uts' + +export function initDypay(options: InitOptions): boolean { + if (!configure(options.appId)) return false + TbDouyinPayNative.initialize(options.appId) + return true +} + +export function canOpenDypay(): boolean { + return TbDouyinPayNative.available() +} + +export function openDypay(options: PayOptions, callback: PayCallback): void { + invoke(options, callback, (payload: string, loading: boolean, done: (raw: string) => void) => { + TbDouyinPayNative.pay(payload, loading, done) + }) +} diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/Info.plist b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/Info.plist new file mode 100644 index 0000000..2757617 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + DypaySDK.framework/DypaySDK + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + DypaySDK.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + BinaryPath + DypaySDK.framework/DypaySDK + LibraryIdentifier + ios-arm64 + LibraryPath + DypaySDK.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/DypaySDK b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/DypaySDK new file mode 100644 index 0000000..3b39ba5 Binary files /dev/null and b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/DypaySDK differ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DIRSFMDB.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DIRSFMDB.h new file mode 100644 index 0000000..7a841fd --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DIRSFMDB.h @@ -0,0 +1,4 @@ +#import +#import "DypayDIRSFMDatabase.h" +#import "DypayDIRSFMResultSet.h" +#import "DypayDIRSFMDatabaseQueue.h" diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayAPI.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayAPI.h new file mode 100644 index 0000000..d1292b6 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayAPI.h @@ -0,0 +1,149 @@ +// +// DypayAPI.h +// DypaySDK +// +// Created by xutianxi on 2021/12/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, DypayErrorCode) { + DypayErrorCodeSuccess = 0, // 成功 + DypayErrorCodeCancel = 1, // 用户取消 + DypayErrorCodeFail = 2, // 失败 + DypayErrorCodeProcessing = 3, // 支付结果处理中 + DypayErrorCodeVersionTooLow = 100, // 抖音版本过低,需要用户升级 +}; + +typedef NS_ENUM(NSInteger, DypayLogLevel) { + DypayLogLevelOff = 0, + DypayLogLevelError = 1, + DypayLogLevelWarn = 2, + DypayLogLevelInfo = 3, + DypayLogLevelDebug = 4, +}; + +#define DYPAYSDK_TAG @"DypaySDK" + +#define DYPAY_RECALL_API_MAX_TIME 3000 //毫秒级 +#define SHARED_SELF DypayAPI.sharedDypayAPI + +@interface DypayAPI : NSObject + +// 日志记录Block,可查看运行过程中的信息 +@property (nonatomic, copy) void(^logBlock)(DypayLogLevel level, NSTimeInterval timestamp, NSString *tag, NSString *message); + +/** + * 支付单例 + * + * @return 返回单例对象 + */ ++ (DypayAPI *)sharedDypayAPI; + +/* + * @param appId 从抖音商户平台申请的appId + * @param scheme 从抖音回调当前 App 时使用的 scheme + */ ++ (void)registerWithAppID:(NSString *)appId + callbackScheme:(NSString *)scheme; + +/* + * @param appId 从抖音商户平台申请的appId,优先使用universalLink,降级使用scheme + * @param universalLink 从抖音回调当前 App 时使用的universalLink + * @param scheme 从抖音回调当前 App 时使用的 scheme + */ ++ (void)registerWithAppID:(NSString *)appId + universalLink:(NSString *)universalLink + callbackScheme:(NSString *)scheme; + +/* + * 判断是否能打开 Dypay + */ ++ (bool)canOpenDypay; + +/* + * @brief 打开 Dypay, 打开成功后马上回调 completionBlock, + * @param infoDict 拉起抖音支付必须的订单参数 + * @param currentTopViewController 拉起抖音支付时顶部的vc + * @param callback 调用结果的回调 + */ ++ (void)openDypayWithInfo:(NSDictionary *)infoDict + fromViewController:(UIViewController *)currentTopViewController + callback:(void(^)(BOOL isOpenedSuccessed, NSString *errMsg))completionBlock DEPRECATED_MSG_ATTRIBUTE("call openDypayWithInfo:fromViewController:resultCallback instead"); + + +/* + * @brief 打开 Dypay,唤端之前:支付结果会通过该API的resultCallback参数回调,唤端之后:支付结果通过processDypayResultWithURL的callback回调 + * @param infoDict 拉起抖音支付必须的订单参数 + * @param currentTopViewController 拉起抖音支付时顶部的vc + * @param resultCallback 支付结果的回调,resultCode枚举参照processDypayResultWithURL注释 + */ ++ (void)openDypayWithInfo:(NSDictionary *)infoDict + fromViewController:(UIViewController *)currentTopViewController + resultCallback:(void(^)(NSDictionary *resultDict))resultCompletionBlock; + +/* + * 处理通过URL支付回调结果 + * resultDict 包含支付结果错误码信息,如果为nil也表示处理失败。 + 字典中,key: "resultStatus"对应老的错误码定义,将逐步废弃;请使用新key: "resultCode"对应的错误码定义。 + 老key: resultStatus,对应的错误码定义: + -1 未知 + 0 订单支付成功 + 10 用户中途取消 + 20 正在处理中 + 30 版本过低 + 40 失败 + 50 超时 + 新key: resultCode,对应的错误码定义 + DypayErrorCodeSuccess(0) 成功 + DypayErrorCodeCancel(1) 用户取消 + DypayErrorCodeFail(2) 失败 + DypayErrorCodeProcessing(3) 支付结果处理中 + DypayErrorCodeVersionTooLow(100) 抖音版本过低,需要用户升级 + */ ++ (BOOL)processDypayResultWithURL:(NSURL *)url + callback:(void(^)(NSDictionary * _Nullable resultDict))completionBlock; + +/* + * 处理通过Universal Link支付回调结果 + * resultDict 包含支付结果错误码信息,如果为nil也表示处理失败。 + 字典中,key: "resultStatus"对应老的错误码定义,将逐步废弃;请使用新key: "resultCode"对应的错误码定义。 + 老key: resultStatus,对应的错误码定义: + -1 未知 + 0 订单支付成功 + 10 用户中途取消 + 20 正在处理中 + 30 版本过低 + 40 失败 + 50 超时 + 新key: resultCode,对应的错误码定义 + DypayErrorCodeSuccess(0) 成功 + DypayErrorCodeCancel(1) 用户取消 + DypayErrorCodeFail(2) 失败 + DypayErrorCodeProcessing(3) 支付结果处理中 + DypayErrorCodeVersionTooLow(100) 抖音版本过低,需要用户升级 + */ ++ (BOOL)processDypayResultWithUserActivity:(NSUserActivity *)userActivity + callback:(void(^)(NSDictionary *resultDict))completionBlock; + +/*! @brief 获取当前 DypaySDK API 的版本号 + */ ++ (NSString *)getAPIVersion; + +/* + * 埋点 + */ ++ (void)event:(NSString *_Nonnull)eventName params:(NSDictionary *_Nullable)params; + +@end + + +// 内部接口,字节外部App不应使用 +@interface DypayAPI (Internal) +// 业务埋点上报Block,字节内部App使用时设置 +@property (nonatomic, copy) void(^trackEventBlock)(NSString *event, NSDictionary *params); +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSApplication.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSApplication.h new file mode 100644 index 0000000..19100a0 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSApplication.h @@ -0,0 +1,32 @@ +// +// DypayDIRSApplication.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, DypayIRISApplicationState) { + DypayIRISApplicationStateUnknown = 0, + DypayIRISApplicationStateActive, + DypayIRISApplicationStateInactive, + DypayIRISApplicationStateBackground +}; + + +@interface DypayDIRSApplication : NSObject + +@property (readonly, nonnull) NSString *launchID; +@property (readonly, assign) NSTimeInterval launchTime; + +@property (readonly) DypayIRISApplicationState applicationState; + ++ (instancetype)sharedApplication; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSBasicFeatureOptions.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSBasicFeatureOptions.h new file mode 100644 index 0000000..aaa365c --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSBasicFeatureOptions.h @@ -0,0 +1,20 @@ +// +// DypayDIRSBasicFeatureOptions.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/11/9. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSBasicFeatureOptions : DypayDIRSBasicModule + +- (void)addFeatureOptions:(NSDictionary *)opts; + +- (void)removeFeatureOptionsKeys:(NSArray *)keys; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSBasicModule.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSBasicModule.h new file mode 100644 index 0000000..5b13dbe --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSBasicModule.h @@ -0,0 +1,35 @@ +// +// DypayDIRSBasicModule.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import +#import "DypayIRISInterfaceDefines.h" +#import "DypayIRISMacro.h" +#import "DypayDIRSContext.h" +#import "DypayDIRSModuleHive.h" +#import "IRSLOG.h" +#import "DypayDataIRIS.h" + +NS_ASSUME_NONNULL_BEGIN +@class DypayDIRSContext; +@interface DypayDIRSBasicModule : NSObject + +@property (nonatomic, weak) DypayDIRSContext* context; + +@property (nullable, nonatomic, copy) NSString* category; + +@property BOOL isEnabled; +@property DypayIRISState state; + +- (void)onLaunch; + +- (void)run; + +- (void)stop; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSCompressionGzipPlugin.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSCompressionGzipPlugin.h new file mode 100644 index 0000000..d1ef24f --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSCompressionGzipPlugin.h @@ -0,0 +1,16 @@ +// +// DypayDIRSCompressionGzipPlugin.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/9. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSCompressionGzipPlugin : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSConcurrentCollection.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSConcurrentCollection.h new file mode 100644 index 0000000..57eeacd --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSConcurrentCollection.h @@ -0,0 +1,24 @@ +// +// DypayDIRSConcurrentCollection.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSConcurrentCollection : NSObject + ++ (instancetype)collectionWithRaw:(T)collection; + +- (void)operate:(void (^)(T raw))operation; + +- (nullable id)access:(nullable id (^)(T raw))operation; + +- (T)rawValue; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSConfig.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSConfig.h new file mode 100644 index 0000000..c631500 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSConfig.h @@ -0,0 +1,193 @@ +// +// DypayDIRSConfig.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import + +#import "DypayIRISDefines.h" + + +NS_ASSUME_NONNULL_BEGIN + +@class DypayDIRSComplianceConfiguration,DypayDIRSEventConfiguration,DypayDIRSObserver,DypayDIRSEventUploadFilterOptions; + +@interface DypayDIRSConfig : NSObject + ++ (instancetype _Nullable)configWithIdentifier:(NSString *_Nonnull)appId + launchOptions:(nullable NSDictionary *)launchOptions; + + +@property (nullable, nonatomic, copy) NSString *appId; + +@property (nullable, nonatomic, copy) NSString *appName; + +@property (nullable, nonatomic, copy) NSString *appVersion; + +@property (nullable, nonatomic, copy) NSString *buildVersion; + +//If you need to synchronize data between HostApp and ExtensionApp, you need to set the same groupId +@property (nullable, nonatomic, copy) NSString *appGroupId; + +@property (nullable, nonatomic, copy) NSString *channel; + +//be able to distinguish between different instances using the same appid +@property (nullable, nonatomic, copy) NSString *subId; + +@property (nonatomic, strong ) NSDictionary *launchOptions; + +@property (nonatomic, assign) BOOL encryptionEnabled; + +@property (nullable, nonatomic, strong) id endpoint; + +///The default log level is Error +@property (nonatomic, assign) DypayIRISLOG_LEVEL logLevel; + +@property (nullable, nonatomic, copy) void (^configureUserLoggerBlock)(id _Nullable log); + +@property (nullable, readonly) DypayDIRSComplianceConfiguration* compliance; + +@property (nullable, readonly) DypayDIRSEventConfiguration* event; + +@property (nullable, readonly) DypayDIRSObserver *observer; + + +@property (nullable, nonatomic, copy) NSDictionary *_Nullable (^configureHTTPHeaderFieldsBlock)(NSUInteger service); + +@property (nullable, nonatomic, copy) NSDictionary *_Nullable (^configureCommonParametersBlock)(NSUInteger service); + +@property (nullable, nonatomic, copy) NSDictionary *_Nullable (^configureCustomHeaderBlock)(NSUInteger service); + + +@property (nullable, nonatomic, copy) void (^onError)(BOOL fatal, NSError * _Nonnull error, id _Nullable userInfo); + +@end + + + + + + +@interface DypayDIRSComplianceConfiguration : NSObject + +/** + * @brief fields to avoid access + * + * @discussion Fields set in @c blockedFiels will not be accessed and uploaded. + * For example, if you you do not want to collect @c vendor_id, set the following code block, then @c UIDevice.identifierForVendor will not be accessed, and the field @c vendor_id will not appear in any HTTPBODY + * + * @code + * config.compliance.blockedFields = @[@"vendor_id"]; + * @endcode + * + */ +@property (nullable, nonatomic, copy) NSArray *blockedFields; + +@end + + +@interface DypayDIRSEventConfiguration : NSObject + +/* + * Intercept or change events before they are stored + */ +@property (nullable, nonatomic, copy) void (^configureEventInterceptorBlock)(id _Nullable event, BOOL * _Nonnull stop); + +/* + * Filter events before packaging + * + */ +@property (nullable, nonatomic, copy) _Nullable id (^configurePreBatchFilterBlock)(id _Nullable context); + + +@property (nullable, nonatomic, copy) _Nullable id (^configureEventPacketBlock)(id _Nullable event, BOOL * _Nonnull stop); + + +/* + * + * Event expiration time [Unit:seconds] + * Data will be cleaned based on expiration time every time on startup + * Setting it to 0 will not clean up the data. + * + * Default is 0 + * + */ +@property (nonatomic, assign) NSUInteger eventExpirationTime; + + +/* + * - DypayIRISEventPacketStrategyDefault + * Packaging based on the upper limit of the number of events, The number of upper limit can be set through maxPacketEventCount, the default is 200 + * - DypayIRISEventPacketStrategyByteLimitation + * Packing based on the upper limit of data length, The length can be set through maxPacketBytes, the default is 1024*1024 + * + * Default is DypayIRISEventPacketStrategyDefault + * + */ +@property (nonatomic, assign) DypayIRISEventPacketStrategy packetStrategy; + +/* + * + * Default is 200 + * takes effect when setting config.event.packetStrategy = DypayIRISEventPacketStrategyDefault + * + */ +@property (nonatomic, assign) NSUInteger maxPacketEventCount; + + +/* + * + * Default is 1m + * takes effect when setting config.event.packetStrategy = DypayIRISEventPacketStrategyByteLimitation + * + */ +@property (nonatomic, assign) NSUInteger maxPacketBytes; + + + +/* + * Default is 500m, some(25%) earliest events will be deleted when the maximum limit is exceeded on startup + + When an error occurs in the data file and the size of the database file cannot be successfully reduced + in order to avoid affecting the stability of the application, + the database file will be removed as a whole, which will cause events loss + + */ +@property (nonatomic, assign) NSUInteger maxFileBytes; + +/* + * Maximum length after serialization + * default 20*1024; + * + * @NOT take effect yet + */ +@property (nonatomic, assign) NSUInteger maxPropertyBytes; + + +@end + + + +@interface DypayDIRSEventUploadFilterOptions : NSObject + +@property (nullable, nonatomic, strong) NSArray *regionKeys; + +@property (nullable, nonatomic, strong) NSArray *includeTypes; + +@property (nullable, nonatomic, strong) NSArray *excludeTypes; + +@end + + +@interface DypayDIRSObserver : NSObject + +@property (nullable, nonatomic, copy) void (^onSessionLaunch)(NSString *sessionId, id _Nullable info); + +@property (nullable, nonatomic, copy) void (^onSessionTerminate)(NSString *sessionId, id _Nullable info); + +@end + + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSContext.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSContext.h new file mode 100644 index 0000000..57db4d0 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSContext.h @@ -0,0 +1,67 @@ +// +// DypayDIRSContext.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import +#import "DypayIRISInterfaceDefines.h" + +NS_ASSUME_NONNULL_BEGIN + +@class DypayDIRSConfig,DypayDIRSLogger,DypayDIRSModuleHive; +@interface DypayDIRSContext : NSObject + +@property (nonatomic, readonly) DypayDIRSModuleHive* modular; + +@property (readonly, nullable) DypayDIRSConfig *config; + +@property (readonly, nonnull) NSString *name; + ++ (instancetype)main; + ++ (void)configure:(DypayDIRSConfig *)config; + +- (instancetype)initWithConfig:(DypayDIRSConfig *)config; + +- (BOOL)resume; + +- (void)suspend; + +- (nonnull NSString *)contextPath; + +- (void)async:(dispatch_block_t)block; + +- (nonnull NSDictionary *)contextInfo; + +- (void)dispose; + +- (BOOL)isMainContext; + +@end + + +@interface DypayDIRSContext (Instance) + ++ (NSArray *)ctx_all; + ++ (nullable DypayDIRSContext *)ctx_get:(NSString *)name; + ++ (void)ctx_add:(DypayDIRSContext *)context; + ++ (void)ctx_remove:(DypayDIRSContext *)context; + +@end + +@interface DypayDIRSContext (Modules) + +@property (nullable, nonatomic, readonly) DypayDIRSLogger *logger; + +- (nullable NSDictionary *)modules; + ++ (NSDictionary *)defaultModules; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEndpointConfiguration.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEndpointConfiguration.h new file mode 100644 index 0000000..3a642c4 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEndpointConfiguration.h @@ -0,0 +1,25 @@ +// +// DypayDIRSEndpointConfiguration.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/24. +// + +#import +#import "DypayIRISDefines.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEndpointConfiguration : NSObject + +@property (nullable, nonatomic, copy) id _Nullable (^domainBlock)(NSUInteger service, id context); + +@property (nullable, nonatomic, copy) id _Nullable (^endpointBlock)(NSUInteger service, id context); + ++ (DypayDIRSEndpointConfiguration *)configurationUsingBlock:(nonnull id (^)(NSUInteger service, id context))block; + ++ (DypayDIRSEndpointConfiguration *)configurationUsingDomainBlock:(nonnull id (^)(NSUInteger service, id context))block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEnviroment.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEnviroment.h new file mode 100644 index 0000000..35c553e --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEnviroment.h @@ -0,0 +1,29 @@ +// +// DypayDIRSEnviroment.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/25. +// + +#import "DypayDIRSBasicModule.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEnviroment : DypayDIRSBasicModule + ++ (NSInteger)sdkVersion; + ++ (NSString *)sdkVersionString; + ++ (NSString *)osName; + ++ (NSString *)osVersion; + ++ (NSString *)platform; + ++ (NSString *)appVersion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSErrorBuilder.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSErrorBuilder.h new file mode 100644 index 0000000..413794c --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSErrorBuilder.h @@ -0,0 +1,34 @@ +// +// DypayDIRSErrorBuilder.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSErrorBuilder : NSObject + ++ (instancetype)builder; + +- (instancetype)withDomain:(NSErrorDomain)code; + +- (instancetype)withCode:(NSUInteger)code; + +- (instancetype)withDescription:(NSString *)description; + +- (instancetype)withDescriptionFormat:(NSString *)format, ...; + +- (instancetype)withFailureReason:(NSString *)reason; + +- (instancetype)withUnderlyingError:(NSError *)error; + +- (NSError *)build; + +- (BOOL)buildError:(NSError **)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEvent.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEvent.h new file mode 100644 index 0000000..fd576a0 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEvent.h @@ -0,0 +1,106 @@ +// +// DypayDIRSEvent.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import +#import "DypayIRISDefinesPrivate.h" + + + +typedef NSString * DypayIRISEventType; + +FOUNDATION_EXTERN DypayIRISEventType const _Nonnull DypayDIRSEventTypeV3; //event_v3 + + +NS_ASSUME_NONNULL_BEGIN + +@class DypayDIRSEventOptions; +@interface DypayDIRSEvent : NSObject + +@property (nullable, nonatomic, copy) NSString * key; + +@property (nullable, nonatomic, copy) NSString * type; + +@property (nonatomic) NSTimeInterval time; +@property (nonatomic) NSTimeInterval storedTime; +@property (nonatomic) NSTimeInterval batchedTime; + +@property (nullable, nonatomic, strong) NSDictionary * properties; + +@property (nullable, nonatomic, strong) NSDictionary * globalProperties; + +@property (nullable, nonatomic, strong) NSDictionary * commonParameters; + +@property (nullable, nonatomic, copy) NSString * logID; + +@property (nullable, nonatomic, copy) NSNumber* dbIndex; + +@property (nonatomic, assign) int64_t index; + +@property (nonatomic, copy) NSString* section; + +@property (nullable, nonatomic) id schemaObject; + +@property (nonatomic, assign) NSUInteger schemaDataLength; + +@property (nonatomic, strong) DypayDIRSEventOptions * options; + +@property (nonatomic, assign) BOOL stained; + +//return event_id if event stained +- (int64_t)staining; + +- (NSString *)sessionId; + +- (void)addCommonParameters:(NSDictionary *)parameters; + + ++ (nullable instancetype)eventWithType:(DypayIRISEventType _Nonnull)type + properties:(NSDictionary * _Nullable)properties; + + ++ (nullable instancetype)v3UsingKey:(NSString * _Nonnull)key + properties:(NSDictionary * _Nullable)properties; + + + +@end + + +@interface DypayDIRSEventOptions : NSObject + +@property (nonatomic, assign) NSInteger category; + +@property (nonatomic, assign) DypayIRISPriority priority; + +@property (nullable ,nonatomic, copy) NSString * regionKey; + +@property (nonatomic, assign) NSInteger privacyLevel; + +@property (nonatomic, assign) BOOL filtered; + +@end + + + +@interface DypayDIRSEventBatchOptions : NSObject + +@property (nonatomic, assign) NSInteger priority; + +@property (nullable, nonatomic) NSArray * eventIDs; + +@property (nonatomic, assign) NSUInteger count; + +@property (nonatomic, strong) NSArray * allowRegionList; + +@property (nonatomic, assign) NSInteger minDBIndex; + +@property (nonatomic, assign) NSInteger maxDBIndex; + +@end + + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventBatchDispatcher.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventBatchDispatcher.h new file mode 100644 index 0000000..b95da3e --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventBatchDispatcher.h @@ -0,0 +1,29 @@ +// +// DypayDIRSEventUploadDispatcher.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/18. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + + +@interface DypayDIRSEventBatchDispatcher : DypayDIRSBasicModule + +@property (nonatomic, readonly) id schema; + +@property (readonly) id defaultUploader; + +@property (readonly) id realtimeUploader; + +- (nullable id)createExecutor; + +- (nullable NSArray *)allExecutors; + +- (nonnull dispatch_queue_t)intervalBatchQueue; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventBatchExecutor.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventBatchExecutor.h new file mode 100644 index 0000000..98ba1f9 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventBatchExecutor.h @@ -0,0 +1,50 @@ +// +// DypayDIRSEventUploadExecutor.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/18. +// + +#import "DypayDIRSBasicModule.h" +#import "DypayIRISInterfaceDefines.h" + +NS_ASSUME_NONNULL_BEGIN + + + +@interface DypayDIRSEventBatchExecutor : DypayDIRSBasicModule + +@property (nonatomic, assign) NSTimeInterval interval; + +@property (nullable, nonatomic, weak) id serializer; + +@property (nullable, nonatomic) NSArray> *compressors; + +@property (nullable, nonatomic, weak) id encryptor; + +@property (nullable, nonatomic, weak) id decryptor; + +@property (nullable, nonatomic, weak) id eventStore; + +@property (nullable, nonatomic) id throttlter; + +@property (nonatomic, assign) DypayIRISPriority priority; + +@property (nonatomic, assign) DypayIRISState execState; + +@property (nullable, nonatomic, strong) NSDictionary *options; + + +/* + * @opts + * DypayIRISBatchOptionsEnforceKey - enforce batch YES|NO + * + */ +//- (void)executeUpload:(DypayIRISBatchTrigger)trigger +// options:(nullable NSDictionary *)opts +// completion:(void (^ __nullable)(BOOL success, NSError* _Nullable error))completion; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventBlockPlugin.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventBlockPlugin.h new file mode 100644 index 0000000..1fea44f --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventBlockPlugin.h @@ -0,0 +1,16 @@ +// +// DypayDIRSEventBlockPlugin.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/25. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventBlockPlugin : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventEntry.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventEntry.h new file mode 100644 index 0000000..aeb176c --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventEntry.h @@ -0,0 +1,18 @@ +// +// DypayDIRSEventEntry.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventEntry : DypayDIRSBasicModule + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventListener.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventListener.h new file mode 100644 index 0000000..8c818c2 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventListener.h @@ -0,0 +1,17 @@ +// +// DypayDIRSEventListener.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/14. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventListener : DypayDIRSBasicModule + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventPacker.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventPacker.h new file mode 100644 index 0000000..ea0fe7e --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventPacker.h @@ -0,0 +1,22 @@ +// +// DypayDIRSEventPacker.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/18. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventPacker : NSObject + +@property (nonatomic, assign) NSUInteger maxPackLength; + +@property (nonatomic, assign) NSUInteger maxEventCount; + +@property (nonatomic, assign) NSInteger strategy; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventRequestSchema.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventRequestSchema.h new file mode 100644 index 0000000..a97ace3 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventRequestSchema.h @@ -0,0 +1,23 @@ +// +// DypayDIRSEventRequestSchema.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/18. +// + +#import "DypayDIRSBasicModule.h" +#import "DypayDIRSEventPacker.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventRequestSchema : DypayDIRSBasicModule + +@end + + + +@interface DypayDIRSEventRealtimeRequestSchema : DypayDIRSEventRequestSchema + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventSerializer.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventSerializer.h new file mode 100644 index 0000000..d87e217 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventSerializer.h @@ -0,0 +1,16 @@ +// +// DypayDIRSEventSerializer.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/14. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventSerializer : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventSession.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventSession.h new file mode 100644 index 0000000..eccbfea --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventSession.h @@ -0,0 +1,20 @@ +// +// DypayDIRSEventSession.h +// +// +// Created by ByteDance on 2023/8/4. +// + +#import "DypayDIRSBasicModule.h" +#import "DypayDataIRIS.h" +#import "DypayDIRSTracker+Session.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventSession : DypayDIRSBasicModule + +@property (nonatomic, assign) DypayIRISLaunchType launchType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventStore.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventStore.h new file mode 100644 index 0000000..5fae149 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSEventStore.h @@ -0,0 +1,24 @@ +// +// DypayDIRSEventStore.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import "DypayDIRSBasicModule.h" +#import "DypayDIRSEvent.h" + + +NS_ASSUME_NONNULL_BEGIN + + + + + +@interface DypayDIRSEventStore : DypayDIRSBasicModule + +@property (nonatomic, weak) id serializer; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSExtension.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSExtension.h new file mode 100644 index 0000000..bfc3281 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSExtension.h @@ -0,0 +1,31 @@ +// +// DypayDIRSExtension.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSDictionary (DypayDataIRIS) + +- (nullable NSDictionary *)datairis_dictionaryForKey:(NSString *)key; + +- (nullable NSString *)datairis_stringForKey:(NSString *)key; + +- (nullable NSArray *)datairis_arrayForKey:(NSString *)key; + +- (double)datairis_doubleForKey:(NSString *)key; + +- (NSInteger)datairis_integerForKey:(NSString *)key; + +- (BOOL)datairis_boolForKey:(NSString *)key; + +- (long long)datairis_longlongValueForKey:(NSString *)key; + +@end + + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSFMDatabase.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSFMDatabase.h new file mode 100644 index 0000000..00be4da --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSFMDatabase.h @@ -0,0 +1,1055 @@ +#import +#import "DypayDIRSFMResultSet.h" + + +#if ! __has_feature(objc_arc) + #define FMDBAutorelease(__v) ([__v autorelease]); + #define FMDBReturnAutoreleased FMDBAutorelease + + #define FMDBRetain(__v) ([__v retain]); + #define FMDBReturnRetained FMDBRetain + + #define FMDBRelease(__v) ([__v release]); + + #define FMDBDispatchQueueRelease(__v) (dispatch_release(__v)); +#else + // -fobjc-arc + #define FMDBAutorelease(__v) + #define FMDBReturnAutoreleased(__v) (__v) + + #define FMDBRetain(__v) + #define FMDBReturnRetained(__v) (__v) + + #define FMDBRelease(__v) + +// If OS_OBJECT_USE_OBJC=1, then the dispatch objects will be treated like ObjC objects +// and will participate in ARC. +// See the section on "Dispatch Queues and Automatic Reference Counting" in "Grand Central Dispatch (GCD) Reference" for details. + #if OS_OBJECT_USE_OBJC + #define FMDBDispatchQueueRelease(__v) + #else + #define FMDBDispatchQueueRelease(__v) (dispatch_release(__v)); + #endif +#endif + +#if !__has_feature(objc_instancetype) + #define instancetype id +#endif + + +typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary); + + +/** A SQLite ([http://sqlite.org/](http://sqlite.org/)) Objective-C wrapper. + + ### Usage + The three main classes in FMDB are: + + - `DypayDIRSFMDatabase` - Represents a single SQLite database. Used for executing SQL statements. + - `` - Represents the results of executing a query on an `DypayDIRSFMDatabase`. + - `` - If you want to perform queries and updates on multiple threads, you'll want to use this class. + + ### See also + + - `` - A wrapper for `sqlite_stmt`. + + ### External links + + - [FMDB on GitHub](https://github.com/ccgus/fmdb) including introductory documentation + - [SQLite web site](http://sqlite.org/) + - [FMDB mailing list](http://groups.google.com/group/fmdb) + - [SQLite FAQ](http://www.sqlite.org/faq.html) + + @warning Do not instantiate a single `DypayDIRSFMDatabase` object and use it across multiple threads. Instead, use ``. + + */ + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wobjc-interface-ivars" + + +@interface DypayDIRSFMDatabase : NSObject { + + void* _db; + NSString* _databasePath; + BOOL _shouldCacheStatements; + BOOL _isExecutingStatement; + BOOL _inTransaction; + NSTimeInterval _maxBusyRetryTimeInterval; + NSTimeInterval _startBusyRetryTime; + + NSMutableDictionary *_cachedStatements; + NSMutableSet *_openResultSets; + NSMutableSet *_openFunctions; + + NSDateFormatter *_dateFormat; +} + +///----------------- +/// @name Properties +///----------------- + +/** Dictionary of cached statements */ + +@property (atomic, retain) NSMutableDictionary *cachedStatements; + +///--------------------- +/// @name Initialization +///--------------------- + +/** Create a `DypayDIRSFMDatabase` object. + + An `DypayDIRSFMDatabase` is created with a path to a SQLite database file. This path can be one of these three: + + 1. A file system path. The file does not have to exist on disk. If it does not exist, it is created for you. + 2. An empty string (`@""`). An empty database is created at a temporary location. This database is deleted with the `DypayDIRSFMDatabase` connection is closed. + 3. `nil`. An in-memory database is created. This database will be destroyed with the `DypayDIRSFMDatabase` connection is closed. + + For example, to create/open a database in your Mac OS X `tmp` folder: + + DypayDIRSFMDatabase *db = [DypayDIRSFMDatabase databaseWithPath:@"/tmp/tmp.db"]; + + Or, in iOS, you might open a database in the app's `Documents` directory: + + NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; + NSString *dbPath = [docsPath stringByAppendingPathComponent:@"test.db"]; + DypayDIRSFMDatabase *db = [DypayDIRSFMDatabase databaseWithPath:dbPath]; + + (For more information on temporary and in-memory databases, read the sqlite documentation on the subject: [http://www.sqlite.org/inmemorydb.html](http://www.sqlite.org/inmemorydb.html)) + + @param inPath Path of database file + + @return `DypayDIRSFMDatabase` object if successful; `nil` if failure. + + */ + ++ (instancetype)databaseWithPath:(NSString*)inPath; + +/** Initialize a `DypayDIRSFMDatabase` object. + + An `DypayDIRSFMDatabase` is created with a path to a SQLite database file. This path can be one of these three: + + 1. A file system path. The file does not have to exist on disk. If it does not exist, it is created for you. + 2. An empty string (`@""`). An empty database is created at a temporary location. This database is deleted with the `DypayDIRSFMDatabase` connection is closed. + 3. `nil`. An in-memory database is created. This database will be destroyed with the `DypayDIRSFMDatabase` connection is closed. + + For example, to create/open a database in your Mac OS X `tmp` folder: + + DypayDIRSFMDatabase *db = [DypayDIRSFMDatabase databaseWithPath:@"/tmp/tmp.db"]; + + Or, in iOS, you might open a database in the app's `Documents` directory: + + NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; + NSString *dbPath = [docsPath stringByAppendingPathComponent:@"test.db"]; + DypayDIRSFMDatabase *db = [DypayDIRSFMDatabase databaseWithPath:dbPath]; + + (For more information on temporary and in-memory databases, read the sqlite documentation on the subject: [http://www.sqlite.org/inmemorydb.html](http://www.sqlite.org/inmemorydb.html)) + + @param inPath Path of database file + + @return `DypayDIRSFMDatabase` object if successful; `nil` if failure. + + */ + +- (instancetype)initWithPath:(NSString*)inPath; + + +///----------------------------------- +/// @name Opening and closing database +///----------------------------------- + +/** Opening a new database connection + + The database is opened for reading and writing, and is created if it does not already exist. + + @return `YES` if successful, `NO` on error. + + @see [sqlite3_open()](http://sqlite.org/c3ref/open.html) + @see openWithFlags: + @see close + */ + +- (BOOL)open; + +/** Opening a new database connection with flags and an optional virtual file system (VFS) + + @param flags one of the following three values, optionally combined with the `SQLITE_OPEN_NOMUTEX`, `SQLITE_OPEN_FULLMUTEX`, `SQLITE_OPEN_SHAREDCACHE`, `SQLITE_OPEN_PRIVATECACHE`, and/or `SQLITE_OPEN_URI` flags: + + `SQLITE_OPEN_READONLY` + + The database is opened in read-only mode. If the database does not already exist, an error is returned. + + `SQLITE_OPEN_READWRITE` + + The database is opened for reading and writing if possible, or reading only if the file is write protected by the operating system. In either case the database must already exist, otherwise an error is returned. + + `SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE` + + The database is opened for reading and writing, and is created if it does not already exist. This is the behavior that is always used for `open` method. + + @return `YES` if successful, `NO` on error. + + @see [sqlite3_open_v2()](http://sqlite.org/c3ref/open.html) + @see open + @see close + */ + +- (BOOL)openWithFlags:(int)flags; + +/** Opening a new database connection with flags and an optional virtual file system (VFS) + + @param flags one of the following three values, optionally combined with the `SQLITE_OPEN_NOMUTEX`, `SQLITE_OPEN_FULLMUTEX`, `SQLITE_OPEN_SHAREDCACHE`, `SQLITE_OPEN_PRIVATECACHE`, and/or `SQLITE_OPEN_URI` flags: + + `SQLITE_OPEN_READONLY` + + The database is opened in read-only mode. If the database does not already exist, an error is returned. + + `SQLITE_OPEN_READWRITE` + + The database is opened for reading and writing if possible, or reading only if the file is write protected by the operating system. In either case the database must already exist, otherwise an error is returned. + + `SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE` + + The database is opened for reading and writing, and is created if it does not already exist. This is the behavior that is always used for `open` method. + + @param vfsName If vfs is given the value is passed to the vfs parameter of sqlite3_open_v2. + + @return `YES` if successful, `NO` on error. + + @see [sqlite3_open_v2()](http://sqlite.org/c3ref/open.html) + @see open + @see close + */ + +- (BOOL)openWithFlags:(int)flags vfs:(NSString *)vfsName; + +/** Closing a database connection + + @return `YES` if success, `NO` on error. + + @see [sqlite3_close()](http://sqlite.org/c3ref/close.html) + @see open + @see openWithFlags: + */ + +- (BOOL)close; + +/** Test to see if we have a good connection to the database. + + This will confirm whether: + + - is database open + - if open, it will try a simple SELECT statement and confirm that it succeeds. + + @return `YES` if everything succeeds, `NO` on failure. + */ + +- (BOOL)goodConnection; + + +///---------------------- +/// @name Perform updates +///---------------------- + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html), [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) to bind values to `?` placeholders in the SQL with the optional list of parameters, and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param outErr A reference to the `NSError` pointer to be updated with an auto released `NSError` object if an error if an error occurs. If `nil`, no `NSError` object will be returned. + + @param ... Optional parameters to bind to `?` placeholders in the SQL statement. These should be Objective-C objects (e.g. `NSString`, `NSNumber`, etc.), not fundamental C data types (e.g. `int`, `char *`, etc.). + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see lastError + @see lastErrorCode + @see lastErrorMessage + @see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) + */ + +- (BOOL)executeUpdate:(NSString*)sql withErrorAndBindings:(NSError**)outErr, ...; + +/** Execute single update statement + + @see executeUpdate:withErrorAndBindings: + + @warning **Deprecated**: Please use `` instead. + */ + +- (BOOL)update:(NSString*)sql withErrorAndBindings:(NSError**)outErr, ... __attribute__ ((deprecated)); + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html), [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) to bind values to `?` placeholders in the SQL with the optional list of parameters, and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param ... Optional parameters to bind to `?` placeholders in the SQL statement. These should be Objective-C objects (e.g. `NSString`, `NSNumber`, etc.), not fundamental C data types (e.g. `int`, `char *`, etc.). + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see lastError + @see lastErrorCode + @see lastErrorMessage + @see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) + + @note This technique supports the use of `?` placeholders in the SQL, automatically binding any supplied value parameters to those placeholders. This approach is more robust than techniques that entail using `stringWithFormat` to manually build SQL statements, which can be problematic if the values happened to include any characters that needed to be quoted. + + @note If you want to use this from Swift, please note that you must include `DypayDIRSFMDatabaseVariadic.swift` in your project. Without that, you cannot use this method directly, and instead have to use methods such as ``. + */ + +- (BOOL)executeUpdate:(NSString*)sql, ...; + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. Unlike the other `executeUpdate` methods, this uses printf-style formatters (e.g. `%s`, `%d`, etc.) to build the SQL. Do not use `?` placeholders in the SQL if you use this method. + + @param format The SQL to be performed, with `printf`-style escape sequences. + + @param ... Optional parameters to bind to use in conjunction with the `printf`-style escape sequences in the SQL statement. + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see executeUpdate: + @see lastError + @see lastErrorCode + @see lastErrorMessage + + @note This method does not technically perform a traditional printf-style replacement. What this method actually does is replace the printf-style percent sequences with a SQLite `?` placeholder, and then bind values to that placeholder. Thus the following command + + [db executeUpdateWithFormat:@"INSERT INTO test (name) VALUES (%@)", @"Gus"]; + + is actually replacing the `%@` with `?` placeholder, and then performing something equivalent to `` + + [db executeUpdate:@"INSERT INTO test (name) VALUES (?)", @"Gus"]; + + There are two reasons why this distinction is important. First, the printf-style escape sequences can only be used where it is permissible to use a SQLite `?` placeholder. You can use it only for values in SQL statements, but not for table names or column names or any other non-value context. This method also cannot be used in conjunction with `pragma` statements and the like. Second, note the lack of quotation marks in the SQL. The `VALUES` clause was _not_ `VALUES ('%@')` (like you might have to do if you built a SQL statement using `NSString` method `stringWithFormat`), but rather simply `VALUES (%@)`. + */ + +- (BOOL)executeUpdateWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2); + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) binding any `?` placeholders in the SQL with the optional list of parameters. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param arguments A `NSArray` of objects to be used when binding values to the `?` placeholders in the SQL statement. + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see executeUpdate:values:error: + @see lastError + @see lastErrorCode + @see lastErrorMessage + */ + +- (BOOL)executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray *)arguments; + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) binding any `?` placeholders in the SQL with the optional list of parameters. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + This is similar to ``, except that this also accepts a pointer to a `NSError` pointer, so that errors can be returned. + + In Swift 2, this throws errors, as if it were defined as follows: + + `func executeUpdate(sql: String!, values: [AnyObject]!) throws -> Bool` + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param values A `NSArray` of objects to be used when binding values to the `?` placeholders in the SQL statement. + + @param error A `NSError` object to receive any error object (if any). + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see lastError + @see lastErrorCode + @see lastErrorMessage + + */ + +- (BOOL)executeUpdate:(NSString*)sql values:(NSArray *)values error:(NSError * __autoreleasing *)error; + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. Unlike the other `executeUpdate` methods, this uses printf-style formatters (e.g. `%s`, `%d`, etc.) to build the SQL. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param arguments A `NSDictionary` of objects keyed by column names that will be used when binding values to the `?` placeholders in the SQL statement. + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see lastError + @see lastErrorCode + @see lastErrorMessage +*/ + +- (BOOL)executeUpdate:(NSString*)sql withParameterDictionary:(NSDictionary *)arguments; + + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. Unlike the other `executeUpdate` methods, this uses printf-style formatters (e.g. `%s`, `%d`, etc.) to build the SQL. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param args A `va_list` of arguments. + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see lastError + @see lastErrorCode + @see lastErrorMessage + */ + +- (BOOL)executeUpdate:(NSString*)sql withVAList: (va_list)args; + +/** Execute multiple SQL statements + + This executes a series of SQL statements that are combined in a single string (e.g. the SQL generated by the `sqlite3` command line `.dump` command). This accepts no value parameters, but rather simply expects a single string with multiple SQL statements, each terminated with a semicolon. This uses `sqlite3_exec`. + + @param sql The SQL to be performed + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see executeStatements:withResultBlock: + @see [sqlite3_exec()](http://sqlite.org/c3ref/exec.html) + + */ + +- (BOOL)executeStatements:(NSString *)sql; + +/** Execute multiple SQL statements with callback handler + + This executes a series of SQL statements that are combined in a single string (e.g. the SQL generated by the `sqlite3` command line `.dump` command). This accepts no value parameters, but rather simply expects a single string with multiple SQL statements, each terminated with a semicolon. This uses `sqlite3_exec`. + + @param sql The SQL to be performed. + @param block A block that will be called for any result sets returned by any SQL statements. + Note, if you supply this block, it must return integer value, zero upon success (this would be a good opportunity to use SQLITE_OK), + non-zero value upon failure (which will stop the bulk execution of the SQL). If a statement returns values, the block will be called with the results from the query in NSDictionary *resultsDictionary. + This may be `nil` if you don't care to receive any results. + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, + ``, or `` for diagnostic information regarding the failure. + + @see executeStatements: + @see [sqlite3_exec()](http://sqlite.org/c3ref/exec.html) + + */ + +- (BOOL)executeStatements:(NSString *)sql withResultBlock:(FMDBExecuteStatementsCallbackBlock)block; + +/** Last insert rowid + + Each entry in an SQLite table has a unique 64-bit signed integer key called the "rowid". The rowid is always available as an undeclared column named `ROWID`, `OID`, or `_ROWID_` as long as those names are not also used by explicitly declared columns. If the table has a column of type `INTEGER PRIMARY KEY` then that column is another alias for the rowid. + + This routine returns the rowid of the most recent successful `INSERT` into the database from the database connection in the first argument. As of SQLite version 3.7.7, this routines records the last insert rowid of both ordinary tables and virtual tables. If no successful `INSERT`s have ever occurred on that database connection, zero is returned. + + @return The rowid of the last inserted row. + + @see [sqlite3_last_insert_rowid()](http://sqlite.org/c3ref/last_insert_rowid.html) + + */ + +- (int64_t)lastInsertRowId; + +/** The number of rows changed by prior SQL statement. + + This function returns the number of database rows that were changed or inserted or deleted by the most recently completed SQL statement on the database connection specified by the first parameter. Only changes that are directly specified by the INSERT, UPDATE, or DELETE statement are counted. + + @return The number of rows changed by prior SQL statement. + + @see [sqlite3_changes()](http://sqlite.org/c3ref/changes.html) + + */ + +- (int)changes; + + +///------------------------- +/// @name Retrieving results +///------------------------- + +/** Execute select statement + + Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. + + In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[DypayDIRSResultSet next]>`) from one record to the other. + + This method employs [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) for any optional value parameters. This properly escapes any characters that need escape sequences (e.g. quotation marks), which eliminates simple SQL errors as well as protects against SQL injection attacks. This method natively handles `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects. All other object types will be interpreted as text values using the object's `description` method. + + @param sql The SELECT statement to be performed, with optional `?` placeholders. + + @param ... Optional parameters to bind to `?` placeholders in the SQL statement. These should be Objective-C objects (e.g. `NSString`, `NSNumber`, etc.), not fundamental C data types (e.g. `int`, `char *`, etc.). + + @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see DypayDIRSResultSet + @see [`DypayDIRSResultSet next`](<[DypayDIRSResultSet next]>) + @see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) + + @note If you want to use this from Swift, please note that you must include `DypayDIRSFMDatabaseVariadic.swift` in your project. Without that, you cannot use this method directly, and instead have to use methods such as ``. + */ + +- (DypayDIRSResultSet *)executeQuery:(NSString*)sql, ...; + +/** Execute select statement + + Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. + + In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[DypayDIRSResultSet next]>`) from one record to the other. + + @param format The SQL to be performed, with `printf`-style escape sequences. + + @param ... Optional parameters to bind to use in conjunction with the `printf`-style escape sequences in the SQL statement. + + @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see executeQuery: + @see DypayDIRSResultSet + @see [`DypayDIRSResultSet next`](<[DypayDIRSResultSet next]>) + + @note This method does not technically perform a traditional printf-style replacement. What this method actually does is replace the printf-style percent sequences with a SQLite `?` placeholder, and then bind values to that placeholder. Thus the following command + + [db executeQueryWithFormat:@"SELECT * FROM test WHERE name=%@", @"Gus"]; + + is actually replacing the `%@` with `?` placeholder, and then performing something equivalent to `` + + [db executeQuery:@"SELECT * FROM test WHERE name=?", @"Gus"]; + + There are two reasons why this distinction is important. First, the printf-style escape sequences can only be used where it is permissible to use a SQLite `?` placeholder. You can use it only for values in SQL statements, but not for table names or column names or any other non-value context. This method also cannot be used in conjunction with `pragma` statements and the like. Second, note the lack of quotation marks in the SQL. The `WHERE` clause was _not_ `WHERE name='%@'` (like you might have to do if you built a SQL statement using `NSString` method `stringWithFormat`), but rather simply `WHERE name=%@`. + + */ + +- (DypayDIRSResultSet *)executeQueryWithFormat:(NSString*)format, ... NS_FORMAT_FUNCTION(1,2); + +/** Execute select statement + + Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. + + In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[DypayDIRSResultSet next]>`) from one record to the other. + + @param sql The SELECT statement to be performed, with optional `?` placeholders. + + @param arguments A `NSArray` of objects to be used when binding values to the `?` placeholders in the SQL statement. + + @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see -executeQuery:values:error: + @see DypayDIRSResultSet + @see [`DypayDIRSResultSet next`](<[DypayDIRSResultSet next]>) + */ + +- (DypayDIRSResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments; + +/** Execute select statement + + Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. + + In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[DypayDIRSResultSet next]>`) from one record to the other. + + This is similar to ``, except that this also accepts a pointer to a `NSError` pointer, so that errors can be returned. + + In Swift 2, this throws errors, as if it were defined as follows: + + `func executeQuery(sql: String!, values: [AnyObject]!) throws -> DypayDIRSResultSet!` + + @param sql The SELECT statement to be performed, with optional `?` placeholders. + + @param values A `NSArray` of objects to be used when binding values to the `?` placeholders in the SQL statement. + + @param error A `NSError` object to receive any error object (if any). + + @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see DypayDIRSResultSet + @see [`DypayDIRSResultSet next`](<[DypayDIRSResultSet next]>) + + @note When called from Swift, only use the first two parameters, `sql` and `values`. This but throws the error. + + */ + +- (DypayDIRSResultSet *)executeQuery:(NSString *)sql values:(NSArray *)values error:(NSError * __autoreleasing *)error; + +/** Execute select statement + + Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. + + In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[DypayDIRSResultSet next]>`) from one record to the other. + + @param sql The SELECT statement to be performed, with optional `?` placeholders. + + @param arguments A `NSDictionary` of objects keyed by column names that will be used when binding values to the `?` placeholders in the SQL statement. + + @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see DypayDIRSResultSet + @see [`DypayDIRSResultSet next`](<[DypayDIRSResultSet next]>) + */ + +- (DypayDIRSResultSet *)executeQuery:(NSString *)sql withParameterDictionary:(NSDictionary *)arguments; + + +// Documentation forthcoming. +- (DypayDIRSResultSet *)executeQuery:(NSString*)sql withVAList: (va_list)args; + +///------------------- +/// @name Transactions +///------------------- + +/** Begin a transaction + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see commit + @see rollback + @see beginDeferredTransaction + @see inTransaction + */ + +- (BOOL)beginTransaction; + +/** Begin a deferred transaction + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see commit + @see rollback + @see beginTransaction + @see inTransaction + */ + +- (BOOL)beginDeferredTransaction; + +/** Commit a transaction + + Commit a transaction that was initiated with either `` or with ``. + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see beginTransaction + @see beginDeferredTransaction + @see rollback + @see inTransaction + */ + +- (BOOL)commit; + +/** Rollback a transaction + + Rollback a transaction that was initiated with either `` or with ``. + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see beginTransaction + @see beginDeferredTransaction + @see commit + @see inTransaction + */ + +- (BOOL)rollback; + +/** Identify whether currently in a transaction or not + + @return `YES` if currently within transaction; `NO` if not. + + @see beginTransaction + @see beginDeferredTransaction + @see commit + @see rollback + */ + +- (BOOL)inTransaction; + + +///---------------------------------------- +/// @name Cached statements and result sets +///---------------------------------------- + +/** Clear cached statements */ + +- (void)clearCachedStatements; + +/** Close all open result sets */ + +- (void)closeOpenResultSets; + +/** Whether database has any open result sets + + @return `YES` if there are open result sets; `NO` if not. + */ + +- (BOOL)hasOpenResultSets; + +/** Return whether should cache statements or not + + @return `YES` if should cache statements; `NO` if not. + */ + +- (BOOL)shouldCacheStatements; + +/** Set whether should cache statements or not + + @param value `YES` if should cache statements; `NO` if not. + */ + +- (void)setShouldCacheStatements:(BOOL)value; + + +///------------------------------ +/// @name General inquiry methods +///------------------------------ + +/** The path of the database file + + @return path of database. + + */ + +- (NSString *)databasePath; + +/** The underlying SQLite handle + + @return The `sqlite3` pointer. + + */ + +- (void*)sqliteHandle; + + +///----------------------------- +/// @name Retrieving error codes +///----------------------------- + +/** Last error message + + Returns the English-language text that describes the most recent failed SQLite API call associated with a database connection. If a prior API call failed but the most recent API call succeeded, this return value is undefined. + + @return `NSString` of the last error message. + + @see [sqlite3_errmsg()](http://sqlite.org/c3ref/errcode.html) + @see lastErrorCode + @see lastError + + */ + +- (NSString*)lastErrorMessage; + +/** Last error code + + Returns the numeric result code or extended result code for the most recent failed SQLite API call associated with a database connection. If a prior API call failed but the most recent API call succeeded, this return value is undefined. + + @return Integer value of the last error code. + + @see [sqlite3_errcode()](http://sqlite.org/c3ref/errcode.html) + @see lastErrorMessage + @see lastError + + */ + +- (int)lastErrorCode; + +/** Had error + + @return `YES` if there was an error, `NO` if no error. + + @see lastError + @see lastErrorCode + @see lastErrorMessage + + */ + +- (BOOL)hadError; + +/** Last error + + @return `NSError` representing the last error. + + @see lastErrorCode + @see lastErrorMessage + + */ + +- (NSError*)lastError; + + +// description forthcoming +- (void)setMaxBusyRetryTimeInterval:(NSTimeInterval)timeoutInSeconds; +- (NSTimeInterval)maxBusyRetryTimeInterval; + + +///------------------ +/// @name Save points +///------------------ + +/** Start save point + + @param name Name of save point. + + @param outErr A `NSError` object to receive any error object (if any). + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see releaseSavePointWithName:error: + @see rollbackToSavePointWithName:error: + */ + +- (BOOL)startSavePointWithName:(NSString*)name error:(NSError**)outErr; + +/** Release save point + + @param name Name of save point. + + @param outErr A `NSError` object to receive any error object (if any). + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see startSavePointWithName:error: + @see rollbackToSavePointWithName:error: + + */ + +- (BOOL)releaseSavePointWithName:(NSString*)name error:(NSError**)outErr; + +/** Roll back to save point + + @param name Name of save point. + @param outErr A `NSError` object to receive any error object (if any). + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see startSavePointWithName:error: + @see releaseSavePointWithName:error: + + */ + +- (BOOL)rollbackToSavePointWithName:(NSString*)name error:(NSError**)outErr; + +/** Start save point + + @param block Block of code to perform from within save point. + + @return The NSError corresponding to the error, if any. If no error, returns `nil`. + + @see startSavePointWithName:error: + @see releaseSavePointWithName:error: + @see rollbackToSavePointWithName:error: + + */ + +- (NSError*)inSavePoint:(void (^)(BOOL *rollback))block; + +///------------------------ +/// @name Make SQL function +///------------------------ + +/** Adds SQL functions or aggregates or to redefine the behavior of existing SQL functions or aggregates. + + For example: + + [queue inDatabase:^(DypayDIRSFMDatabase *adb) { + + [adb executeUpdate:@"create table ftest (foo text)"]; + [adb executeUpdate:@"insert into ftest values ('hello')"]; + [adb executeUpdate:@"insert into ftest values ('hi')"]; + [adb executeUpdate:@"insert into ftest values ('not h!')"]; + [adb executeUpdate:@"insert into ftest values ('definitely not h!')"]; + + [adb makeFunctionNamed:@"StringStartsWithH" maximumArguments:1 withBlock:^(sqlite3_context *context, int aargc, sqlite3_value **aargv) { + if (sqlite3_value_type(aargv[0]) == SQLITE_TEXT) { + @autoreleasepool { + const char *c = (const char *)sqlite3_value_text(aargv[0]); + NSString *s = [NSString stringWithUTF8String:c]; + sqlite3_result_int(context, [s hasPrefix:@"h"]); + } + } + else { + Log(@"Unknown formart for StringStartsWithH (%d) %s:%d", sqlite3_value_type(aargv[0]), __FUNCTION__, __LINE__); + sqlite3_result_null(context); + } + }]; + + int rowCount = 0; + DypayDIRSResultSet *ars = [adb executeQuery:@"select * from ftest where StringStartsWithH(foo)"]; + while ([ars next]) { + rowCount++; + Log(@"Does %@ start with 'h'?", [rs stringForColumnIndex:0]); + } + FMDBQuickCheck(rowCount == 2); + }]; + + @param name Name of function + + @param count Maximum number of parameters + + @param block The block of code for the function + + @see [sqlite3_create_function()](http://sqlite.org/c3ref/create_function.html) + */ + +- (void)makeFunctionNamed:(NSString*)name maximumArguments:(int)count withBlock:(void (^)(void *context, int argc, void **argv))block; + + +///--------------------- +/// @name Date formatter +///--------------------- + +/** Generate an `NSDateFormatter` that won't be broken by permutations of timezones or locales. + + Use this method to generate values to set the dateFormat property. + + Example: + + myDB.dateFormat = [DypayDIRSFMDatabase storeableDateFormat:@"yyyy-MM-dd HH:mm:ss"]; + + @param format A valid NSDateFormatter format string. + + @return A `NSDateFormatter` that can be used for converting dates to strings and vice versa. + + @see hasDateFormatter + @see setDateFormat: + @see dateFromString: + @see stringFromDate: + @see storeableDateFormat: + + @warning Note that `NSDateFormatter` is not thread-safe, so the formatter generated by this method should be assigned to only one FMDB instance and should not be used for other purposes. + + */ + ++ (NSDateFormatter *)storeableDateFormat:(NSString *)format; + +/** Test whether the database has a date formatter assigned. + + @return `YES` if there is a date formatter; `NO` if not. + + @see hasDateFormatter + @see setDateFormat: + @see dateFromString: + @see stringFromDate: + @see storeableDateFormat: + */ + +- (BOOL)hasDateFormatter; + +/** Set to a date formatter to use string dates with sqlite instead of the default UNIX timestamps. + + @param format Set to nil to use UNIX timestamps. Defaults to nil. Should be set using a formatter generated using DypayDIRSFMDatabase::storeableDateFormat. + + @see hasDateFormatter + @see setDateFormat: + @see dateFromString: + @see stringFromDate: + @see storeableDateFormat: + + @warning Note there is no direct getter for the `NSDateFormatter`, and you should not use the formatter you pass to FMDB for other purposes, as `NSDateFormatter` is not thread-safe. + */ + +- (void)setDateFormat:(NSDateFormatter *)format; + +/** Convert the supplied NSString to NSDate, using the current database formatter. + + @param s `NSString` to convert to `NSDate`. + + @return The `NSDate` object; or `nil` if no formatter is set. + + @see hasDateFormatter + @see setDateFormat: + @see dateFromString: + @see stringFromDate: + @see storeableDateFormat: + */ + +- (NSDate *)dateFromString:(NSString *)s; + +/** Convert the supplied NSDate to NSString, using the current database formatter. + + @param date `NSDate` of date to convert to `NSString`. + + @return The `NSString` representation of the date; `nil` if no formatter is set. + + @see hasDateFormatter + @see setDateFormat: + @see dateFromString: + @see stringFromDate: + @see storeableDateFormat: + */ + +- (NSString *)stringFromDate:(NSDate *)date; + +@end + + +/** Objective-C wrapper for `sqlite3_stmt` + + This is a wrapper for a SQLite `sqlite3_stmt`. Generally when using FMDB you will not need to interact directly with `DypayDIRSStatement`, but rather with `` and `` only. + + ### See also + + - `` + - `` + - [`sqlite3_stmt`](http://www.sqlite.org/c3ref/stmt.html) + */ + +@interface DypayDIRSStatement : NSObject { + void *_statement; + NSString *_query; + long _useCount; + BOOL _inUse; +} + +///----------------- +/// @name Properties +///----------------- + +/** Usage count */ + +@property (atomic, assign) long useCount; + +/** SQL statement */ + +@property (atomic, retain) NSString *query; + +/** SQLite sqlite3_stmt + + @see [`sqlite3_stmt`](http://www.sqlite.org/c3ref/stmt.html) + */ + +@property (atomic, assign) void *statement; + +/** Indication of whether the statement is in use */ + +@property (atomic, assign) BOOL inUse; + +///---------------------------- +/// @name Closing and Resetting +///---------------------------- + +/** Close statement */ + +- (void)close; + +/** Reset statement */ + +- (void)reset; + +@end + +#pragma clang diagnostic pop + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSFMDatabaseQueue.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSFMDatabaseQueue.h new file mode 100644 index 0000000..ff0d7b7 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSFMDatabaseQueue.h @@ -0,0 +1,182 @@ +// +// DypayDIRSFMDatabaseQueue.h +// fmdb +// +// Created by August Mueller on 6/22/11. +// Copyright 2011 Flying Meat Inc. All rights reserved. +// + +#import + +@class DypayDIRSFMDatabase; + +/** To perform queries and updates on multiple threads, you'll want to use `DypayDIRSFMDatabaseQueue`. + + Using a single instance of `` from multiple threads at once is a bad idea. It has always been OK to make a `` object *per thread*. Just don't share a single instance across threads, and definitely not across multiple threads at the same time. + + Instead, use `DypayDIRSFMDatabaseQueue`. Here's how to use it: + + First, make your queue. + + DypayDIRSFMDatabaseQueue *queue = [DypayDIRSFMDatabaseQueue databaseQueueWithPath:aPath]; + + Then use it like so: + + [queue inDatabase:^(DypayDIRSFMDatabase *db) { + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:1]]; + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:2]]; + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:3]]; + + DypayDIRSResultSet *rs = [db executeQuery:@"select * from foo"]; + while ([rs next]) { + //… + } + }]; + + An easy way to wrap things up in a transaction can be done like this: + + [queue inTransaction:^(DypayDIRSFMDatabase *db, BOOL *rollback) { + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:1]]; + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:2]]; + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:3]]; + + if (whoopsSomethingWrongHappened) { + *rollback = YES; + return; + } + // etc… + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:4]]; + }]; + + `DypayDIRSFMDatabaseQueue` will run the blocks on a serialized queue (hence the name of the class). So if you call `DypayDIRSFMDatabaseQueue`'s methods from multiple threads at the same time, they will be executed in the order they are received. This way queries and updates won't step on each other's toes, and every one is happy. + + ### See also + + - `` + + @warning Do not instantiate a single `` object and use it across multiple threads. Use `DypayDIRSFMDatabaseQueue` instead. + + @warning The calls to `DypayDIRSFMDatabaseQueue`'s methods are blocking. So even though you are passing along blocks, they will **not** be run on another thread. + + */ + +@interface DypayDIRSFMDatabaseQueue : NSObject { + NSString *_path; + dispatch_queue_t _queue; + DypayDIRSFMDatabase *_db; + int _openFlags; +} + +/** Path of database */ + +@property (atomic, retain) NSString *path; + +/** Open flags */ + +@property (atomic, readonly) int openFlags; + +///---------------------------------------------------- +/// @name Initialization, opening, and closing of queue +///---------------------------------------------------- + +/** Create queue using path. + + @param aPath The file path of the database. + + @return The `DypayDIRSFMDatabaseQueue` object. `nil` on error. + */ + ++ (instancetype)databaseQueueWithPath:(NSString*)aPath; + +/** Create queue using path and specified flags. + + @param aPath The file path of the database. + @param openFlags Flags passed to the openWithFlags method of the database + + @return The `DypayDIRSFMDatabaseQueue` object. `nil` on error. + */ ++ (instancetype)databaseQueueWithPath:(NSString*)aPath flags:(int)openFlags; + +/** Create queue using path. + + @param aPath The file path of the database. + + @return The `DypayDIRSFMDatabaseQueue` object. `nil` on error. + */ + +- (instancetype)initWithPath:(NSString*)aPath; + +/** Create queue using path and specified flags. + + @param aPath The file path of the database. + @param openFlags Flags passed to the openWithFlags method of the database + + @return The `DypayDIRSFMDatabaseQueue` object. `nil` on error. + */ + +- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags; + +/** Create queue using path and specified flags. + + @param aPath The file path of the database. + @param openFlags Flags passed to the openWithFlags method of the database + @param vfsName The name of a custom virtual file system + + @return The `DypayDIRSFMDatabaseQueue` object. `nil` on error. + */ + +- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName; + +/** Returns the Class of 'DypayDIRSFMDatabase' subclass, that will be used to instantiate database object. + + Subclasses can override this method to return specified Class of 'DypayDIRSFMDatabase' subclass. + + @return The Class of 'DypayDIRSFMDatabase' subclass, that will be used to instantiate database object. + */ + ++ (Class)databaseClass; + +/** Close database used by queue. */ + +- (void)close; + +///----------------------------------------------- +/// @name Dispatching database operations to queue +///----------------------------------------------- + +/** Synchronously perform database operations on queue. + + @param block The code to be run on the queue of `DypayDIRSFMDatabaseQueue` + */ + +- (void)inDatabase:(void (^)(DypayDIRSFMDatabase *db))block; + +/** Synchronously perform database operations on queue, using transactions. + + @param block The code to be run on the queue of `DypayDIRSFMDatabaseQueue` + */ + +- (void)inTransaction:(void (^)(DypayDIRSFMDatabase *db, BOOL *rollback))block; + +/** Synchronously perform database operations on queue, using deferred transactions. + + @param block The code to be run on the queue of `DypayDIRSFMDatabaseQueue` + */ + +- (void)inDeferredTransaction:(void (^)(DypayDIRSFMDatabase *db, BOOL *rollback))block; + +///----------------------------------------------- +/// @name Dispatching database operations to queue +///----------------------------------------------- + +/** Synchronously perform database operations using save point. + + @param block The code to be run on the queue of `DypayDIRSFMDatabaseQueue` + */ + +// NOTE: you can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock. +// If you need to nest, use DypayDIRSFMDatabase's startSavePointWithName:error: instead. +- (NSError*)inSavePoint:(void (^)(DypayDIRSFMDatabase *db, BOOL *rollback))block; + +@end + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSFMResultSet.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSFMResultSet.h new file mode 100644 index 0000000..76e1505 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSFMResultSet.h @@ -0,0 +1,468 @@ +#import + +#ifndef __has_feature // Optional. +#define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif + +#ifndef NS_RETURNS_NOT_RETAINED +#if __has_feature(attribute_ns_returns_not_retained) +#define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) +#else +#define NS_RETURNS_NOT_RETAINED +#endif +#endif + +@class DypayDIRSFMDatabase; +@class DypayDIRSStatement; + +/** Represents the results of executing a query on an ``. + + ### See also + + - `` + */ + +@interface DypayDIRSResultSet : NSObject { + DypayDIRSFMDatabase *_parentDB; + DypayDIRSStatement *_statement; + + NSString *_query; + NSMutableDictionary *_columnNameToIndexMap; +} + +///----------------- +/// @name Properties +///----------------- + +/** Executed query */ + +@property (atomic, retain) NSString *query; + +/** `NSMutableDictionary` mapping column names to numeric index */ + +@property (readonly) NSMutableDictionary *columnNameToIndexMap; + +/** `DypayDIRSStatement` used by result set. */ + +@property (atomic, retain) DypayDIRSStatement *statement; + +///------------------------------------ +/// @name Creating and closing database +///------------------------------------ + +/** Create result set from `` + + @param statement A `` to be performed + + @param aDB A `` to be used + + @return A `DypayDIRSResultSet` on success; `nil` on failure + */ + ++ (instancetype)resultSetWithStatement:(DypayDIRSStatement *)statement usingParentDatabase:(DypayDIRSFMDatabase*)aDB; + +/** Close result set */ + +- (void)close; + +- (void)setParentDB:(DypayDIRSFMDatabase *)newDb; + +///--------------------------------------- +/// @name Iterating through the result set +///--------------------------------------- + +/** Retrieve next row for result set. + + You must always invoke `next` or `nextWithError` before attempting to access the values returned in a query, even if you're only expecting one. + + @return `YES` if row successfully retrieved; `NO` if end of result set reached + + @see hasAnotherRow + */ + +- (BOOL)next; + +/** Retrieve next row for result set. + + You must always invoke `next` or `nextWithError` before attempting to access the values returned in a query, even if you're only expecting one. + + @param outErr A 'NSError' object to receive any error object (if any). + + @return 'YES' if row successfully retrieved; 'NO' if end of result set reached + + @see hasAnotherRow + */ + +- (BOOL)nextWithError:(NSError **)outErr; + +/** Did the last call to `` succeed in retrieving another row? + + @return `YES` if the last call to `` succeeded in retrieving another record; `NO` if not. + + @see next + + @warning The `hasAnotherRow` method must follow a call to ``. If the previous database interaction was something other than a call to `next`, then this method may return `NO`, whether there is another row of data or not. + */ + +- (BOOL)hasAnotherRow; + +///--------------------------------------------- +/// @name Retrieving information from result set +///--------------------------------------------- + +/** How many columns in result set + + @return Integer value of the number of columns. + */ + +- (int)columnCount; + +/** Column index for column name + + @param columnName `NSString` value of the name of the column. + + @return Zero-based index for column. + */ + +- (int)columnIndexForName:(NSString*)columnName; + +/** Column name for column index + + @param columnIdx Zero-based index for column. + + @return columnName `NSString` value of the name of the column. + */ + +- (NSString*)columnNameForIndex:(int)columnIdx; + +/** Result set integer value for column. + + @param columnName `NSString` value of the name of the column. + + @return `int` value of the result set's column. + */ + +- (int)intForColumn:(NSString*)columnName; + +/** Result set integer value for column. + + @param columnIdx Zero-based index for column. + + @return `int` value of the result set's column. + */ + +- (int)intForColumnIndex:(int)columnIdx; + +/** Result set `long` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `long` value of the result set's column. + */ + +- (long)longForColumn:(NSString*)columnName; + +/** Result set long value for column. + + @param columnIdx Zero-based index for column. + + @return `long` value of the result set's column. + */ + +- (long)longForColumnIndex:(int)columnIdx; + +/** Result set `long long int` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `long long int` value of the result set's column. + */ + +- (long long int)longLongIntForColumn:(NSString*)columnName; + +/** Result set `long long int` value for column. + + @param columnIdx Zero-based index for column. + + @return `long long int` value of the result set's column. + */ + +- (long long int)longLongIntForColumnIndex:(int)columnIdx; + +/** Result set `unsigned long long int` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `unsigned long long int` value of the result set's column. + */ + +- (unsigned long long int)unsignedLongLongIntForColumn:(NSString*)columnName; + +/** Result set `unsigned long long int` value for column. + + @param columnIdx Zero-based index for column. + + @return `unsigned long long int` value of the result set's column. + */ + +- (unsigned long long int)unsignedLongLongIntForColumnIndex:(int)columnIdx; + +/** Result set `BOOL` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `BOOL` value of the result set's column. + */ + +- (BOOL)boolForColumn:(NSString*)columnName; + +/** Result set `BOOL` value for column. + + @param columnIdx Zero-based index for column. + + @return `BOOL` value of the result set's column. + */ + +- (BOOL)boolForColumnIndex:(int)columnIdx; + +/** Result set `double` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `double` value of the result set's column. + + */ + +- (double)doubleForColumn:(NSString*)columnName; + +/** Result set `double` value for column. + + @param columnIdx Zero-based index for column. + + @return `double` value of the result set's column. + + */ + +- (double)doubleForColumnIndex:(int)columnIdx; + +/** Result set `NSString` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `NSString` value of the result set's column. + + */ + +- (NSString*)stringForColumn:(NSString*)columnName; + +/** Result set `NSString` value for column. + + @param columnIdx Zero-based index for column. + + @return `NSString` value of the result set's column. + */ + +- (NSString*)stringForColumnIndex:(int)columnIdx; + +/** Result set `NSDate` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `NSDate` value of the result set's column. + */ + +- (NSDate*)dateForColumn:(NSString*)columnName; + +/** Result set `NSDate` value for column. + + @param columnIdx Zero-based index for column. + + @return `NSDate` value of the result set's column. + + */ + +- (NSDate*)dateForColumnIndex:(int)columnIdx; + +/** Result set `NSData` value for column. + + This is useful when storing binary data in table (such as image or the like). + + @param columnName `NSString` value of the name of the column. + + @return `NSData` value of the result set's column. + + */ + +- (NSData*)dataForColumn:(NSString*)columnName; + +/** Result set `NSData` value for column. + + @param columnIdx Zero-based index for column. + + @return `NSData` value of the result set's column. + */ + +- (NSData*)dataForColumnIndex:(int)columnIdx; + +/** Result set `(const unsigned char *)` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `(const unsigned char *)` value of the result set's column. + */ + +- (const unsigned char *)UTF8StringForColumnName:(NSString*)columnName; + +/** Result set `(const unsigned char *)` value for column. + + @param columnIdx Zero-based index for column. + + @return `(const unsigned char *)` value of the result set's column. + */ + +- (const unsigned char *)UTF8StringForColumnIndex:(int)columnIdx; + +/** Result set object for column. + + @param columnName `NSString` value of the name of the column. + + @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. + + @see objectForKeyedSubscript: + */ + +- (id)objectForColumnName:(NSString*)columnName; + +/** Result set object for column. + + @param columnIdx Zero-based index for column. + + @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. + + @see objectAtIndexedSubscript: + */ + +- (id)objectForColumnIndex:(int)columnIdx; + +/** Result set object for column. + + This method allows the use of the "boxed" syntax supported in Modern Objective-C. For example, by defining this method, the following syntax is now supported: + + id result = rs[@"employee_name"]; + + This simplified syntax is equivalent to calling: + + id result = [rs objectForKeyedSubscript:@"employee_name"]; + + which is, it turns out, equivalent to calling: + + id result = [rs objectForColumnName:@"employee_name"]; + + @param columnName `NSString` value of the name of the column. + + @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. + */ + +- (id)objectForKeyedSubscript:(NSString *)columnName; + +/** Result set object for column. + + This method allows the use of the "boxed" syntax supported in Modern Objective-C. For example, by defining this method, the following syntax is now supported: + + id result = rs[0]; + + This simplified syntax is equivalent to calling: + + id result = [rs objectForKeyedSubscript:0]; + + which is, it turns out, equivalent to calling: + + id result = [rs objectForColumnName:0]; + + @param columnIdx Zero-based index for column. + + @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. + */ + +- (id)objectAtIndexedSubscript:(int)columnIdx; + +/** Result set `NSData` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `NSData` value of the result set's column. + + @warning If you are going to use this data after you iterate over the next row, or after you close the +result set, make sure to make a copy of the data first (or just use ``/``) +If you don't, you're going to be in a world of hurt when you try and use the data. + + */ + +- (NSData*)dataNoCopyForColumn:(NSString*)columnName NS_RETURNS_NOT_RETAINED; + +/** Result set `NSData` value for column. + + @param columnIdx Zero-based index for column. + + @return `NSData` value of the result set's column. + + @warning If you are going to use this data after you iterate over the next row, or after you close the + result set, make sure to make a copy of the data first (or just use ``/``) + If you don't, you're going to be in a world of hurt when you try and use the data. + + */ + +- (NSData*)dataNoCopyForColumnIndex:(int)columnIdx NS_RETURNS_NOT_RETAINED; + +/** Is the column `NULL`? + + @param columnIdx Zero-based index for column. + + @return `YES` if column is `NULL`; `NO` if not `NULL`. + */ + +- (BOOL)columnIndexIsNull:(int)columnIdx; + +/** Is the column `NULL`? + + @param columnName `NSString` value of the name of the column. + + @return `YES` if column is `NULL`; `NO` if not `NULL`. + */ + +- (BOOL)columnIsNull:(NSString*)columnName; + + +/** Returns a dictionary of the row results mapped to case sensitive keys of the column names. + + @returns `NSDictionary` of the row results. + + @warning The keys to the dictionary are case sensitive of the column names. + */ + +- (NSDictionary*)resultDictionary; + +/** Returns a dictionary of the row results + + @see resultDictionary + + @warning **Deprecated**: Please use `` instead. Also, beware that `` is case sensitive! + */ + +- (NSDictionary*)resultDict __attribute__ ((deprecated)); + +///----------------------------- +/// @name Key value coding magic +///----------------------------- + +/** Performs `setValue` to yield support for key value observing. + + @param object The object for which the values will be set. This is the key-value-coding compliant object that you might, for example, observe. + + */ + +- (void)kvcMagic:(id)object; + + +@end + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSGlobalTimer.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSGlobalTimer.h new file mode 100644 index 0000000..5aa0466 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSGlobalTimer.h @@ -0,0 +1,28 @@ +// +// DypayDIRSGlobalTimer.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/12. +// + +#import +#import "DypayIRISInterfaceDefines.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSGlobalTimer : NSObject + ++ (instancetype)globalTimer; + +- (void)addTimer:(id _Nullable)timer; + +- (void)removeTimer:(id _Nullable)timer; + +- (void)startTimer; + +- (void)stopTimer; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSIdentity.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSIdentity.h new file mode 100644 index 0000000..bd40904 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSIdentity.h @@ -0,0 +1,29 @@ +// +// DypayDIRSIdentity.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSIdentity : DypayDIRSBasicModule + +//for all service +@property (readonly) BOOL isIdentifierAvailable; + +@property (readonly, nullable) NSString *clientId; + +- (void)setUserIdentifiers:(NSDictionary *)IDs; + +- (void)setDeviceIdentifiers:(NSDictionary *)IDs; + +- (NSDictionary *)userIdentifiers; + +- (NSDictionary *)deviceIdentifiers; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSLogger.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSLogger.h new file mode 100644 index 0000000..b859cc9 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSLogger.h @@ -0,0 +1,32 @@ +// +// DypayDIRSLogger.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + + +@interface DypayDIRSConsoleLogger : DypayDIRSBasicModule + +@end + + +@interface DypayDIRSLogger : DypayDIRSBasicModule + +- (void)addLogger:(id)logger; + +- (void)removeLogger:(id)logger; + +- (void)removeAllLoggers; + +- (void)addLog:(id _Nonnull)log; + +- (nonnull NSString *)stringUsingDefaultFormatter:(nonnull id)log; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSMMapCache.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSMMapCache.h new file mode 100644 index 0000000..0bc5993 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSMMapCache.h @@ -0,0 +1,27 @@ +// +// DypayDIRSMMapCache.h +// DypayDataIRIS +// +// Created by ByteDance on 2024/3/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSMMapCache : NSObject + +@property (nonatomic, assign, readonly) BOOL isMapping; + +@property (nonatomic, assign, readonly, nullable) void *object; + +- (instancetype)initWithPath:(NSString *)path; + +- (BOOL)mmap:(size_t)size; + +- (void)munmap; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSModuleHive.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSModuleHive.h new file mode 100644 index 0000000..a91bffd --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSModuleHive.h @@ -0,0 +1,54 @@ +// +// DypayDIRSModuleHive.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/12. +// + +#import +#import "DypayIRISInterfaceDefines.h" +#import "DypayDIRSConcurrentCollection.h" + +NS_ASSUME_NONNULL_BEGIN + +@class DypayDIRSContext; +@interface DypayDIRSModuleHive : NSObject { + +} + +@property (nonatomic, weak) DypayDIRSContext* context; + +- (instancetype)initWithContext:(nonnull DypayDIRSContext *)context; + +- (void)resume; + +- (void)suspend; + +- (void)start; + +- (nullable id)loadUsingId:(NSString *)moduleId; + +- (nullable id)loadUsingClass:(Class)moduleClass; + +- (nullable NSArray *)loadUsingProtocol:(Protocol *)protocol; + +- (void)notify:(nonnull Protocol *)protocol + selector:(SEL)sel + arguments:(NSArray * _Nullable)arguments; + + +- (BOOL)handleURL:(nonnull NSURL *)url; + +- (void)raiseError:(nonnull NSError *)error + isFatal:(BOOL)fatal + withUserInfo:(nullable id)userInfo; + +- (nullable NSDictionary *)exportCommonParameters:(nullable NSArray *)required; + +- (nullable NSDictionary *)exportFeatureParameters; + +- (nullable NSDictionary *)exportFeatureOptions; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSNetworking.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSNetworking.h new file mode 100644 index 0000000..8213a70 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSNetworking.h @@ -0,0 +1,49 @@ +// +// DypayDIRSNetworking.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/18. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSNetworkRequestOptions: NSObject + +@property (nonatomic, assign) NSUInteger attempts; + +@property (nonatomic, assign) NSTimeInterval timeout; + +@property (nullable, nonatomic) NSArray> *compressors; + +@property (nullable, nonatomic, weak) id encryptor; + +@property (nullable, nonatomic, weak) id decryptor; + +@property (nullable, nonatomic) NSDictionary *userInfo; + +@end + + +@interface DypayDIRSNetworking : DypayDIRSBasicModule { +} + +@property (nonatomic) id provider; + +- (void)syncUsingSchema:(nonnull id)schema + header:(nullable NSDictionary *)header + body:(nullable id)body + options:(nullable id)options + completion:(void (^_Nullable)(BOOL success, id _Nullable data, id _Nullable response, NSError * _Nullable error, id _Nullable metrics))completionHandler; + +- (void)asyncUsingSchema:(nonnull id)schema + header:(nullable NSDictionary *)header + body:(nullable id)body + options:(nullable id)options + completion:(void (^_Nullable)(BOOL success, id _Nullable data, id _Nullable response, NSError * _Nullable error, id _Nullable metrics))completionHandler; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSPreStorePlugin.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSPreStorePlugin.h new file mode 100644 index 0000000..e9f887d --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSPreStorePlugin.h @@ -0,0 +1,16 @@ +// +// DypayDIRSPreStorePlugin.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/10/23. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSPreStorePlugin : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRealtimeEventPlugin.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRealtimeEventPlugin.h new file mode 100644 index 0000000..0b88a96 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRealtimeEventPlugin.h @@ -0,0 +1,16 @@ +// +// DypayDIRSRealtimeEventPlugin.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/11. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSRealtimeEventPlugin : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRemoteSettings.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRemoteSettings.h new file mode 100644 index 0000000..cbeacd4 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRemoteSettings.h @@ -0,0 +1,16 @@ +// +// DypayDIRSRemoteSettings.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/4. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSRemoteSettings : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRemoteSettingsSchema.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRemoteSettingsSchema.h new file mode 100644 index 0000000..5c64663 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRemoteSettingsSchema.h @@ -0,0 +1,16 @@ +// +// DypayDIRSRemoteSettingsSchema.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/4. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSRemoteSettingsSchema : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRequestParameters.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRequestParameters.h new file mode 100644 index 0000000..0a54034 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSRequestParameters.h @@ -0,0 +1,22 @@ +// +// DypayDIRSRequestParameters.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/4. +// + +#import + + +NS_ASSUME_NONNULL_BEGIN +@class DypayDIRSContext; +@interface DypayDIRSRequestParameters : NSObject + ++ (nullable NSDictionary *)commonParameters:(NSUInteger)service + context:(nonnull DypayDIRSContext *)context + fieldKeys:(nullable NSArray *)keys; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSStore.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSStore.h new file mode 100644 index 0000000..959b76e --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSStore.h @@ -0,0 +1,20 @@ +// +// DypayDIRSStore.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSStore : DypayDIRSBasicModule + +- (id)cache; + +- (_Nullable id)preferences; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSTask.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSTask.h new file mode 100644 index 0000000..2cf8913 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSTask.h @@ -0,0 +1,22 @@ +// +// DypayDIRSTask.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSTask : NSObject + ++ (void)asyncConcurrentTask:(dispatch_block_t)task; ++ (void)asyncGlobalTask:(dispatch_block_t)task; ++ (void)asyncMainTask:(dispatch_block_t)task + forContext:(id)context; ++ (dispatch_queue_t)defaultConcurrent; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSThrottlterPlugin.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSThrottlterPlugin.h new file mode 100644 index 0000000..42b3d10 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSThrottlterPlugin.h @@ -0,0 +1,16 @@ +// +// DypayDIRSThrottlterPlugin.h +// Pods +// +// Created by ByteDance on 2023/8/4. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSThrottlterPlugin : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSTracker+Session.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSTracker+Session.h new file mode 100644 index 0000000..7ae17c3 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSTracker+Session.h @@ -0,0 +1,30 @@ +// +// DypayDIRSTracker+Session.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/9/20. +// + +#import "DypayDataIRIS.h" + +typedef NS_ENUM(NSUInteger, DypayIRISLaunchType) { + DypayIRISLaunchTypeInitialState = 0, + DypayIRISLaunchTypeUserClick, + DypayIRISLaunchTypeRemotePush, + DypayIRISLaunchTypeWidget, + DypayIRISLaunchTypeSpotlight, + DypayIRISLaunchTypeExternal, + DypayIRISLaunchTypeBackground, + DypayIRISLaunchTypeSiri, + DypayIRISLaunchTypeUserLoginChanged = 99, +}; + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSTracker (Session) + +@property (nonatomic, assign) DypayIRISLaunchType launchType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSTracker.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSTracker.h new file mode 100644 index 0000000..54f8782 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSTracker.h @@ -0,0 +1,79 @@ +// +// DypayDIRSTracker.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class DypayDIRSConfig,DypayDIRSEventUploadFilterOptions; +@interface DypayDIRSTracker : NSObject + ++ (instancetype _Nonnull)mainTracker; + ++ (instancetype _Nonnull)initMainTrackerWithConfig:(DypayDIRSConfig * _Nonnull)config; + +- (instancetype _Nonnull)initWithConfig:(DypayDIRSConfig * _Nonnull)config; + +- (BOOL)start; + +- (void)stop; + +- (void)setDeviceIdentifiers:(nonnull NSDictionary *)IDs; + +- (void)setUserIdentifiers:(nonnull NSDictionary *)IDs; + + +- (nullable NSString *)clientId; + +@end + +@interface DypayDIRSTracker (Event) + +//Default is YES; +@property (nonatomic, assign) BOOL eventTrackEnabled; + +//Default is YES; +@property (nonatomic, assign) BOOL eventUploadEnabled; + +- (void)trackEvent:(NSString * _Nonnull)key + withProperties:(NSDictionary * _Nullable)properties; + +- (void)trackJSON:(NSDictionary * _Nonnull)json + withType:(NSString * _Nonnull)type; + +- (void)addGlobalProperties:(nullable NSDictionary *)properties; + +- (void)removeGlobalPropertiesForKeys:(nullable NSArray *)keys; + +- (void)removeAllEvents; + +@end + + + +@interface DypayDIRSTracker (Enviroment) + +- (void)setAppRegion:(nullable NSString *)appRegion; + +- (void)setAppLanguage:(nullable NSString *)appLauguage; + +- (void)setEventRegion:(nullable NSString *)region; + +- (nullable NSString *)currentEventRegion; + +@end + + +@interface DypayDIRSTracker (URL) + +- (BOOL)handleURL:(nonnull NSURL *)url; + +@end + + + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSUtilities.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSUtilities.h new file mode 100644 index 0000000..ab09026 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSUtilities.h @@ -0,0 +1,32 @@ +// +// DypayDIRSUtilities.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +@interface DypayDIRSUtilities : NSObject + ++ (nonnull NSString *)rootDirectory; ++ (nullable NSString *)ensureDirectory:(nonnull NSString *)path; + +//Runtime ++ (NSString *)timeParser:(NSTimeInterval)time; ++ (NSString *)dateParser:(NSTimeInterval)time; + ++ (void)measureExecution:(void (^)(void))execution + completion:(void (^ __nullable)(NSTimeInterval interval))completion; + + +//equal + ++ (BOOL)isObject:(id)obj isEqualTo:(id)target; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSValue.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSValue.h new file mode 100644 index 0000000..2396c30 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDIRSValue.h @@ -0,0 +1,21 @@ +// +// DypayDIRSValue.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import + +#import "DypayIRISInterfaceDefines.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSValue : NSObject + +- (instancetype)initWithValue:(nullable id)object + withSource:(DypayIRISValueSource)source; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRIS.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRIS.h new file mode 100644 index 0000000..7375f9b --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRIS.h @@ -0,0 +1,17 @@ +// +// DypayDataIRIS.h +// Pods +// +// Created by ByteDance on 2023/7/12. +// + +#ifndef DypayDataIRIS_h +#define DypayDataIRIS_h + +#import "DypayIRISDefines.h" +#import "DypayDIRSConfig.h" +#import "DypayDIRSTracker.h" +#import "DypayDIRSEndpointConfiguration.h" + + +#endif /* DypayDataIRIS_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISDefaultSchema.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISDefaultSchema.h new file mode 100644 index 0000000..5446737 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISDefaultSchema.h @@ -0,0 +1,12 @@ +// +// DypayDataIRISDefaultSchema.h +// Pods +// +// Created by ByteDance on 2023/9/14. +// + +#ifndef DypayDataIRISDefaultSchema_h +#define DypayDataIRISDefaultSchema_h + + +#endif /* DypayDataIRISDefaultSchema_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISEvent.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISEvent.h new file mode 100644 index 0000000..fd3a37d --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISEvent.h @@ -0,0 +1,12 @@ +// +// DypayDataIRISEvent.h +// Pods +// +// Created by ByteDance on 2023/9/14. +// + +#ifndef DypayDataIRISEvent_h +#define DypayDataIRISEvent_h + + +#endif /* DypayDataIRISEvent_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISFMDB.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISFMDB.h new file mode 100644 index 0000000..b3b85e3 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISFMDB.h @@ -0,0 +1,12 @@ +// +// DypayDataIRISFMDB.h +// Pods +// +// Created by ByteDance on 2023/9/14. +// + +#ifndef DypayDataIRISFMDB_h +#define DypayDataIRISFMDB_h + + +#endif /* DypayDataIRISFMDB_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISRemoteSettings.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISRemoteSettings.h new file mode 100644 index 0000000..05f32bb --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISRemoteSettings.h @@ -0,0 +1,12 @@ +// +// DypayDataIRISRemoteSettings.h +// Pods +// +// Created by ByteDance on 2023/9/14. +// + +#ifndef DypayDataIRISRemoteSettings_h +#define DypayDataIRISRemoteSettings_h + + +#endif /* DypayDataIRISRemoteSettings_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISThrottlter.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISThrottlter.h new file mode 100644 index 0000000..06d6e09 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayDataIRISThrottlter.h @@ -0,0 +1,12 @@ +// +// DypayDataIRISThrottlter.h +// Pods +// +// Created by ByteDance on 2023/9/14. +// + +#ifndef DypayDataIRISThrottlter_h +#define DypayDataIRISThrottlter_h + + +#endif /* DypayDataIRISThrottlter_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISDefines.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISDefines.h new file mode 100644 index 0000000..4652c11 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISDefines.h @@ -0,0 +1,120 @@ +// +// IRSDefines.h +// +// +// Created by ByteDance on 2023/7/11. +// + +#ifndef IRSDefines_h +#define IRSDefines_h + +typedef NSString * DypayIRISParameterKey; +typedef NSString * DypayIRISOptionsKey; +typedef NSUInteger DypayIRISServiceType; + +typedef NS_ENUM(NSInteger, DypayIRISLOG_LEVEL) { + DypayIRISLOG_LEVEL_OFF = 0, + DypayIRISLOG_LEVEL_ERROR = 1, + DypayIRISLOG_LEVEL_WARN = 2, + DypayIRISLOG_LEVEL_INFO = 3, + DypayIRISLOG_LEVEL_DEBUG = 4, +}; + +typedef NS_ENUM(NSInteger, DypayIRISValueSource) { + DypayIRISValueSourceDefault = 1, + DypayIRISValueSourceLocal, + DypayIRISValueSourceRemote +}; + + +typedef NS_ENUM(NSInteger, DypayIRISEventPacketStrategy) { + DypayIRISEventPacketStrategyDefault = 0, + DypayIRISEventPacketStrategyByteLimitation = 1, +}; + + +FOUNDATION_EXPORT DypayIRISServiceType DypayIRISServiceTypeRemoteSettings; +FOUNDATION_EXPORT DypayIRISServiceType DypayIRISServiceTypeEvent; +FOUNDATION_EXPORT DypayIRISServiceType DypayIRISServiceTypeEventRealtime; + + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISBatchFilterAllowRegionListKey; + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISBatchOptionsMaxConcurrentCountKey; + + +@protocol DypayIRISLog + +@property (nonatomic) DypayIRISLOG_LEVEL level; + +@property (nonatomic) NSTimeInterval time; + +@property (nullable, nonatomic, copy) NSString * tag; + +@property (nullable, nonatomic, copy) NSString * message; + +@end + + +@protocol DypayIRISValue + +- (DypayIRISValueSource)source; + +- (nullable id)rawValue; + +- (nullable NSString *)stringValue; + +- (NSInteger)integerValue; + +- (double)doubleValue; + +- (nullable NSDictionary *)dictioanryValue; + +- (nullable NSArray *)arrayValue; + +- (BOOL)boolValue; + +@end + +@protocol DypayIRISEvent + +@property (nullable, nonatomic, copy) NSString * key; + +@property (nullable, nonatomic, copy) NSString * type; + +@property (readonly, nonatomic) NSTimeInterval time; + +@property (nonatomic, assign) int64_t index; + +@property (nullable, nonatomic, copy) NSNumber* dbIndex; + +@property (nullable, nonatomic, copy) NSString* logID; + +@property (nullable, nonatomic) NSDictionary * properties; + +@property (readonly) NSInteger dataLength; + +@property (nullable, readonly) NSString * sessionId; + +@property (nullable, readonly) id objectValue; + +@end + + + +@protocol DypayIRISEndpoint + +@optional + +- (id _Nullable)domainForService:(NSUInteger)service + context:(id _Nullable)context; + +- (id _Nullable)endpointForService:(NSUInteger)service + context:(id _Nullable)context; + +@end + + + + +#endif /* IRSDefines_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISDefinesPrivate.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISDefinesPrivate.h new file mode 100644 index 0000000..dda49f9 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISDefinesPrivate.h @@ -0,0 +1,99 @@ +// +// DypayIRISDefinesPrivate.h +// Pods +// +// Created by ByteDance on 2023/7/12. +// + +#ifndef DypayIRISDefinesPrivate_h +#define DypayIRISDefinesPrivate_h + +#import "DypayDataIRIS.h" +#import "DypayIRISInterfaceDefines.h" +#import "DypayDIRSContext.h" +#import "DypayDIRSLogger.h" +#import "DypayDIRSStore.h" +#import "DypayIRISMacro.h" +#import "IRSLOG.h" +#import "DypayDIRSEventBatchDispatcher.h" +#import "DypayDIRSNetworking.h" +#import "DypayDIRSIdentity.h" +#import "DypayDIRSExtension.h" +#import "DypayDIRSValue.h" +#import "DypayDIRSEvent.h" +#import "DypayDIRSTask.h" +#import "DypayDIRSBasicFeatureOptions.h" +#import "DypayDIRSRequestParameters.h" + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISSentryOptionsAppendCachedEventsKey; +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISSentryOptionsAggregatedKey; +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISSentryOptionsAggregationConfigurationKey; +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISSentryOptionsAggregationDimsKey; + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISEnviromentEventRegionKey; + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISBatchOptionsEnforceKey; + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISBatchOptionsEventStainedKey; + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISBatchOptionsConcurrentModeKey; + + +//append current cached events count + + + +@interface DypayDIRSComplianceConfiguration (Private) + +@property (nullable, nonatomic, weak) DypayDIRSConfig *base; + +@end + +@interface DypayDIRSEventConfiguration (Private) + +@property (nullable, nonatomic, weak) DypayDIRSConfig *base; + +@end + +@interface DypayDIRSContext (Private) + +@property (nullable, nonatomic, weak) DypayDIRSLogger *logger; + +@property (nullable, nonatomic, weak) id tracker; + +@property (nullable, nonatomic, weak) id listener; + +@property (nullable, nonatomic, weak) id sentry; + +@property (nullable, nonatomic, weak) DypayDIRSIdentity *identity; +@property (nullable, nonatomic, weak) DypayDIRSEventBatchDispatcher* dispatcher; +@property (nullable, nonatomic, weak) DypayDIRSStore *store; +@property (nullable, nonatomic, weak) DypayDIRSNetworking *networking; +@property (nullable, nonatomic, weak) DypayDIRSBasicFeatureOptions *basicFeatureOptions; + +@property (nullable, nonatomic, weak) id samplingModule; + +@end + + +@interface DypayDIRSTracker (Private) + +- (nonnull DypayDIRSContext *)context; + +@end + + +@interface DypayDIRSConfig (Private) + +- (BOOL)registerModule:(nullable Class)moduleClass; +- (void)unregisterModule:(nullable Class)moduleClass; +- (nonnull NSArray> *)registeredModules; + +- (void)disableModule:(nonnull NSString *)moduleId; +- (nonnull NSArray *)disabledModuleIds; + +- (nullable NSString *)uniqueKey; + +@end + +#endif /* DypayIRISDefinesPrivate_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISInterfaceDefines.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISInterfaceDefines.h new file mode 100644 index 0000000..5e16d8f --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISInterfaceDefines.h @@ -0,0 +1,556 @@ +// +// IRSInterfaceDefines.h +// Pods +// +// Created by ByteDance on 2023/7/11. +// + +#ifndef IRSInterfaceDefines_h +#define IRSInterfaceDefines_h + +#import "DypayIRISDefines.h" + + + + + + + + +@class DypayDIRSContext,DypayDIRSValue; + +#define DypayIRIS_MODULE_PRIORITY_HIGH 99 + +#define DypayIRIS_MODULE_PRIORITY_DEFAULT 50 + +#define DypayIRIS_MODULE_PRIORITY_LOW 0 + +#define DypayIRIS_MODULE_PRIORITY_CONFIG DypayIRIS_MODULE_PRIORITY_HIGH + 1 + +#define DypayIRIS_MODULE_PRIORITY_EVENT (DypayIRIS_MODULE_PRIORITY_DEFAULT + 1) + + +typedef NS_ENUM(NSInteger, DypayIRISState) { + DypayIRISStateDefault = 0, + DypayIRISStateRunning, + DypayIRISStateSuspending +}; + +typedef NS_ENUM(NSInteger, DypayIRISPriority) { + DypayIRISPriorityRealtime = (-99), + DypayIRISPriorityDefault = 0, + +}; + + +typedef NS_ENUM(NSInteger, DypayIRISBatchTrigger) { + DypayIRISBatchTriggerTimer = 1 << 0, //1 + DypayIRISBatchTriggerEnterBackground = 1 << 1, //2 + DypayIRISBatchTriggerRealtime = 1 << 2, //4 + DypayIRISBatchTriggerLaunch = 1 << 3, //8 + DypayIRISBatchTriggerFlush = 1 << 4, //16 +}; + +typedef NS_ENUM(NSInteger, DypayIRISEventPackResult) { + DypayIRISEventPackResultAvalible = 0, + DypayIRISEventPackResultFull = 1, + DypayIRISEventPackResultInvalid = 2 +}; + + + + +@class DypayDIRSConfig; + +@protocol DypayIRISModule + ++ (nonnull NSString *)moduleId; + ++ (nonnull NSString *)moduleVersion; + ++ (BOOL)isPlugin; + ++ (NSInteger)priority; + +@property BOOL isEnabled; +@property DypayIRISState state; +@property (nullable, readonly) DypayDIRSContext *context; + +@property (nullable, nonatomic, copy) NSString* category; + +- (instancetype _Nonnull )initWithContext:(DypayDIRSContext * _Nonnull)context; + +- (nullable dispatch_queue_t)executionQueue; + +- (void)commonInit; + +- (void)resume; + +- (void)suspend; + +@optional + ++ (nonnull NSArray *)moduleDependencies; + +- (void)waitUtilDone; + + +@end + +@protocol DypayIRISModuleGlobal + +@required ++ (nonnull instancetype)sharedInstance; + +@end + + +@protocol DypayIRISApplicationObserver + +@optional + +- (void)onApplicationDidFinishLaunching; + +- (void)onApplicationDidBecomeActive; + +- (void)onApplicationWillEnterForeground; + +- (void)onApplicationWillResignActive; + +- (void)onApplicationDidEnterBackground; + +- (void)onApplicationWillTerminate; + +- (void)onApplicationDidReceiveMemoryWarning; + +@end + +@protocol DypayIRISContextObserver + +@optional + +- (void)onFinishInitialization:(nonnull DypayDIRSContext *)context; + +- (void)onFinishLaunching:(nonnull DypayDIRSContext *)context; + +@end + + +@protocol DypayIRISIdentifierObserver + +@optional +- (void)onDeviceIdentifiersChanged:(nonnull NSDictionary *)change; + +- (void)onUserIdentifiersChanged:(nonnull NSDictionary *)change; + +- (void)onIdentifierAvailable; + +@end + +@protocol DypayIRISSessionObserver + +@optional +- (void)onSessionLaunch:(nonnull NSString *)sessionId; + +- (void)onSessionTerminate:(nonnull NSString *)sessionId; + +@end + + +@protocol DypayIRISEventSerializer + +- (nullable NSData *)dataWithEvent:(nullable id)event options:(nullable id)opt error:(NSError * _Nullable * _Nullable)error; + +- (nullable id)eventWithData:(nullable NSData *)data options:(nullable id)opt error:(NSError * _Nullable * _Nullable)error; + +- (nullable id)eventWithDictionary:(nullable NSDictionary *)dict options:(nullable id)opt error:(NSError * _Nullable * _Nullable)error; + +- (NSUInteger)encodingType; + ++ (nullable NSArray *)allowedParameterFields; + + +@end + + +@protocol DypayIRISEventStore + +- (void)addEvent:(id _Nonnull )event; + +- (void)removeEvents:(id _Nullable )batchOpts; + +- (void)queryEvents:(id _Nullable)batchOpts + usingBlock:(nonnull void (^)(BOOL finish, id _Nullable event , BOOL * _Nonnull stop))block; + +@property (nullable, nonatomic, weak) id serializer; + +@optional + +- (BOOL)startWithPath:(nonnull NSString *)path; + +- (void)reset; + +- (nullable id)executeStatement:(nonnull NSString *)sql; + +@end + + + +@protocol DypayIRISTracker + +@required + +@property (nullable, readonly) id store; + +- (void)setEnviromentVar:(nonnull id)val forKey:(nonnull NSString *)key; + +- (nullable id)enviromentVarForKey:(nonnull NSString *)key; + +- (void)trackEvent:(id _Nonnull)event; + +- (void)addGlobalProperties:(NSDictionary *_Nonnull)properties; + +- (void)removeGlobalPropertieKeys:(NSArray *_Nonnull)keys; + +- (void)removeAllEvents; + +@optional + + +- (void)addCommonParameters:(NSDictionary *_Nonnull)parameters; + +- (void)configureUsingBlock:(nonnull dispatch_block_t)block; + +@end + + + +@protocol DypayIRISEventProcedureHandler + +- (BOOL)handleProcedure:(id _Nonnull)event + withError:(NSError * _Nullable __autoreleasing *_Nullable)error; + +@end + +@protocol DypayIRISEventPreProcedureHandler + +- (BOOL)prehandleProcedure:(id _Nonnull)event + withError:(NSError * _Nullable __autoreleasing *_Nullable)error; + +@end + + +@protocol DypayIRISEventListener + +- (void)notifyEventsAccepted:(nonnull NSArray *)events + withOptions:(nullable id)opt; + +- (void)notifyEventsStored:(nonnull NSArray *)events + withOptions:(nullable id)opt;; + +- (void)notifyEventsDropped:(nonnull NSArray *)events + withOptions:(nullable id)opt + withError:(NSError *_Nullable)error; + +- (void)notifyEventsUploaded:(nonnull NSArray *)events + withOptions:(nullable id)opt; + +@end + + +@protocol DypayIRISEventObserver + +@optional + +- (void)onEventAccepted:(id _Nonnull)evt; + +- (void)onEventStored:(id _Nonnull)evt; + +- (void)onEventDropped:(id _Nonnull)evt withError:(NSError *_Nullable)error; + +- (void)onEventUploaded:(id _Nonnull)evt; + +@end + + + + +@protocol DypayIRISEventPacker + +@property (nonatomic, assign) NSUInteger maxPackLength; +@property (nonatomic, assign) NSUInteger maxEventCount; + +@property (nonatomic, assign) DypayIRISEventPacketStrategy strategy; + +- (DypayIRISEventPackResult)appendEvent:(nullable id)event; + +- (nonnull NSData *)serializedData; + +- (nonnull id)objectValue; + +- (nonnull NSArray *)eventIDs; + +- (nonnull NSArray> *)packetEvents; + +@optional + +- (void)appendCommonParameters:(nullable NSDictionary *)parameters; + +- (void)appendFeatureParameters:(nullable NSDictionary *)features; + +- (void)appendFeatureOptions:(nullable NSDictionary *)options; + +@end + +@protocol DypayIRISThrottlter + +- (void)configure:(nullable id)strategy; + +- (BOOL)allowed:(nullable id)options + reason:(NSError * _Nullable __autoreleasing *_Nullable)reason; + +- (void)setBasicInterval:(NSTimeInterval)interval; +- (NSTimeInterval)adjustedInterval; + +- (void)adjust:(nonnull id)result; + +@end + + + + +@protocol DypayIRISURLHandler + +- (BOOL)handleURL:(NSURL *_Nonnull)url; + +@end + + +@protocol DypayIRISDataCoder + +- (nonnull NSString *)algorithm; + +@optional + +- (nullable NSDictionary *)requiredHTTPHeaderFields; + +- (nullable NSDictionary *)requiredParameters; + + +- (nullable NSData *)encodedData:(NSData *_Nonnull)input + options:(nullable id)options + error:(NSError * _Nullable * _Nullable)error; + +- (nullable NSData *)decodedData:(nonnull NSData *)input + options:(nullable id)options + error:(NSError * _Nullable * _Nullable)error; + +- (uint64_t)hashUsingData:(nonnull id)input; + +- (void)setOptions:(nullable NSDictionary *)options; + + + +@end + + +@protocol DypayIRISTimer + +@required + +@property NSTimeInterval tickTime; + +- (NSTimeInterval)timerInterval; + +- (void)onTimerTick; + +@end + +@protocol DypayIRISLogger + +- (void)addLog:(nonnull id)log; + +@end + + + +@protocol DypayIRISErrorHandler + +@required +- (void)onError:(NSError *_Nonnull)error; + +@end + +@protocol DypayIRISStore + +- (nullable id)objectForKey:(NSString * _Nonnull)key; + +- (BOOL)setObject:(id _Nonnull)object + forKey:(NSString * _Nonnull)key; + +- (BOOL)removeObjectForKey:(NSString * _Nonnull)key; + +@end + + + +@protocol DypayIRISNetworkRequestOptions + +@property (nonatomic, assign) NSUInteger attempts; + +@property (nonatomic, assign) NSTimeInterval timeout; + +@property (nullable, nonatomic, strong) NSArray* compressors; + +@property (nullable, nonatomic, weak) id encryptor; + +@property (nullable, nonatomic, weak) id decryptor; + +@property (nullable, nonatomic) NSDictionary *userInfo; + +@end + + +@protocol DypayIRISNetworkProvider + +- (void)request:(nonnull NSString *)HTTPUrl + method:(nonnull NSString *)HTTPMethod + headerFields:(nonnull NSDictionary *)headerFields + body:(nullable id)body + options:(nullable id)options + completion:(nonnull void (^)(id _Nullable data, id _Nullable response, NSError * _Nullable error))completion; + +@end + + +@protocol DypayIRISServiceSchema + +- (BOOL)resultWithResponse:(nullable id)object; + +- (id _Nullable)responseObjectWithData:(nonnull NSData *)data; + +/* + * should start with '/' + */ +- (NSString *_Nonnull)HTTPPath; + +/* + * GET/POST/PUT... + */ +- (NSString * _Nonnull)HTTPMethod; + +- (nullable id)HTTPBody:(nonnull DypayDIRSContext *)context + options:(nullable id)options; + +- (NSUInteger)serviceType; + +@optional + +- (NSDictionary * _Nullable)HTTPHeaderFields; + +- (nullable NSString *)getLogID:(nonnull NSHTTPURLResponse *)response; + +- (NSString * _Nullable)enchantURL:(NSString * _Nonnull)url; + +- (nullable id)HTTPBodyPacker:(nonnull DypayDIRSContext *)context; + +@end + + + + + + +@protocol DypayIRISEventUploadExecutor + +@property (nonatomic, assign) NSTimeInterval interval; + +@property (nullable, nonatomic, weak) id serializer; + +@property (nullable, nonatomic) NSArray> *compressors; + +@property (nullable, nonatomic, weak) id encryptor; + +@property (nullable, nonatomic, weak) id decryptor; + +@property (nullable, nonatomic, weak) id eventStore; + +@property (nullable, nonatomic) id throttlter; + +@property (nonatomic, assign) DypayIRISPriority priority; + +@property (nonatomic, assign) DypayIRISState execState; + +@property (nullable, nonatomic) NSDictionary *options; + +- (void)executeUpload:(DypayIRISBatchTrigger)trigger; + +- (void)executeUpload:(DypayIRISBatchTrigger)trigger + options:(nullable NSDictionary *)options; + + +@end + + + +@protocol DypayIRISEventRealtimeHandler + +- (void)onRealtimeEventRecieved; + +@end + + +@protocol DypayIRISParameterHandler + +@optional + +- (nullable NSArray *)supportedParameterKeys; + +- (nullable id)parameterForKey:(nonnull NSString *)key; + +- (NSDictionary * _Nullable)exportParameters:(nullable NSArray *)required; + +- (NSDictionary * _Nullable)exportFeatureParameters; + +- (NSDictionary * _Nullable)exportFeatureOptions; + +@end + + + +@protocol DypayIRISConfigurationHandler + +@property (nullable, readonly) DypayDIRSValue *config; + +@optional +- (void)restore; + +@end + + + +@protocol DypayIRISConfigurationObserver + +@optional +- (void)onRemoteSettingsDidUpdate:(nonnull DypayDIRSValue *)config; + +- (void)onRealtimeSettingsDidUpdate:(nonnull DypayDIRSValue *)config; + +@end + + + +@protocol DypayIRISSentry + +//default schema +- (void)monitoring:(nonnull NSString *)key + dimensions:(nullable NSDictionary *)dimensions + options:(nullable NSDictionary *)options; + + +@end + + + + +#endif /* IRSInterfaceDefines_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISMacro.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISMacro.h new file mode 100644 index 0000000..a7f7fcb --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayIRISMacro.h @@ -0,0 +1,136 @@ +// +// DypayIRISMacro.h +// Pods +// +// Created by ByteDance on 2023/7/11. +// + +#ifndef DypayIRISMacro_h +#define DypayIRISMacro_h + +#include "metamacros.h" + + + +#define DypayIRIS_CONCAT(A, B) A##B + +#define DypayIRIS_EXPORT_MODULE(module_id, module_version) \ ++ (NSString *)moduleId { return module_id; } \ ++ (NSString *)moduleVersion { return module_version; } + +#define DypayIRIS_EXPORT_PLUGIN(module_id, module_version) \ ++ (NSString *)moduleId { return module_id; } \ ++ (NSString *)moduleVersion { return module_version; } \ ++ (BOOL)isPlugin { return YES; } + +#define DypayIRIS_EXPORT_PARAMETER(field, returnType) \ +- (returnType)DypayIRIS_CONCAT(__datairis_parameter__, field) + + + +/* + * Define SharedInstance Implementation + * + * SHARED_INSTANCE_IMPL(sharedManager) + * Equals + * + (instancetype)sharedManager {...} + */ +#undef EXPORT_SHARED_INSTANCE +#define EXPORT_SHARED_INSTANCE(sharedInstanceMethod) \ ++ (instancetype)sharedInstanceMethod \ +{ \ +static dispatch_once_t once; \ +static id __singleton__; \ +dispatch_once( &once, ^{ \ + __singleton__ = [[self alloc] init]; \ + if ([__singleton__ respondsToSelector:@selector(commonInit)]) { \ + [__singleton__ performSelector:@selector(commonInit)]; \ +}\ +}); \ +return __singleton__; \ +} \ + +/* + * Usage paired @weakify(self) & @strongify(self) + */ +#ifndef weakify +#if DEBUG +#if __has_feature(objc_arc) +#define weakify(object) autoreleasepool{} __weak __typeof__(object) weak##_##object = object; +#else +#define weakify(object) autoreleasepool{} __block __typeof__(object) block##_##object = object; +#endif +#else +#if __has_feature(objc_arc) +#define weakify(object) try{} @finally{} {} __weak __typeof__(object) weak##_##object = object; +#else +#define weakify(object) try{} @finally{} {} __block __typeof__(object) block##_##object = object; +#endif +#endif +#endif + +#ifndef strongify +#if DEBUG +#if __has_feature(objc_arc) +#define strongify(object) autoreleasepool{} __typeof__(object) object = weak##_##object; +#else +#define strongify(object) autoreleasepool{} __typeof__(object) object = block##_##object; +#endif +#else +#if __has_feature(objc_arc) +#define strongify(object) try{} @finally{} __typeof__(object) object = weak##_##object; +#else +#define strongify(object) try{} @finally{} __typeof__(object) object = block##_##object; +#endif +#endif +#endif + + + +#ifndef DypayIRIS_keywordify + +#if DEBUG +#define DypayIRIS_keywordify autoreleasepool {} +#else +#define DypayIRIS_keywordify try {} @catch (...) {} +#endif + +#endif + +/* + * + * @onExit { + //code + } + */ +#ifndef onExit +#define onExit \ +DypayIRIS_keywordify \ +__strong datairis_cleanup_t metamacro_concat(macro_exitBlock_, __LINE__) __attribute__((cleanup(datairis_executeCleanupBlock), unused)) = ^ + +typedef void (^datairis_cleanup_t)(void); +static inline void datairis_executeCleanupBlock (__strong datairis_cleanup_t *block) { + (*block)(); +} +#endif + + +/* + * { + * @lock_guard(lock) + * //mutex excution + * } + */ +#ifndef lock_guard +#define lock_guard(l) \ +DypayIRIS_keywordify \ +[l lock]; \ +@onExit { \ + [l unlock]; \ +}; +#endif + + + + +#endif /* DypayIRISMacro_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypaySDK-umbrella.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypaySDK-umbrella.h new file mode 100644 index 0000000..0852c50 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypaySDK-umbrella.h @@ -0,0 +1,74 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "DypayAPI.h" +#import "DypayDIRSApplication.h" +#import "DypayDIRSBasicFeatureOptions.h" +#import "DypayDIRSCompressionGzipPlugin.h" +#import "DypayDIRSContext.h" +#import "DypayDIRSEnviroment.h" +#import "DypayDIRSGlobalTimer.h" +#import "DypayDIRSStore.h" +#import "DypayDIRSValue.h" +#import "DypayIRISDefinesPrivate.h" +#import "DypayDIRSIdentity.h" +#import "DypayDIRSLogger.h" +#import "IRSLOG.h" +#import "DypayDIRSBasicModule.h" +#import "DypayDIRSModuleHive.h" +#import "DypayDIRSNetworking.h" +#import "DypayDIRSRequestParameters.h" +#import "DypayDataIRIS.h" +#import "DypayDIRSConfig.h" +#import "DypayDIRSEndpointConfiguration.h" +#import "DypayDIRSTracker.h" +#import "DypayDIRSConcurrentCollection.h" +#import "DypayDIRSErrorBuilder.h" +#import "DypayDIRSExtension.h" +#import "DypayDIRSMMapCache.h" +#import "DypayDIRSTask.h" +#import "DypayDIRSUtilities.h" +#import "DypayIRISInterfaceDefines.h" +#import "DypayIRISMacro.h" +#import "metamacros.h" +#import "DypayIRISDefines.h" +#import "DypayDIRSEvent.h" +#import "DypayDIRSEventBatchDispatcher.h" +#import "DypayDIRSEventBatchExecutor.h" +#import "DypayDIRSEventEntry.h" +#import "DypayDIRSEventListener.h" +#import "DypayDataIRISEvent.h" +#import "DypayDIRSEventBlockPlugin.h" +#import "DypayDIRSEventPacker.h" +#import "DypayDIRSEventRequestSchema.h" +#import "DypayDIRSEventSerializer.h" +#import "DypayDataIRISDefaultSchema.h" +#import "DIRSFMDB.h" +#import "DypayDIRSEventStore.h" +#import "DypayDIRSFMDatabase.h" +#import "DypayDIRSFMDatabaseQueue.h" +#import "DypayDIRSFMResultSet.h" +#import "DypayDIRSPreStorePlugin.h" +#import "DypayDataIRISFMDB.h" +#import "DypayDIRSEventSession.h" +#import "DypayDIRSTracker+Session.h" +#import "DypayDIRSRealtimeEventPlugin.h" +#import "DypayDIRSRemoteSettings.h" +#import "DypayDataIRISRemoteSettings.h" +#import "DypayDIRSRemoteSettingsSchema.h" +#import "DypayDIRSThrottlterPlugin.h" +#import "DypayDataIRISThrottlter.h" +#import "DypayTrackerManager.h" + +FOUNDATION_EXPORT double DypaySDKVersionNumber; +FOUNDATION_EXPORT const unsigned char DypaySDKVersionString[]; + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayTrackerManager.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayTrackerManager.h new file mode 100644 index 0000000..e0bd6c6 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/DypayTrackerManager.h @@ -0,0 +1,24 @@ +// +// DypayTrackerManager.h +// DypaySDK-CJPaySandBox +// +// Created by shanghuaijun on 2024/12/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class DypayDIRSTracker; +@interface DypayTrackerManager : NSObject + +@property (nonatomic, strong, readonly) DypayDIRSTracker *tracker; + ++ (instancetype)defaultService; + ++ (void)initConfig; + ++ (void)event:(NSString *_Nonnull)eventName params:(NSDictionary *_Nullable)params; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/IRSLOG.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/IRSLOG.h new file mode 100644 index 0000000..ca61a59 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/IRSLOG.h @@ -0,0 +1,51 @@ +// +// IRSLOG.h +// Pods +// +// Created by ByteDance on 2023/7/11. +// + +#ifndef IRSLOG_h +#define IRSLOG_h + + +#ifdef __OBJC__ + +extern void datairis_log_oc(int level, id ctx, NSString *tag, NSString *,...); +#undef LOG_MACRO +#define LOG_MACRO(flag,ctx,tag,fmt,...) \ +if (ctx && ctx.config && ctx.config.logLevel >= flag) { \ + datairis_log_oc(flag, ctx, tag, fmt, ##__VA_ARGS__); \ +} + + +#endif + +#ifdef DypayIRIS_MINIMUM_VERSION + +#define LOG_DEBUG + +#define LOG_INFO + +#define LOG_WARN + +#else + +#undef LOG_DEBUG +#define LOG_DEBUG(ctx, tag, fmt, ...) LOG_MACRO(4 ,ctx, tag, fmt, ##__VA_ARGS__) +//#define LOG_DEBUG(ctx, tag, fmt, ...) + +#undef LOG_INFO +#define LOG_INFO(ctx, tag, fmt, ...) LOG_MACRO(3 ,ctx, tag, fmt, ##__VA_ARGS__) +//#define LOG_INFO(ctx, tag, fmt, ...) + +#undef LOG_WARN +#define LOG_WARN(ctx, tag, fmt, ...) LOG_MACRO(2 ,ctx, tag, fmt, ##__VA_ARGS__) + +#endif + +#undef LOG_ERROR +#define LOG_ERROR(ctx, tag, fmt, ...) LOG_MACRO(1 ,ctx, tag, fmt, ##__VA_ARGS__) + + +#endif /* IRSLOG_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/metamacros.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/metamacros.h new file mode 100644 index 0000000..48665bc --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Headers/metamacros.h @@ -0,0 +1,669 @@ +/** + * Macros for metaprogramming + * ExtendedC + * + * Copyright (C) 2012 Justin Spahr-Summers + * Released under the MIT license + */ + +#ifndef EXTC_METAMACROS_H +#define EXTC_METAMACROS_H + + +/** + * Executes one or more expressions (which may have a void type, such as a call + * to a function that returns no value) and always returns true. + */ +#define metamacro_exprify(...) \ +((__VA_ARGS__), true) + +/** + * Returns a string representation of VALUE after full macro expansion. + */ +#define metamacro_stringify(VALUE) \ +metamacro_stringify_(VALUE) + +/** + * Returns A and B concatenated after full macro expansion. + */ +#define metamacro_concat(A, B) \ +metamacro_concat_(A, B) + +/** + * Returns the Nth variadic argument (starting from zero). At least + * N + 1 variadic arguments must be given. N must be between zero and twenty, + * inclusive. + */ +#define metamacro_at(N, ...) \ +metamacro_concat(metamacro_at, N)(__VA_ARGS__) + +/** + * Returns the number of arguments (up to twenty) provided to the macro. At + * least one argument must be provided. + * + * Inspired by P99: http://p99.gforge.inria.fr + */ +#define metamacro_argcount(...) \ +metamacro_at(20, __VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) + +/** + * Identical to #metamacro_foreach_cxt, except that no CONTEXT argument is + * given. Only the index and current argument will thus be passed to MACRO. + */ +#define metamacro_foreach(MACRO, SEP, ...) \ +metamacro_foreach_cxt(metamacro_foreach_iter, SEP, MACRO, __VA_ARGS__) + +/** + * For each consecutive variadic argument (up to twenty), MACRO is passed the + * zero-based index of the current argument, CONTEXT, and then the argument + * itself. The results of adjoining invocations of MACRO are then separated by + * SEP. + * + * Inspired by P99: http://p99.gforge.inria.fr + */ +#define metamacro_foreach_cxt(MACRO, SEP, CONTEXT, ...) \ +metamacro_concat(metamacro_foreach_cxt, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) + +/** + * Identical to #metamacro_foreach_cxt. This can be used when the former would + * fail due to recursive macro expansion. + */ +#define metamacro_foreach_cxt_recursive(MACRO, SEP, CONTEXT, ...) \ +metamacro_concat(metamacro_foreach_cxt_recursive, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) + +/** + * In consecutive order, appends each variadic argument (up to twenty) onto + * BASE. The resulting concatenations are then separated by SEP. + * + * This is primarily useful to manipulate a list of macro invocations into instead + * invoking a different, possibly related macro. + */ +#define metamacro_foreach_concat(BASE, SEP, ...) \ +metamacro_foreach_cxt(metamacro_foreach_concat_iter, SEP, BASE, __VA_ARGS__) + +/** + * Iterates COUNT times, each time invoking MACRO with the current index + * (starting at zero) and CONTEXT. The results of adjoining invocations of MACRO + * are then separated by SEP. + * + * COUNT must be an integer between zero and twenty, inclusive. + */ +#define metamacro_for_cxt(COUNT, MACRO, SEP, CONTEXT) \ +metamacro_concat(metamacro_for_cxt, COUNT)(MACRO, SEP, CONTEXT) + +/** + * Returns the first argument given. At least one argument must be provided. + * + * This is useful when implementing a variadic macro, where you may have only + * one variadic argument, but no way to retrieve it (for example, because \c ... + * always needs to match at least one argument). + * + * @code + + #define varmacro(...) \ + metamacro_head(__VA_ARGS__) + + * @endcode + */ +#define metamacro_head(...) \ +metamacro_head_(__VA_ARGS__, 0) + +/** + * Returns every argument except the first. At least two arguments must be + * provided. + */ +#define metamacro_tail(...) \ +metamacro_tail_(__VA_ARGS__) + +/** + * Returns the first N (up to twenty) variadic arguments as a new argument list. + * At least N variadic arguments must be provided. + */ +#define metamacro_take(N, ...) \ +metamacro_concat(metamacro_take, N)(__VA_ARGS__) + +/** + * Removes the first N (up to twenty) variadic arguments from the given argument + * list. At least N variadic arguments must be provided. + */ +#define metamacro_drop(N, ...) \ +metamacro_concat(metamacro_drop, N)(__VA_ARGS__) + +/** + * Decrements VAL, which must be a number between zero and twenty, inclusive. + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_dec(VAL) \ +metamacro_at(VAL, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) + +/** + * Increments VAL, which must be a number between zero and twenty, inclusive. + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_inc(VAL) \ +metamacro_at(VAL, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) + +/** + * If A is equal to B, the next argument list is expanded; otherwise, the + * argument list after that is expanded. A and B must be numbers between zero + * and twenty, inclusive. Additionally, B must be greater than or equal to A. + * + * @code + + // expands to true + metamacro_if_eq(0, 0)(true)(false) + + // expands to false + metamacro_if_eq(0, 1)(true)(false) + + * @endcode + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_if_eq(A, B) \ +metamacro_concat(metamacro_if_eq, A)(B) + +/** + * Identical to #metamacro_if_eq. This can be used when the former would fail + * due to recursive macro expansion. + */ +#define metamacro_if_eq_recursive(A, B) \ +metamacro_concat(metamacro_if_eq_recursive, A)(B) + +/** + * Returns 1 if N is an even number, or 0 otherwise. N must be between zero and + * twenty, inclusive. + * + * For the purposes of this test, zero is considered even. + */ +#define metamacro_is_even(N) \ +metamacro_at(N, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1) + +/** + * Returns the logical NOT of B, which must be the number zero or one. + */ +#define metamacro_not(B) \ +metamacro_at(B, 1, 0) + +// IMPLEMENTATION DETAILS FOLLOW! +// Do not write code that depends on anything below this line. +#define metamacro_stringify_(VALUE) # VALUE +#define metamacro_concat_(A, B) A ## B +#define metamacro_foreach_iter(INDEX, MACRO, ARG) MACRO(INDEX, ARG) +#define metamacro_head_(FIRST, ...) FIRST +#define metamacro_tail_(FIRST, ...) __VA_ARGS__ +#define metamacro_consume_(...) +#define metamacro_expand_(...) __VA_ARGS__ + +// implemented from scratch so that metamacro_concat() doesn't end up nesting +#define metamacro_foreach_concat_iter(INDEX, BASE, ARG) metamacro_foreach_concat_iter_(BASE, ARG) +#define metamacro_foreach_concat_iter_(BASE, ARG) BASE ## ARG + +// metamacro_at expansions +#define metamacro_at0(...) metamacro_head(__VA_ARGS__) +#define metamacro_at1(_0, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at2(_0, _1, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at3(_0, _1, _2, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at4(_0, _1, _2, _3, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at5(_0, _1, _2, _3, _4, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at6(_0, _1, _2, _3, _4, _5, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at7(_0, _1, _2, _3, _4, _5, _6, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at8(_0, _1, _2, _3, _4, _5, _6, _7, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at9(_0, _1, _2, _3, _4, _5, _6, _7, _8, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at10(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at11(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at12(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at13(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at14(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at15(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at17(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at18(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at19(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at20(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, ...) metamacro_head(__VA_ARGS__) + +// metamacro_foreach_cxt expansions +#define metamacro_foreach_cxt0(MACRO, SEP, CONTEXT) +#define metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) + +#define metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ +metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) \ +SEP \ +MACRO(1, CONTEXT, _1) + +#define metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ +metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ +SEP \ +MACRO(2, CONTEXT, _2) + +#define metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ +metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ +SEP \ +MACRO(3, CONTEXT, _3) + +#define metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ +metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ +SEP \ +MACRO(4, CONTEXT, _4) + +#define metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ +metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ +SEP \ +MACRO(5, CONTEXT, _5) + +#define metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ +metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ +SEP \ +MACRO(6, CONTEXT, _6) + +#define metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ +metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ +SEP \ +MACRO(7, CONTEXT, _7) + +#define metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ +metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ +SEP \ +MACRO(8, CONTEXT, _8) + +#define metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ +metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ +SEP \ +MACRO(9, CONTEXT, _9) + +#define metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ +metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ +SEP \ +MACRO(10, CONTEXT, _10) + +#define metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ +metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ +SEP \ +MACRO(11, CONTEXT, _11) + +#define metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ +metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ +SEP \ +MACRO(12, CONTEXT, _12) + +#define metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ +metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ +SEP \ +MACRO(13, CONTEXT, _13) + +#define metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ +metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ +SEP \ +MACRO(14, CONTEXT, _14) + +#define metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ +metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ +SEP \ +MACRO(15, CONTEXT, _15) + +#define metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ +metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ +SEP \ +MACRO(16, CONTEXT, _16) + +#define metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ +metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ +SEP \ +MACRO(17, CONTEXT, _17) + +#define metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ +metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ +SEP \ +MACRO(18, CONTEXT, _18) + +#define metamacro_foreach_cxt20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ +metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ +SEP \ +MACRO(19, CONTEXT, _19) + +// metamacro_foreach_cxt_recursive expansions +#define metamacro_foreach_cxt_recursive0(MACRO, SEP, CONTEXT) +#define metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) + +#define metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ +metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) \ +SEP \ +MACRO(1, CONTEXT, _1) + +#define metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ +metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ +SEP \ +MACRO(2, CONTEXT, _2) + +#define metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ +metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ +SEP \ +MACRO(3, CONTEXT, _3) + +#define metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ +metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ +SEP \ +MACRO(4, CONTEXT, _4) + +#define metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ +metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ +SEP \ +MACRO(5, CONTEXT, _5) + +#define metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ +metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ +SEP \ +MACRO(6, CONTEXT, _6) + +#define metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ +metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ +SEP \ +MACRO(7, CONTEXT, _7) + +#define metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ +metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ +SEP \ +MACRO(8, CONTEXT, _8) + +#define metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ +metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ +SEP \ +MACRO(9, CONTEXT, _9) + +#define metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ +metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ +SEP \ +MACRO(10, CONTEXT, _10) + +#define metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ +metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ +SEP \ +MACRO(11, CONTEXT, _11) + +#define metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ +metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ +SEP \ +MACRO(12, CONTEXT, _12) + +#define metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ +metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ +SEP \ +MACRO(13, CONTEXT, _13) + +#define metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ +metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ +SEP \ +MACRO(14, CONTEXT, _14) + +#define metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ +metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ +SEP \ +MACRO(15, CONTEXT, _15) + +#define metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ +metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ +SEP \ +MACRO(16, CONTEXT, _16) + +#define metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ +metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ +SEP \ +MACRO(17, CONTEXT, _17) + +#define metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ +metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ +SEP \ +MACRO(18, CONTEXT, _18) + +#define metamacro_foreach_cxt_recursive20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ +metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ +SEP \ +MACRO(19, CONTEXT, _19) + +// metamacro_for_cxt expansions +#define metamacro_for_cxt0(MACRO, SEP, CONTEXT) +#define metamacro_for_cxt1(MACRO, SEP, CONTEXT) MACRO(0, CONTEXT) + +#define metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt1(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(1, CONTEXT) + +#define metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(2, CONTEXT) + +#define metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(3, CONTEXT) + +#define metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(4, CONTEXT) + +#define metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(5, CONTEXT) + +#define metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(6, CONTEXT) + +#define metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(7, CONTEXT) + +#define metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(8, CONTEXT) + +#define metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(9, CONTEXT) + +#define metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(10, CONTEXT) + +#define metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(11, CONTEXT) + +#define metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(12, CONTEXT) + +#define metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(13, CONTEXT) + +#define metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(14, CONTEXT) + +#define metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(15, CONTEXT) + +#define metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(16, CONTEXT) + +#define metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(17, CONTEXT) + +#define metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(18, CONTEXT) + +#define metamacro_for_cxt20(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(19, CONTEXT) + +// metamacro_if_eq expansions +#define metamacro_if_eq0(VALUE) \ +metamacro_concat(metamacro_if_eq0_, VALUE) + +#define metamacro_if_eq0_0(...) __VA_ARGS__ metamacro_consume_ +#define metamacro_if_eq0_1(...) metamacro_expand_ +#define metamacro_if_eq0_2(...) metamacro_expand_ +#define metamacro_if_eq0_3(...) metamacro_expand_ +#define metamacro_if_eq0_4(...) metamacro_expand_ +#define metamacro_if_eq0_5(...) metamacro_expand_ +#define metamacro_if_eq0_6(...) metamacro_expand_ +#define metamacro_if_eq0_7(...) metamacro_expand_ +#define metamacro_if_eq0_8(...) metamacro_expand_ +#define metamacro_if_eq0_9(...) metamacro_expand_ +#define metamacro_if_eq0_10(...) metamacro_expand_ +#define metamacro_if_eq0_11(...) metamacro_expand_ +#define metamacro_if_eq0_12(...) metamacro_expand_ +#define metamacro_if_eq0_13(...) metamacro_expand_ +#define metamacro_if_eq0_14(...) metamacro_expand_ +#define metamacro_if_eq0_15(...) metamacro_expand_ +#define metamacro_if_eq0_16(...) metamacro_expand_ +#define metamacro_if_eq0_17(...) metamacro_expand_ +#define metamacro_if_eq0_18(...) metamacro_expand_ +#define metamacro_if_eq0_19(...) metamacro_expand_ +#define metamacro_if_eq0_20(...) metamacro_expand_ + +#define metamacro_if_eq1(VALUE) metamacro_if_eq0(metamacro_dec(VALUE)) +#define metamacro_if_eq2(VALUE) metamacro_if_eq1(metamacro_dec(VALUE)) +#define metamacro_if_eq3(VALUE) metamacro_if_eq2(metamacro_dec(VALUE)) +#define metamacro_if_eq4(VALUE) metamacro_if_eq3(metamacro_dec(VALUE)) +#define metamacro_if_eq5(VALUE) metamacro_if_eq4(metamacro_dec(VALUE)) +#define metamacro_if_eq6(VALUE) metamacro_if_eq5(metamacro_dec(VALUE)) +#define metamacro_if_eq7(VALUE) metamacro_if_eq6(metamacro_dec(VALUE)) +#define metamacro_if_eq8(VALUE) metamacro_if_eq7(metamacro_dec(VALUE)) +#define metamacro_if_eq9(VALUE) metamacro_if_eq8(metamacro_dec(VALUE)) +#define metamacro_if_eq10(VALUE) metamacro_if_eq9(metamacro_dec(VALUE)) +#define metamacro_if_eq11(VALUE) metamacro_if_eq10(metamacro_dec(VALUE)) +#define metamacro_if_eq12(VALUE) metamacro_if_eq11(metamacro_dec(VALUE)) +#define metamacro_if_eq13(VALUE) metamacro_if_eq12(metamacro_dec(VALUE)) +#define metamacro_if_eq14(VALUE) metamacro_if_eq13(metamacro_dec(VALUE)) +#define metamacro_if_eq15(VALUE) metamacro_if_eq14(metamacro_dec(VALUE)) +#define metamacro_if_eq16(VALUE) metamacro_if_eq15(metamacro_dec(VALUE)) +#define metamacro_if_eq17(VALUE) metamacro_if_eq16(metamacro_dec(VALUE)) +#define metamacro_if_eq18(VALUE) metamacro_if_eq17(metamacro_dec(VALUE)) +#define metamacro_if_eq19(VALUE) metamacro_if_eq18(metamacro_dec(VALUE)) +#define metamacro_if_eq20(VALUE) metamacro_if_eq19(metamacro_dec(VALUE)) + +// metamacro_if_eq_recursive expansions +#define metamacro_if_eq_recursive0(VALUE) \ +metamacro_concat(metamacro_if_eq_recursive0_, VALUE) + +#define metamacro_if_eq_recursive0_0(...) __VA_ARGS__ metamacro_consume_ +#define metamacro_if_eq_recursive0_1(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_2(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_3(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_4(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_5(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_6(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_7(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_8(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_9(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_10(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_11(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_12(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_13(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_14(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_15(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_16(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_17(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_18(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_19(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_20(...) metamacro_expand_ + +#define metamacro_if_eq_recursive1(VALUE) metamacro_if_eq_recursive0(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive2(VALUE) metamacro_if_eq_recursive1(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive3(VALUE) metamacro_if_eq_recursive2(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive4(VALUE) metamacro_if_eq_recursive3(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive5(VALUE) metamacro_if_eq_recursive4(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive6(VALUE) metamacro_if_eq_recursive5(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive7(VALUE) metamacro_if_eq_recursive6(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive8(VALUE) metamacro_if_eq_recursive7(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive9(VALUE) metamacro_if_eq_recursive8(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive10(VALUE) metamacro_if_eq_recursive9(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive11(VALUE) metamacro_if_eq_recursive10(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive12(VALUE) metamacro_if_eq_recursive11(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive13(VALUE) metamacro_if_eq_recursive12(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive14(VALUE) metamacro_if_eq_recursive13(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive15(VALUE) metamacro_if_eq_recursive14(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive16(VALUE) metamacro_if_eq_recursive15(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive17(VALUE) metamacro_if_eq_recursive16(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive18(VALUE) metamacro_if_eq_recursive17(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive19(VALUE) metamacro_if_eq_recursive18(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive20(VALUE) metamacro_if_eq_recursive19(metamacro_dec(VALUE)) + +// metamacro_take expansions +#define metamacro_take0(...) +#define metamacro_take1(...) metamacro_head(__VA_ARGS__) +#define metamacro_take2(...) metamacro_head(__VA_ARGS__), metamacro_take1(metamacro_tail(__VA_ARGS__)) +#define metamacro_take3(...) metamacro_head(__VA_ARGS__), metamacro_take2(metamacro_tail(__VA_ARGS__)) +#define metamacro_take4(...) metamacro_head(__VA_ARGS__), metamacro_take3(metamacro_tail(__VA_ARGS__)) +#define metamacro_take5(...) metamacro_head(__VA_ARGS__), metamacro_take4(metamacro_tail(__VA_ARGS__)) +#define metamacro_take6(...) metamacro_head(__VA_ARGS__), metamacro_take5(metamacro_tail(__VA_ARGS__)) +#define metamacro_take7(...) metamacro_head(__VA_ARGS__), metamacro_take6(metamacro_tail(__VA_ARGS__)) +#define metamacro_take8(...) metamacro_head(__VA_ARGS__), metamacro_take7(metamacro_tail(__VA_ARGS__)) +#define metamacro_take9(...) metamacro_head(__VA_ARGS__), metamacro_take8(metamacro_tail(__VA_ARGS__)) +#define metamacro_take10(...) metamacro_head(__VA_ARGS__), metamacro_take9(metamacro_tail(__VA_ARGS__)) +#define metamacro_take11(...) metamacro_head(__VA_ARGS__), metamacro_take10(metamacro_tail(__VA_ARGS__)) +#define metamacro_take12(...) metamacro_head(__VA_ARGS__), metamacro_take11(metamacro_tail(__VA_ARGS__)) +#define metamacro_take13(...) metamacro_head(__VA_ARGS__), metamacro_take12(metamacro_tail(__VA_ARGS__)) +#define metamacro_take14(...) metamacro_head(__VA_ARGS__), metamacro_take13(metamacro_tail(__VA_ARGS__)) +#define metamacro_take15(...) metamacro_head(__VA_ARGS__), metamacro_take14(metamacro_tail(__VA_ARGS__)) +#define metamacro_take16(...) metamacro_head(__VA_ARGS__), metamacro_take15(metamacro_tail(__VA_ARGS__)) +#define metamacro_take17(...) metamacro_head(__VA_ARGS__), metamacro_take16(metamacro_tail(__VA_ARGS__)) +#define metamacro_take18(...) metamacro_head(__VA_ARGS__), metamacro_take17(metamacro_tail(__VA_ARGS__)) +#define metamacro_take19(...) metamacro_head(__VA_ARGS__), metamacro_take18(metamacro_tail(__VA_ARGS__)) +#define metamacro_take20(...) metamacro_head(__VA_ARGS__), metamacro_take19(metamacro_tail(__VA_ARGS__)) + +// metamacro_drop expansions +#define metamacro_drop0(...) __VA_ARGS__ +#define metamacro_drop1(...) metamacro_tail(__VA_ARGS__) +#define metamacro_drop2(...) metamacro_drop1(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop3(...) metamacro_drop2(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop4(...) metamacro_drop3(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop5(...) metamacro_drop4(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop6(...) metamacro_drop5(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop7(...) metamacro_drop6(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop8(...) metamacro_drop7(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop9(...) metamacro_drop8(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop10(...) metamacro_drop9(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop11(...) metamacro_drop10(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop12(...) metamacro_drop11(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop13(...) metamacro_drop12(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop14(...) metamacro_drop13(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop15(...) metamacro_drop14(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop16(...) metamacro_drop15(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop17(...) metamacro_drop16(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop18(...) metamacro_drop17(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop19(...) metamacro_drop18(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop20(...) metamacro_drop19(metamacro_tail(__VA_ARGS__)) + +#endif + + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Info.plist b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Info.plist new file mode 100644 index 0000000..14f9bcd Binary files /dev/null and b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Info.plist differ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Modules/module.modulemap b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Modules/module.modulemap new file mode 100644 index 0000000..9e1332b --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64/DypaySDK.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module DypaySDK { + umbrella header "DypaySDK-umbrella.h" + + export * + module * { export * } +} diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/DypaySDK b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/DypaySDK new file mode 100644 index 0000000..d1055f0 Binary files /dev/null and b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/DypaySDK differ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DIRSFMDB.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DIRSFMDB.h new file mode 100644 index 0000000..7a841fd --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DIRSFMDB.h @@ -0,0 +1,4 @@ +#import +#import "DypayDIRSFMDatabase.h" +#import "DypayDIRSFMResultSet.h" +#import "DypayDIRSFMDatabaseQueue.h" diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayAPI.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayAPI.h new file mode 100644 index 0000000..d1292b6 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayAPI.h @@ -0,0 +1,149 @@ +// +// DypayAPI.h +// DypaySDK +// +// Created by xutianxi on 2021/12/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, DypayErrorCode) { + DypayErrorCodeSuccess = 0, // 成功 + DypayErrorCodeCancel = 1, // 用户取消 + DypayErrorCodeFail = 2, // 失败 + DypayErrorCodeProcessing = 3, // 支付结果处理中 + DypayErrorCodeVersionTooLow = 100, // 抖音版本过低,需要用户升级 +}; + +typedef NS_ENUM(NSInteger, DypayLogLevel) { + DypayLogLevelOff = 0, + DypayLogLevelError = 1, + DypayLogLevelWarn = 2, + DypayLogLevelInfo = 3, + DypayLogLevelDebug = 4, +}; + +#define DYPAYSDK_TAG @"DypaySDK" + +#define DYPAY_RECALL_API_MAX_TIME 3000 //毫秒级 +#define SHARED_SELF DypayAPI.sharedDypayAPI + +@interface DypayAPI : NSObject + +// 日志记录Block,可查看运行过程中的信息 +@property (nonatomic, copy) void(^logBlock)(DypayLogLevel level, NSTimeInterval timestamp, NSString *tag, NSString *message); + +/** + * 支付单例 + * + * @return 返回单例对象 + */ ++ (DypayAPI *)sharedDypayAPI; + +/* + * @param appId 从抖音商户平台申请的appId + * @param scheme 从抖音回调当前 App 时使用的 scheme + */ ++ (void)registerWithAppID:(NSString *)appId + callbackScheme:(NSString *)scheme; + +/* + * @param appId 从抖音商户平台申请的appId,优先使用universalLink,降级使用scheme + * @param universalLink 从抖音回调当前 App 时使用的universalLink + * @param scheme 从抖音回调当前 App 时使用的 scheme + */ ++ (void)registerWithAppID:(NSString *)appId + universalLink:(NSString *)universalLink + callbackScheme:(NSString *)scheme; + +/* + * 判断是否能打开 Dypay + */ ++ (bool)canOpenDypay; + +/* + * @brief 打开 Dypay, 打开成功后马上回调 completionBlock, + * @param infoDict 拉起抖音支付必须的订单参数 + * @param currentTopViewController 拉起抖音支付时顶部的vc + * @param callback 调用结果的回调 + */ ++ (void)openDypayWithInfo:(NSDictionary *)infoDict + fromViewController:(UIViewController *)currentTopViewController + callback:(void(^)(BOOL isOpenedSuccessed, NSString *errMsg))completionBlock DEPRECATED_MSG_ATTRIBUTE("call openDypayWithInfo:fromViewController:resultCallback instead"); + + +/* + * @brief 打开 Dypay,唤端之前:支付结果会通过该API的resultCallback参数回调,唤端之后:支付结果通过processDypayResultWithURL的callback回调 + * @param infoDict 拉起抖音支付必须的订单参数 + * @param currentTopViewController 拉起抖音支付时顶部的vc + * @param resultCallback 支付结果的回调,resultCode枚举参照processDypayResultWithURL注释 + */ ++ (void)openDypayWithInfo:(NSDictionary *)infoDict + fromViewController:(UIViewController *)currentTopViewController + resultCallback:(void(^)(NSDictionary *resultDict))resultCompletionBlock; + +/* + * 处理通过URL支付回调结果 + * resultDict 包含支付结果错误码信息,如果为nil也表示处理失败。 + 字典中,key: "resultStatus"对应老的错误码定义,将逐步废弃;请使用新key: "resultCode"对应的错误码定义。 + 老key: resultStatus,对应的错误码定义: + -1 未知 + 0 订单支付成功 + 10 用户中途取消 + 20 正在处理中 + 30 版本过低 + 40 失败 + 50 超时 + 新key: resultCode,对应的错误码定义 + DypayErrorCodeSuccess(0) 成功 + DypayErrorCodeCancel(1) 用户取消 + DypayErrorCodeFail(2) 失败 + DypayErrorCodeProcessing(3) 支付结果处理中 + DypayErrorCodeVersionTooLow(100) 抖音版本过低,需要用户升级 + */ ++ (BOOL)processDypayResultWithURL:(NSURL *)url + callback:(void(^)(NSDictionary * _Nullable resultDict))completionBlock; + +/* + * 处理通过Universal Link支付回调结果 + * resultDict 包含支付结果错误码信息,如果为nil也表示处理失败。 + 字典中,key: "resultStatus"对应老的错误码定义,将逐步废弃;请使用新key: "resultCode"对应的错误码定义。 + 老key: resultStatus,对应的错误码定义: + -1 未知 + 0 订单支付成功 + 10 用户中途取消 + 20 正在处理中 + 30 版本过低 + 40 失败 + 50 超时 + 新key: resultCode,对应的错误码定义 + DypayErrorCodeSuccess(0) 成功 + DypayErrorCodeCancel(1) 用户取消 + DypayErrorCodeFail(2) 失败 + DypayErrorCodeProcessing(3) 支付结果处理中 + DypayErrorCodeVersionTooLow(100) 抖音版本过低,需要用户升级 + */ ++ (BOOL)processDypayResultWithUserActivity:(NSUserActivity *)userActivity + callback:(void(^)(NSDictionary *resultDict))completionBlock; + +/*! @brief 获取当前 DypaySDK API 的版本号 + */ ++ (NSString *)getAPIVersion; + +/* + * 埋点 + */ ++ (void)event:(NSString *_Nonnull)eventName params:(NSDictionary *_Nullable)params; + +@end + + +// 内部接口,字节外部App不应使用 +@interface DypayAPI (Internal) +// 业务埋点上报Block,字节内部App使用时设置 +@property (nonatomic, copy) void(^trackEventBlock)(NSString *event, NSDictionary *params); +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSApplication.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSApplication.h new file mode 100644 index 0000000..19100a0 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSApplication.h @@ -0,0 +1,32 @@ +// +// DypayDIRSApplication.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, DypayIRISApplicationState) { + DypayIRISApplicationStateUnknown = 0, + DypayIRISApplicationStateActive, + DypayIRISApplicationStateInactive, + DypayIRISApplicationStateBackground +}; + + +@interface DypayDIRSApplication : NSObject + +@property (readonly, nonnull) NSString *launchID; +@property (readonly, assign) NSTimeInterval launchTime; + +@property (readonly) DypayIRISApplicationState applicationState; + ++ (instancetype)sharedApplication; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSBasicFeatureOptions.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSBasicFeatureOptions.h new file mode 100644 index 0000000..aaa365c --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSBasicFeatureOptions.h @@ -0,0 +1,20 @@ +// +// DypayDIRSBasicFeatureOptions.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/11/9. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSBasicFeatureOptions : DypayDIRSBasicModule + +- (void)addFeatureOptions:(NSDictionary *)opts; + +- (void)removeFeatureOptionsKeys:(NSArray *)keys; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSBasicModule.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSBasicModule.h new file mode 100644 index 0000000..5b13dbe --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSBasicModule.h @@ -0,0 +1,35 @@ +// +// DypayDIRSBasicModule.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import +#import "DypayIRISInterfaceDefines.h" +#import "DypayIRISMacro.h" +#import "DypayDIRSContext.h" +#import "DypayDIRSModuleHive.h" +#import "IRSLOG.h" +#import "DypayDataIRIS.h" + +NS_ASSUME_NONNULL_BEGIN +@class DypayDIRSContext; +@interface DypayDIRSBasicModule : NSObject + +@property (nonatomic, weak) DypayDIRSContext* context; + +@property (nullable, nonatomic, copy) NSString* category; + +@property BOOL isEnabled; +@property DypayIRISState state; + +- (void)onLaunch; + +- (void)run; + +- (void)stop; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSCompressionGzipPlugin.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSCompressionGzipPlugin.h new file mode 100644 index 0000000..d1ef24f --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSCompressionGzipPlugin.h @@ -0,0 +1,16 @@ +// +// DypayDIRSCompressionGzipPlugin.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/9. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSCompressionGzipPlugin : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSConcurrentCollection.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSConcurrentCollection.h new file mode 100644 index 0000000..57eeacd --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSConcurrentCollection.h @@ -0,0 +1,24 @@ +// +// DypayDIRSConcurrentCollection.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSConcurrentCollection : NSObject + ++ (instancetype)collectionWithRaw:(T)collection; + +- (void)operate:(void (^)(T raw))operation; + +- (nullable id)access:(nullable id (^)(T raw))operation; + +- (T)rawValue; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSConfig.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSConfig.h new file mode 100644 index 0000000..c631500 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSConfig.h @@ -0,0 +1,193 @@ +// +// DypayDIRSConfig.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import + +#import "DypayIRISDefines.h" + + +NS_ASSUME_NONNULL_BEGIN + +@class DypayDIRSComplianceConfiguration,DypayDIRSEventConfiguration,DypayDIRSObserver,DypayDIRSEventUploadFilterOptions; + +@interface DypayDIRSConfig : NSObject + ++ (instancetype _Nullable)configWithIdentifier:(NSString *_Nonnull)appId + launchOptions:(nullable NSDictionary *)launchOptions; + + +@property (nullable, nonatomic, copy) NSString *appId; + +@property (nullable, nonatomic, copy) NSString *appName; + +@property (nullable, nonatomic, copy) NSString *appVersion; + +@property (nullable, nonatomic, copy) NSString *buildVersion; + +//If you need to synchronize data between HostApp and ExtensionApp, you need to set the same groupId +@property (nullable, nonatomic, copy) NSString *appGroupId; + +@property (nullable, nonatomic, copy) NSString *channel; + +//be able to distinguish between different instances using the same appid +@property (nullable, nonatomic, copy) NSString *subId; + +@property (nonatomic, strong ) NSDictionary *launchOptions; + +@property (nonatomic, assign) BOOL encryptionEnabled; + +@property (nullable, nonatomic, strong) id endpoint; + +///The default log level is Error +@property (nonatomic, assign) DypayIRISLOG_LEVEL logLevel; + +@property (nullable, nonatomic, copy) void (^configureUserLoggerBlock)(id _Nullable log); + +@property (nullable, readonly) DypayDIRSComplianceConfiguration* compliance; + +@property (nullable, readonly) DypayDIRSEventConfiguration* event; + +@property (nullable, readonly) DypayDIRSObserver *observer; + + +@property (nullable, nonatomic, copy) NSDictionary *_Nullable (^configureHTTPHeaderFieldsBlock)(NSUInteger service); + +@property (nullable, nonatomic, copy) NSDictionary *_Nullable (^configureCommonParametersBlock)(NSUInteger service); + +@property (nullable, nonatomic, copy) NSDictionary *_Nullable (^configureCustomHeaderBlock)(NSUInteger service); + + +@property (nullable, nonatomic, copy) void (^onError)(BOOL fatal, NSError * _Nonnull error, id _Nullable userInfo); + +@end + + + + + + +@interface DypayDIRSComplianceConfiguration : NSObject + +/** + * @brief fields to avoid access + * + * @discussion Fields set in @c blockedFiels will not be accessed and uploaded. + * For example, if you you do not want to collect @c vendor_id, set the following code block, then @c UIDevice.identifierForVendor will not be accessed, and the field @c vendor_id will not appear in any HTTPBODY + * + * @code + * config.compliance.blockedFields = @[@"vendor_id"]; + * @endcode + * + */ +@property (nullable, nonatomic, copy) NSArray *blockedFields; + +@end + + +@interface DypayDIRSEventConfiguration : NSObject + +/* + * Intercept or change events before they are stored + */ +@property (nullable, nonatomic, copy) void (^configureEventInterceptorBlock)(id _Nullable event, BOOL * _Nonnull stop); + +/* + * Filter events before packaging + * + */ +@property (nullable, nonatomic, copy) _Nullable id (^configurePreBatchFilterBlock)(id _Nullable context); + + +@property (nullable, nonatomic, copy) _Nullable id (^configureEventPacketBlock)(id _Nullable event, BOOL * _Nonnull stop); + + +/* + * + * Event expiration time [Unit:seconds] + * Data will be cleaned based on expiration time every time on startup + * Setting it to 0 will not clean up the data. + * + * Default is 0 + * + */ +@property (nonatomic, assign) NSUInteger eventExpirationTime; + + +/* + * - DypayIRISEventPacketStrategyDefault + * Packaging based on the upper limit of the number of events, The number of upper limit can be set through maxPacketEventCount, the default is 200 + * - DypayIRISEventPacketStrategyByteLimitation + * Packing based on the upper limit of data length, The length can be set through maxPacketBytes, the default is 1024*1024 + * + * Default is DypayIRISEventPacketStrategyDefault + * + */ +@property (nonatomic, assign) DypayIRISEventPacketStrategy packetStrategy; + +/* + * + * Default is 200 + * takes effect when setting config.event.packetStrategy = DypayIRISEventPacketStrategyDefault + * + */ +@property (nonatomic, assign) NSUInteger maxPacketEventCount; + + +/* + * + * Default is 1m + * takes effect when setting config.event.packetStrategy = DypayIRISEventPacketStrategyByteLimitation + * + */ +@property (nonatomic, assign) NSUInteger maxPacketBytes; + + + +/* + * Default is 500m, some(25%) earliest events will be deleted when the maximum limit is exceeded on startup + + When an error occurs in the data file and the size of the database file cannot be successfully reduced + in order to avoid affecting the stability of the application, + the database file will be removed as a whole, which will cause events loss + + */ +@property (nonatomic, assign) NSUInteger maxFileBytes; + +/* + * Maximum length after serialization + * default 20*1024; + * + * @NOT take effect yet + */ +@property (nonatomic, assign) NSUInteger maxPropertyBytes; + + +@end + + + +@interface DypayDIRSEventUploadFilterOptions : NSObject + +@property (nullable, nonatomic, strong) NSArray *regionKeys; + +@property (nullable, nonatomic, strong) NSArray *includeTypes; + +@property (nullable, nonatomic, strong) NSArray *excludeTypes; + +@end + + +@interface DypayDIRSObserver : NSObject + +@property (nullable, nonatomic, copy) void (^onSessionLaunch)(NSString *sessionId, id _Nullable info); + +@property (nullable, nonatomic, copy) void (^onSessionTerminate)(NSString *sessionId, id _Nullable info); + +@end + + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSContext.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSContext.h new file mode 100644 index 0000000..57db4d0 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSContext.h @@ -0,0 +1,67 @@ +// +// DypayDIRSContext.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import +#import "DypayIRISInterfaceDefines.h" + +NS_ASSUME_NONNULL_BEGIN + +@class DypayDIRSConfig,DypayDIRSLogger,DypayDIRSModuleHive; +@interface DypayDIRSContext : NSObject + +@property (nonatomic, readonly) DypayDIRSModuleHive* modular; + +@property (readonly, nullable) DypayDIRSConfig *config; + +@property (readonly, nonnull) NSString *name; + ++ (instancetype)main; + ++ (void)configure:(DypayDIRSConfig *)config; + +- (instancetype)initWithConfig:(DypayDIRSConfig *)config; + +- (BOOL)resume; + +- (void)suspend; + +- (nonnull NSString *)contextPath; + +- (void)async:(dispatch_block_t)block; + +- (nonnull NSDictionary *)contextInfo; + +- (void)dispose; + +- (BOOL)isMainContext; + +@end + + +@interface DypayDIRSContext (Instance) + ++ (NSArray *)ctx_all; + ++ (nullable DypayDIRSContext *)ctx_get:(NSString *)name; + ++ (void)ctx_add:(DypayDIRSContext *)context; + ++ (void)ctx_remove:(DypayDIRSContext *)context; + +@end + +@interface DypayDIRSContext (Modules) + +@property (nullable, nonatomic, readonly) DypayDIRSLogger *logger; + +- (nullable NSDictionary *)modules; + ++ (NSDictionary *)defaultModules; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEndpointConfiguration.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEndpointConfiguration.h new file mode 100644 index 0000000..3a642c4 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEndpointConfiguration.h @@ -0,0 +1,25 @@ +// +// DypayDIRSEndpointConfiguration.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/24. +// + +#import +#import "DypayIRISDefines.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEndpointConfiguration : NSObject + +@property (nullable, nonatomic, copy) id _Nullable (^domainBlock)(NSUInteger service, id context); + +@property (nullable, nonatomic, copy) id _Nullable (^endpointBlock)(NSUInteger service, id context); + ++ (DypayDIRSEndpointConfiguration *)configurationUsingBlock:(nonnull id (^)(NSUInteger service, id context))block; + ++ (DypayDIRSEndpointConfiguration *)configurationUsingDomainBlock:(nonnull id (^)(NSUInteger service, id context))block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEnviroment.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEnviroment.h new file mode 100644 index 0000000..35c553e --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEnviroment.h @@ -0,0 +1,29 @@ +// +// DypayDIRSEnviroment.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/25. +// + +#import "DypayDIRSBasicModule.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEnviroment : DypayDIRSBasicModule + ++ (NSInteger)sdkVersion; + ++ (NSString *)sdkVersionString; + ++ (NSString *)osName; + ++ (NSString *)osVersion; + ++ (NSString *)platform; + ++ (NSString *)appVersion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSErrorBuilder.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSErrorBuilder.h new file mode 100644 index 0000000..413794c --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSErrorBuilder.h @@ -0,0 +1,34 @@ +// +// DypayDIRSErrorBuilder.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSErrorBuilder : NSObject + ++ (instancetype)builder; + +- (instancetype)withDomain:(NSErrorDomain)code; + +- (instancetype)withCode:(NSUInteger)code; + +- (instancetype)withDescription:(NSString *)description; + +- (instancetype)withDescriptionFormat:(NSString *)format, ...; + +- (instancetype)withFailureReason:(NSString *)reason; + +- (instancetype)withUnderlyingError:(NSError *)error; + +- (NSError *)build; + +- (BOOL)buildError:(NSError **)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEvent.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEvent.h new file mode 100644 index 0000000..fd576a0 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEvent.h @@ -0,0 +1,106 @@ +// +// DypayDIRSEvent.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import +#import "DypayIRISDefinesPrivate.h" + + + +typedef NSString * DypayIRISEventType; + +FOUNDATION_EXTERN DypayIRISEventType const _Nonnull DypayDIRSEventTypeV3; //event_v3 + + +NS_ASSUME_NONNULL_BEGIN + +@class DypayDIRSEventOptions; +@interface DypayDIRSEvent : NSObject + +@property (nullable, nonatomic, copy) NSString * key; + +@property (nullable, nonatomic, copy) NSString * type; + +@property (nonatomic) NSTimeInterval time; +@property (nonatomic) NSTimeInterval storedTime; +@property (nonatomic) NSTimeInterval batchedTime; + +@property (nullable, nonatomic, strong) NSDictionary * properties; + +@property (nullable, nonatomic, strong) NSDictionary * globalProperties; + +@property (nullable, nonatomic, strong) NSDictionary * commonParameters; + +@property (nullable, nonatomic, copy) NSString * logID; + +@property (nullable, nonatomic, copy) NSNumber* dbIndex; + +@property (nonatomic, assign) int64_t index; + +@property (nonatomic, copy) NSString* section; + +@property (nullable, nonatomic) id schemaObject; + +@property (nonatomic, assign) NSUInteger schemaDataLength; + +@property (nonatomic, strong) DypayDIRSEventOptions * options; + +@property (nonatomic, assign) BOOL stained; + +//return event_id if event stained +- (int64_t)staining; + +- (NSString *)sessionId; + +- (void)addCommonParameters:(NSDictionary *)parameters; + + ++ (nullable instancetype)eventWithType:(DypayIRISEventType _Nonnull)type + properties:(NSDictionary * _Nullable)properties; + + ++ (nullable instancetype)v3UsingKey:(NSString * _Nonnull)key + properties:(NSDictionary * _Nullable)properties; + + + +@end + + +@interface DypayDIRSEventOptions : NSObject + +@property (nonatomic, assign) NSInteger category; + +@property (nonatomic, assign) DypayIRISPriority priority; + +@property (nullable ,nonatomic, copy) NSString * regionKey; + +@property (nonatomic, assign) NSInteger privacyLevel; + +@property (nonatomic, assign) BOOL filtered; + +@end + + + +@interface DypayDIRSEventBatchOptions : NSObject + +@property (nonatomic, assign) NSInteger priority; + +@property (nullable, nonatomic) NSArray * eventIDs; + +@property (nonatomic, assign) NSUInteger count; + +@property (nonatomic, strong) NSArray * allowRegionList; + +@property (nonatomic, assign) NSInteger minDBIndex; + +@property (nonatomic, assign) NSInteger maxDBIndex; + +@end + + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventBatchDispatcher.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventBatchDispatcher.h new file mode 100644 index 0000000..b95da3e --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventBatchDispatcher.h @@ -0,0 +1,29 @@ +// +// DypayDIRSEventUploadDispatcher.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/18. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + + +@interface DypayDIRSEventBatchDispatcher : DypayDIRSBasicModule + +@property (nonatomic, readonly) id schema; + +@property (readonly) id defaultUploader; + +@property (readonly) id realtimeUploader; + +- (nullable id)createExecutor; + +- (nullable NSArray *)allExecutors; + +- (nonnull dispatch_queue_t)intervalBatchQueue; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventBatchExecutor.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventBatchExecutor.h new file mode 100644 index 0000000..98ba1f9 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventBatchExecutor.h @@ -0,0 +1,50 @@ +// +// DypayDIRSEventUploadExecutor.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/18. +// + +#import "DypayDIRSBasicModule.h" +#import "DypayIRISInterfaceDefines.h" + +NS_ASSUME_NONNULL_BEGIN + + + +@interface DypayDIRSEventBatchExecutor : DypayDIRSBasicModule + +@property (nonatomic, assign) NSTimeInterval interval; + +@property (nullable, nonatomic, weak) id serializer; + +@property (nullable, nonatomic) NSArray> *compressors; + +@property (nullable, nonatomic, weak) id encryptor; + +@property (nullable, nonatomic, weak) id decryptor; + +@property (nullable, nonatomic, weak) id eventStore; + +@property (nullable, nonatomic) id throttlter; + +@property (nonatomic, assign) DypayIRISPriority priority; + +@property (nonatomic, assign) DypayIRISState execState; + +@property (nullable, nonatomic, strong) NSDictionary *options; + + +/* + * @opts + * DypayIRISBatchOptionsEnforceKey - enforce batch YES|NO + * + */ +//- (void)executeUpload:(DypayIRISBatchTrigger)trigger +// options:(nullable NSDictionary *)opts +// completion:(void (^ __nullable)(BOOL success, NSError* _Nullable error))completion; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventBlockPlugin.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventBlockPlugin.h new file mode 100644 index 0000000..1fea44f --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventBlockPlugin.h @@ -0,0 +1,16 @@ +// +// DypayDIRSEventBlockPlugin.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/25. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventBlockPlugin : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventEntry.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventEntry.h new file mode 100644 index 0000000..aeb176c --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventEntry.h @@ -0,0 +1,18 @@ +// +// DypayDIRSEventEntry.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventEntry : DypayDIRSBasicModule + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventListener.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventListener.h new file mode 100644 index 0000000..8c818c2 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventListener.h @@ -0,0 +1,17 @@ +// +// DypayDIRSEventListener.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/14. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventListener : DypayDIRSBasicModule + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventPacker.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventPacker.h new file mode 100644 index 0000000..ea0fe7e --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventPacker.h @@ -0,0 +1,22 @@ +// +// DypayDIRSEventPacker.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/18. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventPacker : NSObject + +@property (nonatomic, assign) NSUInteger maxPackLength; + +@property (nonatomic, assign) NSUInteger maxEventCount; + +@property (nonatomic, assign) NSInteger strategy; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventRequestSchema.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventRequestSchema.h new file mode 100644 index 0000000..a97ace3 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventRequestSchema.h @@ -0,0 +1,23 @@ +// +// DypayDIRSEventRequestSchema.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/18. +// + +#import "DypayDIRSBasicModule.h" +#import "DypayDIRSEventPacker.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventRequestSchema : DypayDIRSBasicModule + +@end + + + +@interface DypayDIRSEventRealtimeRequestSchema : DypayDIRSEventRequestSchema + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventSerializer.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventSerializer.h new file mode 100644 index 0000000..d87e217 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventSerializer.h @@ -0,0 +1,16 @@ +// +// DypayDIRSEventSerializer.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/14. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventSerializer : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventSession.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventSession.h new file mode 100644 index 0000000..eccbfea --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventSession.h @@ -0,0 +1,20 @@ +// +// DypayDIRSEventSession.h +// +// +// Created by ByteDance on 2023/8/4. +// + +#import "DypayDIRSBasicModule.h" +#import "DypayDataIRIS.h" +#import "DypayDIRSTracker+Session.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSEventSession : DypayDIRSBasicModule + +@property (nonatomic, assign) DypayIRISLaunchType launchType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventStore.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventStore.h new file mode 100644 index 0000000..5fae149 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSEventStore.h @@ -0,0 +1,24 @@ +// +// DypayDIRSEventStore.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import "DypayDIRSBasicModule.h" +#import "DypayDIRSEvent.h" + + +NS_ASSUME_NONNULL_BEGIN + + + + + +@interface DypayDIRSEventStore : DypayDIRSBasicModule + +@property (nonatomic, weak) id serializer; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSExtension.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSExtension.h new file mode 100644 index 0000000..bfc3281 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSExtension.h @@ -0,0 +1,31 @@ +// +// DypayDIRSExtension.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSDictionary (DypayDataIRIS) + +- (nullable NSDictionary *)datairis_dictionaryForKey:(NSString *)key; + +- (nullable NSString *)datairis_stringForKey:(NSString *)key; + +- (nullable NSArray *)datairis_arrayForKey:(NSString *)key; + +- (double)datairis_doubleForKey:(NSString *)key; + +- (NSInteger)datairis_integerForKey:(NSString *)key; + +- (BOOL)datairis_boolForKey:(NSString *)key; + +- (long long)datairis_longlongValueForKey:(NSString *)key; + +@end + + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSFMDatabase.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSFMDatabase.h new file mode 100644 index 0000000..00be4da --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSFMDatabase.h @@ -0,0 +1,1055 @@ +#import +#import "DypayDIRSFMResultSet.h" + + +#if ! __has_feature(objc_arc) + #define FMDBAutorelease(__v) ([__v autorelease]); + #define FMDBReturnAutoreleased FMDBAutorelease + + #define FMDBRetain(__v) ([__v retain]); + #define FMDBReturnRetained FMDBRetain + + #define FMDBRelease(__v) ([__v release]); + + #define FMDBDispatchQueueRelease(__v) (dispatch_release(__v)); +#else + // -fobjc-arc + #define FMDBAutorelease(__v) + #define FMDBReturnAutoreleased(__v) (__v) + + #define FMDBRetain(__v) + #define FMDBReturnRetained(__v) (__v) + + #define FMDBRelease(__v) + +// If OS_OBJECT_USE_OBJC=1, then the dispatch objects will be treated like ObjC objects +// and will participate in ARC. +// See the section on "Dispatch Queues and Automatic Reference Counting" in "Grand Central Dispatch (GCD) Reference" for details. + #if OS_OBJECT_USE_OBJC + #define FMDBDispatchQueueRelease(__v) + #else + #define FMDBDispatchQueueRelease(__v) (dispatch_release(__v)); + #endif +#endif + +#if !__has_feature(objc_instancetype) + #define instancetype id +#endif + + +typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary); + + +/** A SQLite ([http://sqlite.org/](http://sqlite.org/)) Objective-C wrapper. + + ### Usage + The three main classes in FMDB are: + + - `DypayDIRSFMDatabase` - Represents a single SQLite database. Used for executing SQL statements. + - `` - Represents the results of executing a query on an `DypayDIRSFMDatabase`. + - `` - If you want to perform queries and updates on multiple threads, you'll want to use this class. + + ### See also + + - `` - A wrapper for `sqlite_stmt`. + + ### External links + + - [FMDB on GitHub](https://github.com/ccgus/fmdb) including introductory documentation + - [SQLite web site](http://sqlite.org/) + - [FMDB mailing list](http://groups.google.com/group/fmdb) + - [SQLite FAQ](http://www.sqlite.org/faq.html) + + @warning Do not instantiate a single `DypayDIRSFMDatabase` object and use it across multiple threads. Instead, use ``. + + */ + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wobjc-interface-ivars" + + +@interface DypayDIRSFMDatabase : NSObject { + + void* _db; + NSString* _databasePath; + BOOL _shouldCacheStatements; + BOOL _isExecutingStatement; + BOOL _inTransaction; + NSTimeInterval _maxBusyRetryTimeInterval; + NSTimeInterval _startBusyRetryTime; + + NSMutableDictionary *_cachedStatements; + NSMutableSet *_openResultSets; + NSMutableSet *_openFunctions; + + NSDateFormatter *_dateFormat; +} + +///----------------- +/// @name Properties +///----------------- + +/** Dictionary of cached statements */ + +@property (atomic, retain) NSMutableDictionary *cachedStatements; + +///--------------------- +/// @name Initialization +///--------------------- + +/** Create a `DypayDIRSFMDatabase` object. + + An `DypayDIRSFMDatabase` is created with a path to a SQLite database file. This path can be one of these three: + + 1. A file system path. The file does not have to exist on disk. If it does not exist, it is created for you. + 2. An empty string (`@""`). An empty database is created at a temporary location. This database is deleted with the `DypayDIRSFMDatabase` connection is closed. + 3. `nil`. An in-memory database is created. This database will be destroyed with the `DypayDIRSFMDatabase` connection is closed. + + For example, to create/open a database in your Mac OS X `tmp` folder: + + DypayDIRSFMDatabase *db = [DypayDIRSFMDatabase databaseWithPath:@"/tmp/tmp.db"]; + + Or, in iOS, you might open a database in the app's `Documents` directory: + + NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; + NSString *dbPath = [docsPath stringByAppendingPathComponent:@"test.db"]; + DypayDIRSFMDatabase *db = [DypayDIRSFMDatabase databaseWithPath:dbPath]; + + (For more information on temporary and in-memory databases, read the sqlite documentation on the subject: [http://www.sqlite.org/inmemorydb.html](http://www.sqlite.org/inmemorydb.html)) + + @param inPath Path of database file + + @return `DypayDIRSFMDatabase` object if successful; `nil` if failure. + + */ + ++ (instancetype)databaseWithPath:(NSString*)inPath; + +/** Initialize a `DypayDIRSFMDatabase` object. + + An `DypayDIRSFMDatabase` is created with a path to a SQLite database file. This path can be one of these three: + + 1. A file system path. The file does not have to exist on disk. If it does not exist, it is created for you. + 2. An empty string (`@""`). An empty database is created at a temporary location. This database is deleted with the `DypayDIRSFMDatabase` connection is closed. + 3. `nil`. An in-memory database is created. This database will be destroyed with the `DypayDIRSFMDatabase` connection is closed. + + For example, to create/open a database in your Mac OS X `tmp` folder: + + DypayDIRSFMDatabase *db = [DypayDIRSFMDatabase databaseWithPath:@"/tmp/tmp.db"]; + + Or, in iOS, you might open a database in the app's `Documents` directory: + + NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; + NSString *dbPath = [docsPath stringByAppendingPathComponent:@"test.db"]; + DypayDIRSFMDatabase *db = [DypayDIRSFMDatabase databaseWithPath:dbPath]; + + (For more information on temporary and in-memory databases, read the sqlite documentation on the subject: [http://www.sqlite.org/inmemorydb.html](http://www.sqlite.org/inmemorydb.html)) + + @param inPath Path of database file + + @return `DypayDIRSFMDatabase` object if successful; `nil` if failure. + + */ + +- (instancetype)initWithPath:(NSString*)inPath; + + +///----------------------------------- +/// @name Opening and closing database +///----------------------------------- + +/** Opening a new database connection + + The database is opened for reading and writing, and is created if it does not already exist. + + @return `YES` if successful, `NO` on error. + + @see [sqlite3_open()](http://sqlite.org/c3ref/open.html) + @see openWithFlags: + @see close + */ + +- (BOOL)open; + +/** Opening a new database connection with flags and an optional virtual file system (VFS) + + @param flags one of the following three values, optionally combined with the `SQLITE_OPEN_NOMUTEX`, `SQLITE_OPEN_FULLMUTEX`, `SQLITE_OPEN_SHAREDCACHE`, `SQLITE_OPEN_PRIVATECACHE`, and/or `SQLITE_OPEN_URI` flags: + + `SQLITE_OPEN_READONLY` + + The database is opened in read-only mode. If the database does not already exist, an error is returned. + + `SQLITE_OPEN_READWRITE` + + The database is opened for reading and writing if possible, or reading only if the file is write protected by the operating system. In either case the database must already exist, otherwise an error is returned. + + `SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE` + + The database is opened for reading and writing, and is created if it does not already exist. This is the behavior that is always used for `open` method. + + @return `YES` if successful, `NO` on error. + + @see [sqlite3_open_v2()](http://sqlite.org/c3ref/open.html) + @see open + @see close + */ + +- (BOOL)openWithFlags:(int)flags; + +/** Opening a new database connection with flags and an optional virtual file system (VFS) + + @param flags one of the following three values, optionally combined with the `SQLITE_OPEN_NOMUTEX`, `SQLITE_OPEN_FULLMUTEX`, `SQLITE_OPEN_SHAREDCACHE`, `SQLITE_OPEN_PRIVATECACHE`, and/or `SQLITE_OPEN_URI` flags: + + `SQLITE_OPEN_READONLY` + + The database is opened in read-only mode. If the database does not already exist, an error is returned. + + `SQLITE_OPEN_READWRITE` + + The database is opened for reading and writing if possible, or reading only if the file is write protected by the operating system. In either case the database must already exist, otherwise an error is returned. + + `SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE` + + The database is opened for reading and writing, and is created if it does not already exist. This is the behavior that is always used for `open` method. + + @param vfsName If vfs is given the value is passed to the vfs parameter of sqlite3_open_v2. + + @return `YES` if successful, `NO` on error. + + @see [sqlite3_open_v2()](http://sqlite.org/c3ref/open.html) + @see open + @see close + */ + +- (BOOL)openWithFlags:(int)flags vfs:(NSString *)vfsName; + +/** Closing a database connection + + @return `YES` if success, `NO` on error. + + @see [sqlite3_close()](http://sqlite.org/c3ref/close.html) + @see open + @see openWithFlags: + */ + +- (BOOL)close; + +/** Test to see if we have a good connection to the database. + + This will confirm whether: + + - is database open + - if open, it will try a simple SELECT statement and confirm that it succeeds. + + @return `YES` if everything succeeds, `NO` on failure. + */ + +- (BOOL)goodConnection; + + +///---------------------- +/// @name Perform updates +///---------------------- + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html), [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) to bind values to `?` placeholders in the SQL with the optional list of parameters, and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param outErr A reference to the `NSError` pointer to be updated with an auto released `NSError` object if an error if an error occurs. If `nil`, no `NSError` object will be returned. + + @param ... Optional parameters to bind to `?` placeholders in the SQL statement. These should be Objective-C objects (e.g. `NSString`, `NSNumber`, etc.), not fundamental C data types (e.g. `int`, `char *`, etc.). + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see lastError + @see lastErrorCode + @see lastErrorMessage + @see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) + */ + +- (BOOL)executeUpdate:(NSString*)sql withErrorAndBindings:(NSError**)outErr, ...; + +/** Execute single update statement + + @see executeUpdate:withErrorAndBindings: + + @warning **Deprecated**: Please use `` instead. + */ + +- (BOOL)update:(NSString*)sql withErrorAndBindings:(NSError**)outErr, ... __attribute__ ((deprecated)); + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html), [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) to bind values to `?` placeholders in the SQL with the optional list of parameters, and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param ... Optional parameters to bind to `?` placeholders in the SQL statement. These should be Objective-C objects (e.g. `NSString`, `NSNumber`, etc.), not fundamental C data types (e.g. `int`, `char *`, etc.). + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see lastError + @see lastErrorCode + @see lastErrorMessage + @see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) + + @note This technique supports the use of `?` placeholders in the SQL, automatically binding any supplied value parameters to those placeholders. This approach is more robust than techniques that entail using `stringWithFormat` to manually build SQL statements, which can be problematic if the values happened to include any characters that needed to be quoted. + + @note If you want to use this from Swift, please note that you must include `DypayDIRSFMDatabaseVariadic.swift` in your project. Without that, you cannot use this method directly, and instead have to use methods such as ``. + */ + +- (BOOL)executeUpdate:(NSString*)sql, ...; + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. Unlike the other `executeUpdate` methods, this uses printf-style formatters (e.g. `%s`, `%d`, etc.) to build the SQL. Do not use `?` placeholders in the SQL if you use this method. + + @param format The SQL to be performed, with `printf`-style escape sequences. + + @param ... Optional parameters to bind to use in conjunction with the `printf`-style escape sequences in the SQL statement. + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see executeUpdate: + @see lastError + @see lastErrorCode + @see lastErrorMessage + + @note This method does not technically perform a traditional printf-style replacement. What this method actually does is replace the printf-style percent sequences with a SQLite `?` placeholder, and then bind values to that placeholder. Thus the following command + + [db executeUpdateWithFormat:@"INSERT INTO test (name) VALUES (%@)", @"Gus"]; + + is actually replacing the `%@` with `?` placeholder, and then performing something equivalent to `` + + [db executeUpdate:@"INSERT INTO test (name) VALUES (?)", @"Gus"]; + + There are two reasons why this distinction is important. First, the printf-style escape sequences can only be used where it is permissible to use a SQLite `?` placeholder. You can use it only for values in SQL statements, but not for table names or column names or any other non-value context. This method also cannot be used in conjunction with `pragma` statements and the like. Second, note the lack of quotation marks in the SQL. The `VALUES` clause was _not_ `VALUES ('%@')` (like you might have to do if you built a SQL statement using `NSString` method `stringWithFormat`), but rather simply `VALUES (%@)`. + */ + +- (BOOL)executeUpdateWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2); + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) binding any `?` placeholders in the SQL with the optional list of parameters. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param arguments A `NSArray` of objects to be used when binding values to the `?` placeholders in the SQL statement. + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see executeUpdate:values:error: + @see lastError + @see lastErrorCode + @see lastErrorMessage + */ + +- (BOOL)executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray *)arguments; + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) binding any `?` placeholders in the SQL with the optional list of parameters. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + This is similar to ``, except that this also accepts a pointer to a `NSError` pointer, so that errors can be returned. + + In Swift 2, this throws errors, as if it were defined as follows: + + `func executeUpdate(sql: String!, values: [AnyObject]!) throws -> Bool` + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param values A `NSArray` of objects to be used when binding values to the `?` placeholders in the SQL statement. + + @param error A `NSError` object to receive any error object (if any). + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see lastError + @see lastErrorCode + @see lastErrorMessage + + */ + +- (BOOL)executeUpdate:(NSString*)sql values:(NSArray *)values error:(NSError * __autoreleasing *)error; + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. Unlike the other `executeUpdate` methods, this uses printf-style formatters (e.g. `%s`, `%d`, etc.) to build the SQL. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param arguments A `NSDictionary` of objects keyed by column names that will be used when binding values to the `?` placeholders in the SQL statement. + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see lastError + @see lastErrorCode + @see lastErrorMessage +*/ + +- (BOOL)executeUpdate:(NSString*)sql withParameterDictionary:(NSDictionary *)arguments; + + +/** Execute single update statement + + This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. Unlike the other `executeUpdate` methods, this uses printf-style formatters (e.g. `%s`, `%d`, etc.) to build the SQL. + + The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. + + @param sql The SQL to be performed, with optional `?` placeholders. + + @param args A `va_list` of arguments. + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see lastError + @see lastErrorCode + @see lastErrorMessage + */ + +- (BOOL)executeUpdate:(NSString*)sql withVAList: (va_list)args; + +/** Execute multiple SQL statements + + This executes a series of SQL statements that are combined in a single string (e.g. the SQL generated by the `sqlite3` command line `.dump` command). This accepts no value parameters, but rather simply expects a single string with multiple SQL statements, each terminated with a semicolon. This uses `sqlite3_exec`. + + @param sql The SQL to be performed + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see executeStatements:withResultBlock: + @see [sqlite3_exec()](http://sqlite.org/c3ref/exec.html) + + */ + +- (BOOL)executeStatements:(NSString *)sql; + +/** Execute multiple SQL statements with callback handler + + This executes a series of SQL statements that are combined in a single string (e.g. the SQL generated by the `sqlite3` command line `.dump` command). This accepts no value parameters, but rather simply expects a single string with multiple SQL statements, each terminated with a semicolon. This uses `sqlite3_exec`. + + @param sql The SQL to be performed. + @param block A block that will be called for any result sets returned by any SQL statements. + Note, if you supply this block, it must return integer value, zero upon success (this would be a good opportunity to use SQLITE_OK), + non-zero value upon failure (which will stop the bulk execution of the SQL). If a statement returns values, the block will be called with the results from the query in NSDictionary *resultsDictionary. + This may be `nil` if you don't care to receive any results. + + @return `YES` upon success; `NO` upon failure. If failed, you can call ``, + ``, or `` for diagnostic information regarding the failure. + + @see executeStatements: + @see [sqlite3_exec()](http://sqlite.org/c3ref/exec.html) + + */ + +- (BOOL)executeStatements:(NSString *)sql withResultBlock:(FMDBExecuteStatementsCallbackBlock)block; + +/** Last insert rowid + + Each entry in an SQLite table has a unique 64-bit signed integer key called the "rowid". The rowid is always available as an undeclared column named `ROWID`, `OID`, or `_ROWID_` as long as those names are not also used by explicitly declared columns. If the table has a column of type `INTEGER PRIMARY KEY` then that column is another alias for the rowid. + + This routine returns the rowid of the most recent successful `INSERT` into the database from the database connection in the first argument. As of SQLite version 3.7.7, this routines records the last insert rowid of both ordinary tables and virtual tables. If no successful `INSERT`s have ever occurred on that database connection, zero is returned. + + @return The rowid of the last inserted row. + + @see [sqlite3_last_insert_rowid()](http://sqlite.org/c3ref/last_insert_rowid.html) + + */ + +- (int64_t)lastInsertRowId; + +/** The number of rows changed by prior SQL statement. + + This function returns the number of database rows that were changed or inserted or deleted by the most recently completed SQL statement on the database connection specified by the first parameter. Only changes that are directly specified by the INSERT, UPDATE, or DELETE statement are counted. + + @return The number of rows changed by prior SQL statement. + + @see [sqlite3_changes()](http://sqlite.org/c3ref/changes.html) + + */ + +- (int)changes; + + +///------------------------- +/// @name Retrieving results +///------------------------- + +/** Execute select statement + + Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. + + In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[DypayDIRSResultSet next]>`) from one record to the other. + + This method employs [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) for any optional value parameters. This properly escapes any characters that need escape sequences (e.g. quotation marks), which eliminates simple SQL errors as well as protects against SQL injection attacks. This method natively handles `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects. All other object types will be interpreted as text values using the object's `description` method. + + @param sql The SELECT statement to be performed, with optional `?` placeholders. + + @param ... Optional parameters to bind to `?` placeholders in the SQL statement. These should be Objective-C objects (e.g. `NSString`, `NSNumber`, etc.), not fundamental C data types (e.g. `int`, `char *`, etc.). + + @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see DypayDIRSResultSet + @see [`DypayDIRSResultSet next`](<[DypayDIRSResultSet next]>) + @see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) + + @note If you want to use this from Swift, please note that you must include `DypayDIRSFMDatabaseVariadic.swift` in your project. Without that, you cannot use this method directly, and instead have to use methods such as ``. + */ + +- (DypayDIRSResultSet *)executeQuery:(NSString*)sql, ...; + +/** Execute select statement + + Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. + + In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[DypayDIRSResultSet next]>`) from one record to the other. + + @param format The SQL to be performed, with `printf`-style escape sequences. + + @param ... Optional parameters to bind to use in conjunction with the `printf`-style escape sequences in the SQL statement. + + @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see executeQuery: + @see DypayDIRSResultSet + @see [`DypayDIRSResultSet next`](<[DypayDIRSResultSet next]>) + + @note This method does not technically perform a traditional printf-style replacement. What this method actually does is replace the printf-style percent sequences with a SQLite `?` placeholder, and then bind values to that placeholder. Thus the following command + + [db executeQueryWithFormat:@"SELECT * FROM test WHERE name=%@", @"Gus"]; + + is actually replacing the `%@` with `?` placeholder, and then performing something equivalent to `` + + [db executeQuery:@"SELECT * FROM test WHERE name=?", @"Gus"]; + + There are two reasons why this distinction is important. First, the printf-style escape sequences can only be used where it is permissible to use a SQLite `?` placeholder. You can use it only for values in SQL statements, but not for table names or column names or any other non-value context. This method also cannot be used in conjunction with `pragma` statements and the like. Second, note the lack of quotation marks in the SQL. The `WHERE` clause was _not_ `WHERE name='%@'` (like you might have to do if you built a SQL statement using `NSString` method `stringWithFormat`), but rather simply `WHERE name=%@`. + + */ + +- (DypayDIRSResultSet *)executeQueryWithFormat:(NSString*)format, ... NS_FORMAT_FUNCTION(1,2); + +/** Execute select statement + + Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. + + In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[DypayDIRSResultSet next]>`) from one record to the other. + + @param sql The SELECT statement to be performed, with optional `?` placeholders. + + @param arguments A `NSArray` of objects to be used when binding values to the `?` placeholders in the SQL statement. + + @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see -executeQuery:values:error: + @see DypayDIRSResultSet + @see [`DypayDIRSResultSet next`](<[DypayDIRSResultSet next]>) + */ + +- (DypayDIRSResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments; + +/** Execute select statement + + Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. + + In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[DypayDIRSResultSet next]>`) from one record to the other. + + This is similar to ``, except that this also accepts a pointer to a `NSError` pointer, so that errors can be returned. + + In Swift 2, this throws errors, as if it were defined as follows: + + `func executeQuery(sql: String!, values: [AnyObject]!) throws -> DypayDIRSResultSet!` + + @param sql The SELECT statement to be performed, with optional `?` placeholders. + + @param values A `NSArray` of objects to be used when binding values to the `?` placeholders in the SQL statement. + + @param error A `NSError` object to receive any error object (if any). + + @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see DypayDIRSResultSet + @see [`DypayDIRSResultSet next`](<[DypayDIRSResultSet next]>) + + @note When called from Swift, only use the first two parameters, `sql` and `values`. This but throws the error. + + */ + +- (DypayDIRSResultSet *)executeQuery:(NSString *)sql values:(NSArray *)values error:(NSError * __autoreleasing *)error; + +/** Execute select statement + + Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. + + In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[DypayDIRSResultSet next]>`) from one record to the other. + + @param sql The SELECT statement to be performed, with optional `?` placeholders. + + @param arguments A `NSDictionary` of objects keyed by column names that will be used when binding values to the `?` placeholders in the SQL statement. + + @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see DypayDIRSResultSet + @see [`DypayDIRSResultSet next`](<[DypayDIRSResultSet next]>) + */ + +- (DypayDIRSResultSet *)executeQuery:(NSString *)sql withParameterDictionary:(NSDictionary *)arguments; + + +// Documentation forthcoming. +- (DypayDIRSResultSet *)executeQuery:(NSString*)sql withVAList: (va_list)args; + +///------------------- +/// @name Transactions +///------------------- + +/** Begin a transaction + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see commit + @see rollback + @see beginDeferredTransaction + @see inTransaction + */ + +- (BOOL)beginTransaction; + +/** Begin a deferred transaction + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see commit + @see rollback + @see beginTransaction + @see inTransaction + */ + +- (BOOL)beginDeferredTransaction; + +/** Commit a transaction + + Commit a transaction that was initiated with either `` or with ``. + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see beginTransaction + @see beginDeferredTransaction + @see rollback + @see inTransaction + */ + +- (BOOL)commit; + +/** Rollback a transaction + + Rollback a transaction that was initiated with either `` or with ``. + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see beginTransaction + @see beginDeferredTransaction + @see commit + @see inTransaction + */ + +- (BOOL)rollback; + +/** Identify whether currently in a transaction or not + + @return `YES` if currently within transaction; `NO` if not. + + @see beginTransaction + @see beginDeferredTransaction + @see commit + @see rollback + */ + +- (BOOL)inTransaction; + + +///---------------------------------------- +/// @name Cached statements and result sets +///---------------------------------------- + +/** Clear cached statements */ + +- (void)clearCachedStatements; + +/** Close all open result sets */ + +- (void)closeOpenResultSets; + +/** Whether database has any open result sets + + @return `YES` if there are open result sets; `NO` if not. + */ + +- (BOOL)hasOpenResultSets; + +/** Return whether should cache statements or not + + @return `YES` if should cache statements; `NO` if not. + */ + +- (BOOL)shouldCacheStatements; + +/** Set whether should cache statements or not + + @param value `YES` if should cache statements; `NO` if not. + */ + +- (void)setShouldCacheStatements:(BOOL)value; + + +///------------------------------ +/// @name General inquiry methods +///------------------------------ + +/** The path of the database file + + @return path of database. + + */ + +- (NSString *)databasePath; + +/** The underlying SQLite handle + + @return The `sqlite3` pointer. + + */ + +- (void*)sqliteHandle; + + +///----------------------------- +/// @name Retrieving error codes +///----------------------------- + +/** Last error message + + Returns the English-language text that describes the most recent failed SQLite API call associated with a database connection. If a prior API call failed but the most recent API call succeeded, this return value is undefined. + + @return `NSString` of the last error message. + + @see [sqlite3_errmsg()](http://sqlite.org/c3ref/errcode.html) + @see lastErrorCode + @see lastError + + */ + +- (NSString*)lastErrorMessage; + +/** Last error code + + Returns the numeric result code or extended result code for the most recent failed SQLite API call associated with a database connection. If a prior API call failed but the most recent API call succeeded, this return value is undefined. + + @return Integer value of the last error code. + + @see [sqlite3_errcode()](http://sqlite.org/c3ref/errcode.html) + @see lastErrorMessage + @see lastError + + */ + +- (int)lastErrorCode; + +/** Had error + + @return `YES` if there was an error, `NO` if no error. + + @see lastError + @see lastErrorCode + @see lastErrorMessage + + */ + +- (BOOL)hadError; + +/** Last error + + @return `NSError` representing the last error. + + @see lastErrorCode + @see lastErrorMessage + + */ + +- (NSError*)lastError; + + +// description forthcoming +- (void)setMaxBusyRetryTimeInterval:(NSTimeInterval)timeoutInSeconds; +- (NSTimeInterval)maxBusyRetryTimeInterval; + + +///------------------ +/// @name Save points +///------------------ + +/** Start save point + + @param name Name of save point. + + @param outErr A `NSError` object to receive any error object (if any). + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see releaseSavePointWithName:error: + @see rollbackToSavePointWithName:error: + */ + +- (BOOL)startSavePointWithName:(NSString*)name error:(NSError**)outErr; + +/** Release save point + + @param name Name of save point. + + @param outErr A `NSError` object to receive any error object (if any). + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see startSavePointWithName:error: + @see rollbackToSavePointWithName:error: + + */ + +- (BOOL)releaseSavePointWithName:(NSString*)name error:(NSError**)outErr; + +/** Roll back to save point + + @param name Name of save point. + @param outErr A `NSError` object to receive any error object (if any). + + @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. + + @see startSavePointWithName:error: + @see releaseSavePointWithName:error: + + */ + +- (BOOL)rollbackToSavePointWithName:(NSString*)name error:(NSError**)outErr; + +/** Start save point + + @param block Block of code to perform from within save point. + + @return The NSError corresponding to the error, if any. If no error, returns `nil`. + + @see startSavePointWithName:error: + @see releaseSavePointWithName:error: + @see rollbackToSavePointWithName:error: + + */ + +- (NSError*)inSavePoint:(void (^)(BOOL *rollback))block; + +///------------------------ +/// @name Make SQL function +///------------------------ + +/** Adds SQL functions or aggregates or to redefine the behavior of existing SQL functions or aggregates. + + For example: + + [queue inDatabase:^(DypayDIRSFMDatabase *adb) { + + [adb executeUpdate:@"create table ftest (foo text)"]; + [adb executeUpdate:@"insert into ftest values ('hello')"]; + [adb executeUpdate:@"insert into ftest values ('hi')"]; + [adb executeUpdate:@"insert into ftest values ('not h!')"]; + [adb executeUpdate:@"insert into ftest values ('definitely not h!')"]; + + [adb makeFunctionNamed:@"StringStartsWithH" maximumArguments:1 withBlock:^(sqlite3_context *context, int aargc, sqlite3_value **aargv) { + if (sqlite3_value_type(aargv[0]) == SQLITE_TEXT) { + @autoreleasepool { + const char *c = (const char *)sqlite3_value_text(aargv[0]); + NSString *s = [NSString stringWithUTF8String:c]; + sqlite3_result_int(context, [s hasPrefix:@"h"]); + } + } + else { + Log(@"Unknown formart for StringStartsWithH (%d) %s:%d", sqlite3_value_type(aargv[0]), __FUNCTION__, __LINE__); + sqlite3_result_null(context); + } + }]; + + int rowCount = 0; + DypayDIRSResultSet *ars = [adb executeQuery:@"select * from ftest where StringStartsWithH(foo)"]; + while ([ars next]) { + rowCount++; + Log(@"Does %@ start with 'h'?", [rs stringForColumnIndex:0]); + } + FMDBQuickCheck(rowCount == 2); + }]; + + @param name Name of function + + @param count Maximum number of parameters + + @param block The block of code for the function + + @see [sqlite3_create_function()](http://sqlite.org/c3ref/create_function.html) + */ + +- (void)makeFunctionNamed:(NSString*)name maximumArguments:(int)count withBlock:(void (^)(void *context, int argc, void **argv))block; + + +///--------------------- +/// @name Date formatter +///--------------------- + +/** Generate an `NSDateFormatter` that won't be broken by permutations of timezones or locales. + + Use this method to generate values to set the dateFormat property. + + Example: + + myDB.dateFormat = [DypayDIRSFMDatabase storeableDateFormat:@"yyyy-MM-dd HH:mm:ss"]; + + @param format A valid NSDateFormatter format string. + + @return A `NSDateFormatter` that can be used for converting dates to strings and vice versa. + + @see hasDateFormatter + @see setDateFormat: + @see dateFromString: + @see stringFromDate: + @see storeableDateFormat: + + @warning Note that `NSDateFormatter` is not thread-safe, so the formatter generated by this method should be assigned to only one FMDB instance and should not be used for other purposes. + + */ + ++ (NSDateFormatter *)storeableDateFormat:(NSString *)format; + +/** Test whether the database has a date formatter assigned. + + @return `YES` if there is a date formatter; `NO` if not. + + @see hasDateFormatter + @see setDateFormat: + @see dateFromString: + @see stringFromDate: + @see storeableDateFormat: + */ + +- (BOOL)hasDateFormatter; + +/** Set to a date formatter to use string dates with sqlite instead of the default UNIX timestamps. + + @param format Set to nil to use UNIX timestamps. Defaults to nil. Should be set using a formatter generated using DypayDIRSFMDatabase::storeableDateFormat. + + @see hasDateFormatter + @see setDateFormat: + @see dateFromString: + @see stringFromDate: + @see storeableDateFormat: + + @warning Note there is no direct getter for the `NSDateFormatter`, and you should not use the formatter you pass to FMDB for other purposes, as `NSDateFormatter` is not thread-safe. + */ + +- (void)setDateFormat:(NSDateFormatter *)format; + +/** Convert the supplied NSString to NSDate, using the current database formatter. + + @param s `NSString` to convert to `NSDate`. + + @return The `NSDate` object; or `nil` if no formatter is set. + + @see hasDateFormatter + @see setDateFormat: + @see dateFromString: + @see stringFromDate: + @see storeableDateFormat: + */ + +- (NSDate *)dateFromString:(NSString *)s; + +/** Convert the supplied NSDate to NSString, using the current database formatter. + + @param date `NSDate` of date to convert to `NSString`. + + @return The `NSString` representation of the date; `nil` if no formatter is set. + + @see hasDateFormatter + @see setDateFormat: + @see dateFromString: + @see stringFromDate: + @see storeableDateFormat: + */ + +- (NSString *)stringFromDate:(NSDate *)date; + +@end + + +/** Objective-C wrapper for `sqlite3_stmt` + + This is a wrapper for a SQLite `sqlite3_stmt`. Generally when using FMDB you will not need to interact directly with `DypayDIRSStatement`, but rather with `` and `` only. + + ### See also + + - `` + - `` + - [`sqlite3_stmt`](http://www.sqlite.org/c3ref/stmt.html) + */ + +@interface DypayDIRSStatement : NSObject { + void *_statement; + NSString *_query; + long _useCount; + BOOL _inUse; +} + +///----------------- +/// @name Properties +///----------------- + +/** Usage count */ + +@property (atomic, assign) long useCount; + +/** SQL statement */ + +@property (atomic, retain) NSString *query; + +/** SQLite sqlite3_stmt + + @see [`sqlite3_stmt`](http://www.sqlite.org/c3ref/stmt.html) + */ + +@property (atomic, assign) void *statement; + +/** Indication of whether the statement is in use */ + +@property (atomic, assign) BOOL inUse; + +///---------------------------- +/// @name Closing and Resetting +///---------------------------- + +/** Close statement */ + +- (void)close; + +/** Reset statement */ + +- (void)reset; + +@end + +#pragma clang diagnostic pop + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSFMDatabaseQueue.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSFMDatabaseQueue.h new file mode 100644 index 0000000..ff0d7b7 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSFMDatabaseQueue.h @@ -0,0 +1,182 @@ +// +// DypayDIRSFMDatabaseQueue.h +// fmdb +// +// Created by August Mueller on 6/22/11. +// Copyright 2011 Flying Meat Inc. All rights reserved. +// + +#import + +@class DypayDIRSFMDatabase; + +/** To perform queries and updates on multiple threads, you'll want to use `DypayDIRSFMDatabaseQueue`. + + Using a single instance of `` from multiple threads at once is a bad idea. It has always been OK to make a `` object *per thread*. Just don't share a single instance across threads, and definitely not across multiple threads at the same time. + + Instead, use `DypayDIRSFMDatabaseQueue`. Here's how to use it: + + First, make your queue. + + DypayDIRSFMDatabaseQueue *queue = [DypayDIRSFMDatabaseQueue databaseQueueWithPath:aPath]; + + Then use it like so: + + [queue inDatabase:^(DypayDIRSFMDatabase *db) { + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:1]]; + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:2]]; + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:3]]; + + DypayDIRSResultSet *rs = [db executeQuery:@"select * from foo"]; + while ([rs next]) { + //… + } + }]; + + An easy way to wrap things up in a transaction can be done like this: + + [queue inTransaction:^(DypayDIRSFMDatabase *db, BOOL *rollback) { + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:1]]; + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:2]]; + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:3]]; + + if (whoopsSomethingWrongHappened) { + *rollback = YES; + return; + } + // etc… + [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:4]]; + }]; + + `DypayDIRSFMDatabaseQueue` will run the blocks on a serialized queue (hence the name of the class). So if you call `DypayDIRSFMDatabaseQueue`'s methods from multiple threads at the same time, they will be executed in the order they are received. This way queries and updates won't step on each other's toes, and every one is happy. + + ### See also + + - `` + + @warning Do not instantiate a single `` object and use it across multiple threads. Use `DypayDIRSFMDatabaseQueue` instead. + + @warning The calls to `DypayDIRSFMDatabaseQueue`'s methods are blocking. So even though you are passing along blocks, they will **not** be run on another thread. + + */ + +@interface DypayDIRSFMDatabaseQueue : NSObject { + NSString *_path; + dispatch_queue_t _queue; + DypayDIRSFMDatabase *_db; + int _openFlags; +} + +/** Path of database */ + +@property (atomic, retain) NSString *path; + +/** Open flags */ + +@property (atomic, readonly) int openFlags; + +///---------------------------------------------------- +/// @name Initialization, opening, and closing of queue +///---------------------------------------------------- + +/** Create queue using path. + + @param aPath The file path of the database. + + @return The `DypayDIRSFMDatabaseQueue` object. `nil` on error. + */ + ++ (instancetype)databaseQueueWithPath:(NSString*)aPath; + +/** Create queue using path and specified flags. + + @param aPath The file path of the database. + @param openFlags Flags passed to the openWithFlags method of the database + + @return The `DypayDIRSFMDatabaseQueue` object. `nil` on error. + */ ++ (instancetype)databaseQueueWithPath:(NSString*)aPath flags:(int)openFlags; + +/** Create queue using path. + + @param aPath The file path of the database. + + @return The `DypayDIRSFMDatabaseQueue` object. `nil` on error. + */ + +- (instancetype)initWithPath:(NSString*)aPath; + +/** Create queue using path and specified flags. + + @param aPath The file path of the database. + @param openFlags Flags passed to the openWithFlags method of the database + + @return The `DypayDIRSFMDatabaseQueue` object. `nil` on error. + */ + +- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags; + +/** Create queue using path and specified flags. + + @param aPath The file path of the database. + @param openFlags Flags passed to the openWithFlags method of the database + @param vfsName The name of a custom virtual file system + + @return The `DypayDIRSFMDatabaseQueue` object. `nil` on error. + */ + +- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName; + +/** Returns the Class of 'DypayDIRSFMDatabase' subclass, that will be used to instantiate database object. + + Subclasses can override this method to return specified Class of 'DypayDIRSFMDatabase' subclass. + + @return The Class of 'DypayDIRSFMDatabase' subclass, that will be used to instantiate database object. + */ + ++ (Class)databaseClass; + +/** Close database used by queue. */ + +- (void)close; + +///----------------------------------------------- +/// @name Dispatching database operations to queue +///----------------------------------------------- + +/** Synchronously perform database operations on queue. + + @param block The code to be run on the queue of `DypayDIRSFMDatabaseQueue` + */ + +- (void)inDatabase:(void (^)(DypayDIRSFMDatabase *db))block; + +/** Synchronously perform database operations on queue, using transactions. + + @param block The code to be run on the queue of `DypayDIRSFMDatabaseQueue` + */ + +- (void)inTransaction:(void (^)(DypayDIRSFMDatabase *db, BOOL *rollback))block; + +/** Synchronously perform database operations on queue, using deferred transactions. + + @param block The code to be run on the queue of `DypayDIRSFMDatabaseQueue` + */ + +- (void)inDeferredTransaction:(void (^)(DypayDIRSFMDatabase *db, BOOL *rollback))block; + +///----------------------------------------------- +/// @name Dispatching database operations to queue +///----------------------------------------------- + +/** Synchronously perform database operations using save point. + + @param block The code to be run on the queue of `DypayDIRSFMDatabaseQueue` + */ + +// NOTE: you can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock. +// If you need to nest, use DypayDIRSFMDatabase's startSavePointWithName:error: instead. +- (NSError*)inSavePoint:(void (^)(DypayDIRSFMDatabase *db, BOOL *rollback))block; + +@end + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSFMResultSet.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSFMResultSet.h new file mode 100644 index 0000000..76e1505 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSFMResultSet.h @@ -0,0 +1,468 @@ +#import + +#ifndef __has_feature // Optional. +#define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif + +#ifndef NS_RETURNS_NOT_RETAINED +#if __has_feature(attribute_ns_returns_not_retained) +#define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) +#else +#define NS_RETURNS_NOT_RETAINED +#endif +#endif + +@class DypayDIRSFMDatabase; +@class DypayDIRSStatement; + +/** Represents the results of executing a query on an ``. + + ### See also + + - `` + */ + +@interface DypayDIRSResultSet : NSObject { + DypayDIRSFMDatabase *_parentDB; + DypayDIRSStatement *_statement; + + NSString *_query; + NSMutableDictionary *_columnNameToIndexMap; +} + +///----------------- +/// @name Properties +///----------------- + +/** Executed query */ + +@property (atomic, retain) NSString *query; + +/** `NSMutableDictionary` mapping column names to numeric index */ + +@property (readonly) NSMutableDictionary *columnNameToIndexMap; + +/** `DypayDIRSStatement` used by result set. */ + +@property (atomic, retain) DypayDIRSStatement *statement; + +///------------------------------------ +/// @name Creating and closing database +///------------------------------------ + +/** Create result set from `` + + @param statement A `` to be performed + + @param aDB A `` to be used + + @return A `DypayDIRSResultSet` on success; `nil` on failure + */ + ++ (instancetype)resultSetWithStatement:(DypayDIRSStatement *)statement usingParentDatabase:(DypayDIRSFMDatabase*)aDB; + +/** Close result set */ + +- (void)close; + +- (void)setParentDB:(DypayDIRSFMDatabase *)newDb; + +///--------------------------------------- +/// @name Iterating through the result set +///--------------------------------------- + +/** Retrieve next row for result set. + + You must always invoke `next` or `nextWithError` before attempting to access the values returned in a query, even if you're only expecting one. + + @return `YES` if row successfully retrieved; `NO` if end of result set reached + + @see hasAnotherRow + */ + +- (BOOL)next; + +/** Retrieve next row for result set. + + You must always invoke `next` or `nextWithError` before attempting to access the values returned in a query, even if you're only expecting one. + + @param outErr A 'NSError' object to receive any error object (if any). + + @return 'YES' if row successfully retrieved; 'NO' if end of result set reached + + @see hasAnotherRow + */ + +- (BOOL)nextWithError:(NSError **)outErr; + +/** Did the last call to `` succeed in retrieving another row? + + @return `YES` if the last call to `` succeeded in retrieving another record; `NO` if not. + + @see next + + @warning The `hasAnotherRow` method must follow a call to ``. If the previous database interaction was something other than a call to `next`, then this method may return `NO`, whether there is another row of data or not. + */ + +- (BOOL)hasAnotherRow; + +///--------------------------------------------- +/// @name Retrieving information from result set +///--------------------------------------------- + +/** How many columns in result set + + @return Integer value of the number of columns. + */ + +- (int)columnCount; + +/** Column index for column name + + @param columnName `NSString` value of the name of the column. + + @return Zero-based index for column. + */ + +- (int)columnIndexForName:(NSString*)columnName; + +/** Column name for column index + + @param columnIdx Zero-based index for column. + + @return columnName `NSString` value of the name of the column. + */ + +- (NSString*)columnNameForIndex:(int)columnIdx; + +/** Result set integer value for column. + + @param columnName `NSString` value of the name of the column. + + @return `int` value of the result set's column. + */ + +- (int)intForColumn:(NSString*)columnName; + +/** Result set integer value for column. + + @param columnIdx Zero-based index for column. + + @return `int` value of the result set's column. + */ + +- (int)intForColumnIndex:(int)columnIdx; + +/** Result set `long` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `long` value of the result set's column. + */ + +- (long)longForColumn:(NSString*)columnName; + +/** Result set long value for column. + + @param columnIdx Zero-based index for column. + + @return `long` value of the result set's column. + */ + +- (long)longForColumnIndex:(int)columnIdx; + +/** Result set `long long int` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `long long int` value of the result set's column. + */ + +- (long long int)longLongIntForColumn:(NSString*)columnName; + +/** Result set `long long int` value for column. + + @param columnIdx Zero-based index for column. + + @return `long long int` value of the result set's column. + */ + +- (long long int)longLongIntForColumnIndex:(int)columnIdx; + +/** Result set `unsigned long long int` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `unsigned long long int` value of the result set's column. + */ + +- (unsigned long long int)unsignedLongLongIntForColumn:(NSString*)columnName; + +/** Result set `unsigned long long int` value for column. + + @param columnIdx Zero-based index for column. + + @return `unsigned long long int` value of the result set's column. + */ + +- (unsigned long long int)unsignedLongLongIntForColumnIndex:(int)columnIdx; + +/** Result set `BOOL` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `BOOL` value of the result set's column. + */ + +- (BOOL)boolForColumn:(NSString*)columnName; + +/** Result set `BOOL` value for column. + + @param columnIdx Zero-based index for column. + + @return `BOOL` value of the result set's column. + */ + +- (BOOL)boolForColumnIndex:(int)columnIdx; + +/** Result set `double` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `double` value of the result set's column. + + */ + +- (double)doubleForColumn:(NSString*)columnName; + +/** Result set `double` value for column. + + @param columnIdx Zero-based index for column. + + @return `double` value of the result set's column. + + */ + +- (double)doubleForColumnIndex:(int)columnIdx; + +/** Result set `NSString` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `NSString` value of the result set's column. + + */ + +- (NSString*)stringForColumn:(NSString*)columnName; + +/** Result set `NSString` value for column. + + @param columnIdx Zero-based index for column. + + @return `NSString` value of the result set's column. + */ + +- (NSString*)stringForColumnIndex:(int)columnIdx; + +/** Result set `NSDate` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `NSDate` value of the result set's column. + */ + +- (NSDate*)dateForColumn:(NSString*)columnName; + +/** Result set `NSDate` value for column. + + @param columnIdx Zero-based index for column. + + @return `NSDate` value of the result set's column. + + */ + +- (NSDate*)dateForColumnIndex:(int)columnIdx; + +/** Result set `NSData` value for column. + + This is useful when storing binary data in table (such as image or the like). + + @param columnName `NSString` value of the name of the column. + + @return `NSData` value of the result set's column. + + */ + +- (NSData*)dataForColumn:(NSString*)columnName; + +/** Result set `NSData` value for column. + + @param columnIdx Zero-based index for column. + + @return `NSData` value of the result set's column. + */ + +- (NSData*)dataForColumnIndex:(int)columnIdx; + +/** Result set `(const unsigned char *)` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `(const unsigned char *)` value of the result set's column. + */ + +- (const unsigned char *)UTF8StringForColumnName:(NSString*)columnName; + +/** Result set `(const unsigned char *)` value for column. + + @param columnIdx Zero-based index for column. + + @return `(const unsigned char *)` value of the result set's column. + */ + +- (const unsigned char *)UTF8StringForColumnIndex:(int)columnIdx; + +/** Result set object for column. + + @param columnName `NSString` value of the name of the column. + + @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. + + @see objectForKeyedSubscript: + */ + +- (id)objectForColumnName:(NSString*)columnName; + +/** Result set object for column. + + @param columnIdx Zero-based index for column. + + @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. + + @see objectAtIndexedSubscript: + */ + +- (id)objectForColumnIndex:(int)columnIdx; + +/** Result set object for column. + + This method allows the use of the "boxed" syntax supported in Modern Objective-C. For example, by defining this method, the following syntax is now supported: + + id result = rs[@"employee_name"]; + + This simplified syntax is equivalent to calling: + + id result = [rs objectForKeyedSubscript:@"employee_name"]; + + which is, it turns out, equivalent to calling: + + id result = [rs objectForColumnName:@"employee_name"]; + + @param columnName `NSString` value of the name of the column. + + @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. + */ + +- (id)objectForKeyedSubscript:(NSString *)columnName; + +/** Result set object for column. + + This method allows the use of the "boxed" syntax supported in Modern Objective-C. For example, by defining this method, the following syntax is now supported: + + id result = rs[0]; + + This simplified syntax is equivalent to calling: + + id result = [rs objectForKeyedSubscript:0]; + + which is, it turns out, equivalent to calling: + + id result = [rs objectForColumnName:0]; + + @param columnIdx Zero-based index for column. + + @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. + */ + +- (id)objectAtIndexedSubscript:(int)columnIdx; + +/** Result set `NSData` value for column. + + @param columnName `NSString` value of the name of the column. + + @return `NSData` value of the result set's column. + + @warning If you are going to use this data after you iterate over the next row, or after you close the +result set, make sure to make a copy of the data first (or just use ``/``) +If you don't, you're going to be in a world of hurt when you try and use the data. + + */ + +- (NSData*)dataNoCopyForColumn:(NSString*)columnName NS_RETURNS_NOT_RETAINED; + +/** Result set `NSData` value for column. + + @param columnIdx Zero-based index for column. + + @return `NSData` value of the result set's column. + + @warning If you are going to use this data after you iterate over the next row, or after you close the + result set, make sure to make a copy of the data first (or just use ``/``) + If you don't, you're going to be in a world of hurt when you try and use the data. + + */ + +- (NSData*)dataNoCopyForColumnIndex:(int)columnIdx NS_RETURNS_NOT_RETAINED; + +/** Is the column `NULL`? + + @param columnIdx Zero-based index for column. + + @return `YES` if column is `NULL`; `NO` if not `NULL`. + */ + +- (BOOL)columnIndexIsNull:(int)columnIdx; + +/** Is the column `NULL`? + + @param columnName `NSString` value of the name of the column. + + @return `YES` if column is `NULL`; `NO` if not `NULL`. + */ + +- (BOOL)columnIsNull:(NSString*)columnName; + + +/** Returns a dictionary of the row results mapped to case sensitive keys of the column names. + + @returns `NSDictionary` of the row results. + + @warning The keys to the dictionary are case sensitive of the column names. + */ + +- (NSDictionary*)resultDictionary; + +/** Returns a dictionary of the row results + + @see resultDictionary + + @warning **Deprecated**: Please use `` instead. Also, beware that `` is case sensitive! + */ + +- (NSDictionary*)resultDict __attribute__ ((deprecated)); + +///----------------------------- +/// @name Key value coding magic +///----------------------------- + +/** Performs `setValue` to yield support for key value observing. + + @param object The object for which the values will be set. This is the key-value-coding compliant object that you might, for example, observe. + + */ + +- (void)kvcMagic:(id)object; + + +@end + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSGlobalTimer.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSGlobalTimer.h new file mode 100644 index 0000000..5aa0466 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSGlobalTimer.h @@ -0,0 +1,28 @@ +// +// DypayDIRSGlobalTimer.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/12. +// + +#import +#import "DypayIRISInterfaceDefines.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSGlobalTimer : NSObject + ++ (instancetype)globalTimer; + +- (void)addTimer:(id _Nullable)timer; + +- (void)removeTimer:(id _Nullable)timer; + +- (void)startTimer; + +- (void)stopTimer; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSIdentity.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSIdentity.h new file mode 100644 index 0000000..bd40904 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSIdentity.h @@ -0,0 +1,29 @@ +// +// DypayDIRSIdentity.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSIdentity : DypayDIRSBasicModule + +//for all service +@property (readonly) BOOL isIdentifierAvailable; + +@property (readonly, nullable) NSString *clientId; + +- (void)setUserIdentifiers:(NSDictionary *)IDs; + +- (void)setDeviceIdentifiers:(NSDictionary *)IDs; + +- (NSDictionary *)userIdentifiers; + +- (NSDictionary *)deviceIdentifiers; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSLogger.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSLogger.h new file mode 100644 index 0000000..b859cc9 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSLogger.h @@ -0,0 +1,32 @@ +// +// DypayDIRSLogger.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + + +@interface DypayDIRSConsoleLogger : DypayDIRSBasicModule + +@end + + +@interface DypayDIRSLogger : DypayDIRSBasicModule + +- (void)addLogger:(id)logger; + +- (void)removeLogger:(id)logger; + +- (void)removeAllLoggers; + +- (void)addLog:(id _Nonnull)log; + +- (nonnull NSString *)stringUsingDefaultFormatter:(nonnull id)log; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSMMapCache.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSMMapCache.h new file mode 100644 index 0000000..0bc5993 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSMMapCache.h @@ -0,0 +1,27 @@ +// +// DypayDIRSMMapCache.h +// DypayDataIRIS +// +// Created by ByteDance on 2024/3/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSMMapCache : NSObject + +@property (nonatomic, assign, readonly) BOOL isMapping; + +@property (nonatomic, assign, readonly, nullable) void *object; + +- (instancetype)initWithPath:(NSString *)path; + +- (BOOL)mmap:(size_t)size; + +- (void)munmap; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSModuleHive.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSModuleHive.h new file mode 100644 index 0000000..a91bffd --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSModuleHive.h @@ -0,0 +1,54 @@ +// +// DypayDIRSModuleHive.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/12. +// + +#import +#import "DypayIRISInterfaceDefines.h" +#import "DypayDIRSConcurrentCollection.h" + +NS_ASSUME_NONNULL_BEGIN + +@class DypayDIRSContext; +@interface DypayDIRSModuleHive : NSObject { + +} + +@property (nonatomic, weak) DypayDIRSContext* context; + +- (instancetype)initWithContext:(nonnull DypayDIRSContext *)context; + +- (void)resume; + +- (void)suspend; + +- (void)start; + +- (nullable id)loadUsingId:(NSString *)moduleId; + +- (nullable id)loadUsingClass:(Class)moduleClass; + +- (nullable NSArray *)loadUsingProtocol:(Protocol *)protocol; + +- (void)notify:(nonnull Protocol *)protocol + selector:(SEL)sel + arguments:(NSArray * _Nullable)arguments; + + +- (BOOL)handleURL:(nonnull NSURL *)url; + +- (void)raiseError:(nonnull NSError *)error + isFatal:(BOOL)fatal + withUserInfo:(nullable id)userInfo; + +- (nullable NSDictionary *)exportCommonParameters:(nullable NSArray *)required; + +- (nullable NSDictionary *)exportFeatureParameters; + +- (nullable NSDictionary *)exportFeatureOptions; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSNetworking.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSNetworking.h new file mode 100644 index 0000000..8213a70 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSNetworking.h @@ -0,0 +1,49 @@ +// +// DypayDIRSNetworking.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/18. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSNetworkRequestOptions: NSObject + +@property (nonatomic, assign) NSUInteger attempts; + +@property (nonatomic, assign) NSTimeInterval timeout; + +@property (nullable, nonatomic) NSArray> *compressors; + +@property (nullable, nonatomic, weak) id encryptor; + +@property (nullable, nonatomic, weak) id decryptor; + +@property (nullable, nonatomic) NSDictionary *userInfo; + +@end + + +@interface DypayDIRSNetworking : DypayDIRSBasicModule { +} + +@property (nonatomic) id provider; + +- (void)syncUsingSchema:(nonnull id)schema + header:(nullable NSDictionary *)header + body:(nullable id)body + options:(nullable id)options + completion:(void (^_Nullable)(BOOL success, id _Nullable data, id _Nullable response, NSError * _Nullable error, id _Nullable metrics))completionHandler; + +- (void)asyncUsingSchema:(nonnull id)schema + header:(nullable NSDictionary *)header + body:(nullable id)body + options:(nullable id)options + completion:(void (^_Nullable)(BOOL success, id _Nullable data, id _Nullable response, NSError * _Nullable error, id _Nullable metrics))completionHandler; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSPreStorePlugin.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSPreStorePlugin.h new file mode 100644 index 0000000..e9f887d --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSPreStorePlugin.h @@ -0,0 +1,16 @@ +// +// DypayDIRSPreStorePlugin.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/10/23. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSPreStorePlugin : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRealtimeEventPlugin.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRealtimeEventPlugin.h new file mode 100644 index 0000000..0b88a96 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRealtimeEventPlugin.h @@ -0,0 +1,16 @@ +// +// DypayDIRSRealtimeEventPlugin.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/11. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSRealtimeEventPlugin : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRemoteSettings.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRemoteSettings.h new file mode 100644 index 0000000..cbeacd4 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRemoteSettings.h @@ -0,0 +1,16 @@ +// +// DypayDIRSRemoteSettings.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/4. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSRemoteSettings : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRemoteSettingsSchema.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRemoteSettingsSchema.h new file mode 100644 index 0000000..5c64663 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRemoteSettingsSchema.h @@ -0,0 +1,16 @@ +// +// DypayDIRSRemoteSettingsSchema.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/4. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSRemoteSettingsSchema : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRequestParameters.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRequestParameters.h new file mode 100644 index 0000000..0a54034 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSRequestParameters.h @@ -0,0 +1,22 @@ +// +// DypayDIRSRequestParameters.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/8/4. +// + +#import + + +NS_ASSUME_NONNULL_BEGIN +@class DypayDIRSContext; +@interface DypayDIRSRequestParameters : NSObject + ++ (nullable NSDictionary *)commonParameters:(NSUInteger)service + context:(nonnull DypayDIRSContext *)context + fieldKeys:(nullable NSArray *)keys; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSStore.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSStore.h new file mode 100644 index 0000000..959b76e --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSStore.h @@ -0,0 +1,20 @@ +// +// DypayDIRSStore.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/13. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSStore : DypayDIRSBasicModule + +- (id)cache; + +- (_Nullable id)preferences; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSTask.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSTask.h new file mode 100644 index 0000000..2cf8913 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSTask.h @@ -0,0 +1,22 @@ +// +// DypayDIRSTask.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSTask : NSObject + ++ (void)asyncConcurrentTask:(dispatch_block_t)task; ++ (void)asyncGlobalTask:(dispatch_block_t)task; ++ (void)asyncMainTask:(dispatch_block_t)task + forContext:(id)context; ++ (dispatch_queue_t)defaultConcurrent; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSThrottlterPlugin.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSThrottlterPlugin.h new file mode 100644 index 0000000..42b3d10 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSThrottlterPlugin.h @@ -0,0 +1,16 @@ +// +// DypayDIRSThrottlterPlugin.h +// Pods +// +// Created by ByteDance on 2023/8/4. +// + +#import "DypayDIRSBasicModule.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSThrottlterPlugin : DypayDIRSBasicModule + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSTracker+Session.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSTracker+Session.h new file mode 100644 index 0000000..7ae17c3 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSTracker+Session.h @@ -0,0 +1,30 @@ +// +// DypayDIRSTracker+Session.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/9/20. +// + +#import "DypayDataIRIS.h" + +typedef NS_ENUM(NSUInteger, DypayIRISLaunchType) { + DypayIRISLaunchTypeInitialState = 0, + DypayIRISLaunchTypeUserClick, + DypayIRISLaunchTypeRemotePush, + DypayIRISLaunchTypeWidget, + DypayIRISLaunchTypeSpotlight, + DypayIRISLaunchTypeExternal, + DypayIRISLaunchTypeBackground, + DypayIRISLaunchTypeSiri, + DypayIRISLaunchTypeUserLoginChanged = 99, +}; + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSTracker (Session) + +@property (nonatomic, assign) DypayIRISLaunchType launchType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSTracker.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSTracker.h new file mode 100644 index 0000000..54f8782 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSTracker.h @@ -0,0 +1,79 @@ +// +// DypayDIRSTracker.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class DypayDIRSConfig,DypayDIRSEventUploadFilterOptions; +@interface DypayDIRSTracker : NSObject + ++ (instancetype _Nonnull)mainTracker; + ++ (instancetype _Nonnull)initMainTrackerWithConfig:(DypayDIRSConfig * _Nonnull)config; + +- (instancetype _Nonnull)initWithConfig:(DypayDIRSConfig * _Nonnull)config; + +- (BOOL)start; + +- (void)stop; + +- (void)setDeviceIdentifiers:(nonnull NSDictionary *)IDs; + +- (void)setUserIdentifiers:(nonnull NSDictionary *)IDs; + + +- (nullable NSString *)clientId; + +@end + +@interface DypayDIRSTracker (Event) + +//Default is YES; +@property (nonatomic, assign) BOOL eventTrackEnabled; + +//Default is YES; +@property (nonatomic, assign) BOOL eventUploadEnabled; + +- (void)trackEvent:(NSString * _Nonnull)key + withProperties:(NSDictionary * _Nullable)properties; + +- (void)trackJSON:(NSDictionary * _Nonnull)json + withType:(NSString * _Nonnull)type; + +- (void)addGlobalProperties:(nullable NSDictionary *)properties; + +- (void)removeGlobalPropertiesForKeys:(nullable NSArray *)keys; + +- (void)removeAllEvents; + +@end + + + +@interface DypayDIRSTracker (Enviroment) + +- (void)setAppRegion:(nullable NSString *)appRegion; + +- (void)setAppLanguage:(nullable NSString *)appLauguage; + +- (void)setEventRegion:(nullable NSString *)region; + +- (nullable NSString *)currentEventRegion; + +@end + + +@interface DypayDIRSTracker (URL) + +- (BOOL)handleURL:(nonnull NSURL *)url; + +@end + + + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSUtilities.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSUtilities.h new file mode 100644 index 0000000..ab09026 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSUtilities.h @@ -0,0 +1,32 @@ +// +// DypayDIRSUtilities.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +@interface DypayDIRSUtilities : NSObject + ++ (nonnull NSString *)rootDirectory; ++ (nullable NSString *)ensureDirectory:(nonnull NSString *)path; + +//Runtime ++ (NSString *)timeParser:(NSTimeInterval)time; ++ (NSString *)dateParser:(NSTimeInterval)time; + ++ (void)measureExecution:(void (^)(void))execution + completion:(void (^ __nullable)(NSTimeInterval interval))completion; + + +//equal + ++ (BOOL)isObject:(id)obj isEqualTo:(id)target; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSValue.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSValue.h new file mode 100644 index 0000000..2396c30 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDIRSValue.h @@ -0,0 +1,21 @@ +// +// DypayDIRSValue.h +// DypayDataIRIS +// +// Created by ByteDance on 2023/7/11. +// + +#import + +#import "DypayIRISInterfaceDefines.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface DypayDIRSValue : NSObject + +- (instancetype)initWithValue:(nullable id)object + withSource:(DypayIRISValueSource)source; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRIS.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRIS.h new file mode 100644 index 0000000..7375f9b --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRIS.h @@ -0,0 +1,17 @@ +// +// DypayDataIRIS.h +// Pods +// +// Created by ByteDance on 2023/7/12. +// + +#ifndef DypayDataIRIS_h +#define DypayDataIRIS_h + +#import "DypayIRISDefines.h" +#import "DypayDIRSConfig.h" +#import "DypayDIRSTracker.h" +#import "DypayDIRSEndpointConfiguration.h" + + +#endif /* DypayDataIRIS_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISDefaultSchema.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISDefaultSchema.h new file mode 100644 index 0000000..5446737 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISDefaultSchema.h @@ -0,0 +1,12 @@ +// +// DypayDataIRISDefaultSchema.h +// Pods +// +// Created by ByteDance on 2023/9/14. +// + +#ifndef DypayDataIRISDefaultSchema_h +#define DypayDataIRISDefaultSchema_h + + +#endif /* DypayDataIRISDefaultSchema_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISEvent.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISEvent.h new file mode 100644 index 0000000..fd3a37d --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISEvent.h @@ -0,0 +1,12 @@ +// +// DypayDataIRISEvent.h +// Pods +// +// Created by ByteDance on 2023/9/14. +// + +#ifndef DypayDataIRISEvent_h +#define DypayDataIRISEvent_h + + +#endif /* DypayDataIRISEvent_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISFMDB.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISFMDB.h new file mode 100644 index 0000000..b3b85e3 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISFMDB.h @@ -0,0 +1,12 @@ +// +// DypayDataIRISFMDB.h +// Pods +// +// Created by ByteDance on 2023/9/14. +// + +#ifndef DypayDataIRISFMDB_h +#define DypayDataIRISFMDB_h + + +#endif /* DypayDataIRISFMDB_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISRemoteSettings.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISRemoteSettings.h new file mode 100644 index 0000000..05f32bb --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISRemoteSettings.h @@ -0,0 +1,12 @@ +// +// DypayDataIRISRemoteSettings.h +// Pods +// +// Created by ByteDance on 2023/9/14. +// + +#ifndef DypayDataIRISRemoteSettings_h +#define DypayDataIRISRemoteSettings_h + + +#endif /* DypayDataIRISRemoteSettings_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISThrottlter.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISThrottlter.h new file mode 100644 index 0000000..06d6e09 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayDataIRISThrottlter.h @@ -0,0 +1,12 @@ +// +// DypayDataIRISThrottlter.h +// Pods +// +// Created by ByteDance on 2023/9/14. +// + +#ifndef DypayDataIRISThrottlter_h +#define DypayDataIRISThrottlter_h + + +#endif /* DypayDataIRISThrottlter_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISDefines.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISDefines.h new file mode 100644 index 0000000..4652c11 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISDefines.h @@ -0,0 +1,120 @@ +// +// IRSDefines.h +// +// +// Created by ByteDance on 2023/7/11. +// + +#ifndef IRSDefines_h +#define IRSDefines_h + +typedef NSString * DypayIRISParameterKey; +typedef NSString * DypayIRISOptionsKey; +typedef NSUInteger DypayIRISServiceType; + +typedef NS_ENUM(NSInteger, DypayIRISLOG_LEVEL) { + DypayIRISLOG_LEVEL_OFF = 0, + DypayIRISLOG_LEVEL_ERROR = 1, + DypayIRISLOG_LEVEL_WARN = 2, + DypayIRISLOG_LEVEL_INFO = 3, + DypayIRISLOG_LEVEL_DEBUG = 4, +}; + +typedef NS_ENUM(NSInteger, DypayIRISValueSource) { + DypayIRISValueSourceDefault = 1, + DypayIRISValueSourceLocal, + DypayIRISValueSourceRemote +}; + + +typedef NS_ENUM(NSInteger, DypayIRISEventPacketStrategy) { + DypayIRISEventPacketStrategyDefault = 0, + DypayIRISEventPacketStrategyByteLimitation = 1, +}; + + +FOUNDATION_EXPORT DypayIRISServiceType DypayIRISServiceTypeRemoteSettings; +FOUNDATION_EXPORT DypayIRISServiceType DypayIRISServiceTypeEvent; +FOUNDATION_EXPORT DypayIRISServiceType DypayIRISServiceTypeEventRealtime; + + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISBatchFilterAllowRegionListKey; + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISBatchOptionsMaxConcurrentCountKey; + + +@protocol DypayIRISLog + +@property (nonatomic) DypayIRISLOG_LEVEL level; + +@property (nonatomic) NSTimeInterval time; + +@property (nullable, nonatomic, copy) NSString * tag; + +@property (nullable, nonatomic, copy) NSString * message; + +@end + + +@protocol DypayIRISValue + +- (DypayIRISValueSource)source; + +- (nullable id)rawValue; + +- (nullable NSString *)stringValue; + +- (NSInteger)integerValue; + +- (double)doubleValue; + +- (nullable NSDictionary *)dictioanryValue; + +- (nullable NSArray *)arrayValue; + +- (BOOL)boolValue; + +@end + +@protocol DypayIRISEvent + +@property (nullable, nonatomic, copy) NSString * key; + +@property (nullable, nonatomic, copy) NSString * type; + +@property (readonly, nonatomic) NSTimeInterval time; + +@property (nonatomic, assign) int64_t index; + +@property (nullable, nonatomic, copy) NSNumber* dbIndex; + +@property (nullable, nonatomic, copy) NSString* logID; + +@property (nullable, nonatomic) NSDictionary * properties; + +@property (readonly) NSInteger dataLength; + +@property (nullable, readonly) NSString * sessionId; + +@property (nullable, readonly) id objectValue; + +@end + + + +@protocol DypayIRISEndpoint + +@optional + +- (id _Nullable)domainForService:(NSUInteger)service + context:(id _Nullable)context; + +- (id _Nullable)endpointForService:(NSUInteger)service + context:(id _Nullable)context; + +@end + + + + +#endif /* IRSDefines_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISDefinesPrivate.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISDefinesPrivate.h new file mode 100644 index 0000000..dda49f9 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISDefinesPrivate.h @@ -0,0 +1,99 @@ +// +// DypayIRISDefinesPrivate.h +// Pods +// +// Created by ByteDance on 2023/7/12. +// + +#ifndef DypayIRISDefinesPrivate_h +#define DypayIRISDefinesPrivate_h + +#import "DypayDataIRIS.h" +#import "DypayIRISInterfaceDefines.h" +#import "DypayDIRSContext.h" +#import "DypayDIRSLogger.h" +#import "DypayDIRSStore.h" +#import "DypayIRISMacro.h" +#import "IRSLOG.h" +#import "DypayDIRSEventBatchDispatcher.h" +#import "DypayDIRSNetworking.h" +#import "DypayDIRSIdentity.h" +#import "DypayDIRSExtension.h" +#import "DypayDIRSValue.h" +#import "DypayDIRSEvent.h" +#import "DypayDIRSTask.h" +#import "DypayDIRSBasicFeatureOptions.h" +#import "DypayDIRSRequestParameters.h" + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISSentryOptionsAppendCachedEventsKey; +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISSentryOptionsAggregatedKey; +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISSentryOptionsAggregationConfigurationKey; +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISSentryOptionsAggregationDimsKey; + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISEnviromentEventRegionKey; + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISBatchOptionsEnforceKey; + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISBatchOptionsEventStainedKey; + +FOUNDATION_EXPORT DypayIRISOptionsKey _Nonnull DypayIRISBatchOptionsConcurrentModeKey; + + +//append current cached events count + + + +@interface DypayDIRSComplianceConfiguration (Private) + +@property (nullable, nonatomic, weak) DypayDIRSConfig *base; + +@end + +@interface DypayDIRSEventConfiguration (Private) + +@property (nullable, nonatomic, weak) DypayDIRSConfig *base; + +@end + +@interface DypayDIRSContext (Private) + +@property (nullable, nonatomic, weak) DypayDIRSLogger *logger; + +@property (nullable, nonatomic, weak) id tracker; + +@property (nullable, nonatomic, weak) id listener; + +@property (nullable, nonatomic, weak) id sentry; + +@property (nullable, nonatomic, weak) DypayDIRSIdentity *identity; +@property (nullable, nonatomic, weak) DypayDIRSEventBatchDispatcher* dispatcher; +@property (nullable, nonatomic, weak) DypayDIRSStore *store; +@property (nullable, nonatomic, weak) DypayDIRSNetworking *networking; +@property (nullable, nonatomic, weak) DypayDIRSBasicFeatureOptions *basicFeatureOptions; + +@property (nullable, nonatomic, weak) id samplingModule; + +@end + + +@interface DypayDIRSTracker (Private) + +- (nonnull DypayDIRSContext *)context; + +@end + + +@interface DypayDIRSConfig (Private) + +- (BOOL)registerModule:(nullable Class)moduleClass; +- (void)unregisterModule:(nullable Class)moduleClass; +- (nonnull NSArray> *)registeredModules; + +- (void)disableModule:(nonnull NSString *)moduleId; +- (nonnull NSArray *)disabledModuleIds; + +- (nullable NSString *)uniqueKey; + +@end + +#endif /* DypayIRISDefinesPrivate_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISInterfaceDefines.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISInterfaceDefines.h new file mode 100644 index 0000000..5e16d8f --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISInterfaceDefines.h @@ -0,0 +1,556 @@ +// +// IRSInterfaceDefines.h +// Pods +// +// Created by ByteDance on 2023/7/11. +// + +#ifndef IRSInterfaceDefines_h +#define IRSInterfaceDefines_h + +#import "DypayIRISDefines.h" + + + + + + + + +@class DypayDIRSContext,DypayDIRSValue; + +#define DypayIRIS_MODULE_PRIORITY_HIGH 99 + +#define DypayIRIS_MODULE_PRIORITY_DEFAULT 50 + +#define DypayIRIS_MODULE_PRIORITY_LOW 0 + +#define DypayIRIS_MODULE_PRIORITY_CONFIG DypayIRIS_MODULE_PRIORITY_HIGH + 1 + +#define DypayIRIS_MODULE_PRIORITY_EVENT (DypayIRIS_MODULE_PRIORITY_DEFAULT + 1) + + +typedef NS_ENUM(NSInteger, DypayIRISState) { + DypayIRISStateDefault = 0, + DypayIRISStateRunning, + DypayIRISStateSuspending +}; + +typedef NS_ENUM(NSInteger, DypayIRISPriority) { + DypayIRISPriorityRealtime = (-99), + DypayIRISPriorityDefault = 0, + +}; + + +typedef NS_ENUM(NSInteger, DypayIRISBatchTrigger) { + DypayIRISBatchTriggerTimer = 1 << 0, //1 + DypayIRISBatchTriggerEnterBackground = 1 << 1, //2 + DypayIRISBatchTriggerRealtime = 1 << 2, //4 + DypayIRISBatchTriggerLaunch = 1 << 3, //8 + DypayIRISBatchTriggerFlush = 1 << 4, //16 +}; + +typedef NS_ENUM(NSInteger, DypayIRISEventPackResult) { + DypayIRISEventPackResultAvalible = 0, + DypayIRISEventPackResultFull = 1, + DypayIRISEventPackResultInvalid = 2 +}; + + + + +@class DypayDIRSConfig; + +@protocol DypayIRISModule + ++ (nonnull NSString *)moduleId; + ++ (nonnull NSString *)moduleVersion; + ++ (BOOL)isPlugin; + ++ (NSInteger)priority; + +@property BOOL isEnabled; +@property DypayIRISState state; +@property (nullable, readonly) DypayDIRSContext *context; + +@property (nullable, nonatomic, copy) NSString* category; + +- (instancetype _Nonnull )initWithContext:(DypayDIRSContext * _Nonnull)context; + +- (nullable dispatch_queue_t)executionQueue; + +- (void)commonInit; + +- (void)resume; + +- (void)suspend; + +@optional + ++ (nonnull NSArray *)moduleDependencies; + +- (void)waitUtilDone; + + +@end + +@protocol DypayIRISModuleGlobal + +@required ++ (nonnull instancetype)sharedInstance; + +@end + + +@protocol DypayIRISApplicationObserver + +@optional + +- (void)onApplicationDidFinishLaunching; + +- (void)onApplicationDidBecomeActive; + +- (void)onApplicationWillEnterForeground; + +- (void)onApplicationWillResignActive; + +- (void)onApplicationDidEnterBackground; + +- (void)onApplicationWillTerminate; + +- (void)onApplicationDidReceiveMemoryWarning; + +@end + +@protocol DypayIRISContextObserver + +@optional + +- (void)onFinishInitialization:(nonnull DypayDIRSContext *)context; + +- (void)onFinishLaunching:(nonnull DypayDIRSContext *)context; + +@end + + +@protocol DypayIRISIdentifierObserver + +@optional +- (void)onDeviceIdentifiersChanged:(nonnull NSDictionary *)change; + +- (void)onUserIdentifiersChanged:(nonnull NSDictionary *)change; + +- (void)onIdentifierAvailable; + +@end + +@protocol DypayIRISSessionObserver + +@optional +- (void)onSessionLaunch:(nonnull NSString *)sessionId; + +- (void)onSessionTerminate:(nonnull NSString *)sessionId; + +@end + + +@protocol DypayIRISEventSerializer + +- (nullable NSData *)dataWithEvent:(nullable id)event options:(nullable id)opt error:(NSError * _Nullable * _Nullable)error; + +- (nullable id)eventWithData:(nullable NSData *)data options:(nullable id)opt error:(NSError * _Nullable * _Nullable)error; + +- (nullable id)eventWithDictionary:(nullable NSDictionary *)dict options:(nullable id)opt error:(NSError * _Nullable * _Nullable)error; + +- (NSUInteger)encodingType; + ++ (nullable NSArray *)allowedParameterFields; + + +@end + + +@protocol DypayIRISEventStore + +- (void)addEvent:(id _Nonnull )event; + +- (void)removeEvents:(id _Nullable )batchOpts; + +- (void)queryEvents:(id _Nullable)batchOpts + usingBlock:(nonnull void (^)(BOOL finish, id _Nullable event , BOOL * _Nonnull stop))block; + +@property (nullable, nonatomic, weak) id serializer; + +@optional + +- (BOOL)startWithPath:(nonnull NSString *)path; + +- (void)reset; + +- (nullable id)executeStatement:(nonnull NSString *)sql; + +@end + + + +@protocol DypayIRISTracker + +@required + +@property (nullable, readonly) id store; + +- (void)setEnviromentVar:(nonnull id)val forKey:(nonnull NSString *)key; + +- (nullable id)enviromentVarForKey:(nonnull NSString *)key; + +- (void)trackEvent:(id _Nonnull)event; + +- (void)addGlobalProperties:(NSDictionary *_Nonnull)properties; + +- (void)removeGlobalPropertieKeys:(NSArray *_Nonnull)keys; + +- (void)removeAllEvents; + +@optional + + +- (void)addCommonParameters:(NSDictionary *_Nonnull)parameters; + +- (void)configureUsingBlock:(nonnull dispatch_block_t)block; + +@end + + + +@protocol DypayIRISEventProcedureHandler + +- (BOOL)handleProcedure:(id _Nonnull)event + withError:(NSError * _Nullable __autoreleasing *_Nullable)error; + +@end + +@protocol DypayIRISEventPreProcedureHandler + +- (BOOL)prehandleProcedure:(id _Nonnull)event + withError:(NSError * _Nullable __autoreleasing *_Nullable)error; + +@end + + +@protocol DypayIRISEventListener + +- (void)notifyEventsAccepted:(nonnull NSArray *)events + withOptions:(nullable id)opt; + +- (void)notifyEventsStored:(nonnull NSArray *)events + withOptions:(nullable id)opt;; + +- (void)notifyEventsDropped:(nonnull NSArray *)events + withOptions:(nullable id)opt + withError:(NSError *_Nullable)error; + +- (void)notifyEventsUploaded:(nonnull NSArray *)events + withOptions:(nullable id)opt; + +@end + + +@protocol DypayIRISEventObserver + +@optional + +- (void)onEventAccepted:(id _Nonnull)evt; + +- (void)onEventStored:(id _Nonnull)evt; + +- (void)onEventDropped:(id _Nonnull)evt withError:(NSError *_Nullable)error; + +- (void)onEventUploaded:(id _Nonnull)evt; + +@end + + + + +@protocol DypayIRISEventPacker + +@property (nonatomic, assign) NSUInteger maxPackLength; +@property (nonatomic, assign) NSUInteger maxEventCount; + +@property (nonatomic, assign) DypayIRISEventPacketStrategy strategy; + +- (DypayIRISEventPackResult)appendEvent:(nullable id)event; + +- (nonnull NSData *)serializedData; + +- (nonnull id)objectValue; + +- (nonnull NSArray *)eventIDs; + +- (nonnull NSArray> *)packetEvents; + +@optional + +- (void)appendCommonParameters:(nullable NSDictionary *)parameters; + +- (void)appendFeatureParameters:(nullable NSDictionary *)features; + +- (void)appendFeatureOptions:(nullable NSDictionary *)options; + +@end + +@protocol DypayIRISThrottlter + +- (void)configure:(nullable id)strategy; + +- (BOOL)allowed:(nullable id)options + reason:(NSError * _Nullable __autoreleasing *_Nullable)reason; + +- (void)setBasicInterval:(NSTimeInterval)interval; +- (NSTimeInterval)adjustedInterval; + +- (void)adjust:(nonnull id)result; + +@end + + + + +@protocol DypayIRISURLHandler + +- (BOOL)handleURL:(NSURL *_Nonnull)url; + +@end + + +@protocol DypayIRISDataCoder + +- (nonnull NSString *)algorithm; + +@optional + +- (nullable NSDictionary *)requiredHTTPHeaderFields; + +- (nullable NSDictionary *)requiredParameters; + + +- (nullable NSData *)encodedData:(NSData *_Nonnull)input + options:(nullable id)options + error:(NSError * _Nullable * _Nullable)error; + +- (nullable NSData *)decodedData:(nonnull NSData *)input + options:(nullable id)options + error:(NSError * _Nullable * _Nullable)error; + +- (uint64_t)hashUsingData:(nonnull id)input; + +- (void)setOptions:(nullable NSDictionary *)options; + + + +@end + + +@protocol DypayIRISTimer + +@required + +@property NSTimeInterval tickTime; + +- (NSTimeInterval)timerInterval; + +- (void)onTimerTick; + +@end + +@protocol DypayIRISLogger + +- (void)addLog:(nonnull id)log; + +@end + + + +@protocol DypayIRISErrorHandler + +@required +- (void)onError:(NSError *_Nonnull)error; + +@end + +@protocol DypayIRISStore + +- (nullable id)objectForKey:(NSString * _Nonnull)key; + +- (BOOL)setObject:(id _Nonnull)object + forKey:(NSString * _Nonnull)key; + +- (BOOL)removeObjectForKey:(NSString * _Nonnull)key; + +@end + + + +@protocol DypayIRISNetworkRequestOptions + +@property (nonatomic, assign) NSUInteger attempts; + +@property (nonatomic, assign) NSTimeInterval timeout; + +@property (nullable, nonatomic, strong) NSArray* compressors; + +@property (nullable, nonatomic, weak) id encryptor; + +@property (nullable, nonatomic, weak) id decryptor; + +@property (nullable, nonatomic) NSDictionary *userInfo; + +@end + + +@protocol DypayIRISNetworkProvider + +- (void)request:(nonnull NSString *)HTTPUrl + method:(nonnull NSString *)HTTPMethod + headerFields:(nonnull NSDictionary *)headerFields + body:(nullable id)body + options:(nullable id)options + completion:(nonnull void (^)(id _Nullable data, id _Nullable response, NSError * _Nullable error))completion; + +@end + + +@protocol DypayIRISServiceSchema + +- (BOOL)resultWithResponse:(nullable id)object; + +- (id _Nullable)responseObjectWithData:(nonnull NSData *)data; + +/* + * should start with '/' + */ +- (NSString *_Nonnull)HTTPPath; + +/* + * GET/POST/PUT... + */ +- (NSString * _Nonnull)HTTPMethod; + +- (nullable id)HTTPBody:(nonnull DypayDIRSContext *)context + options:(nullable id)options; + +- (NSUInteger)serviceType; + +@optional + +- (NSDictionary * _Nullable)HTTPHeaderFields; + +- (nullable NSString *)getLogID:(nonnull NSHTTPURLResponse *)response; + +- (NSString * _Nullable)enchantURL:(NSString * _Nonnull)url; + +- (nullable id)HTTPBodyPacker:(nonnull DypayDIRSContext *)context; + +@end + + + + + + +@protocol DypayIRISEventUploadExecutor + +@property (nonatomic, assign) NSTimeInterval interval; + +@property (nullable, nonatomic, weak) id serializer; + +@property (nullable, nonatomic) NSArray> *compressors; + +@property (nullable, nonatomic, weak) id encryptor; + +@property (nullable, nonatomic, weak) id decryptor; + +@property (nullable, nonatomic, weak) id eventStore; + +@property (nullable, nonatomic) id throttlter; + +@property (nonatomic, assign) DypayIRISPriority priority; + +@property (nonatomic, assign) DypayIRISState execState; + +@property (nullable, nonatomic) NSDictionary *options; + +- (void)executeUpload:(DypayIRISBatchTrigger)trigger; + +- (void)executeUpload:(DypayIRISBatchTrigger)trigger + options:(nullable NSDictionary *)options; + + +@end + + + +@protocol DypayIRISEventRealtimeHandler + +- (void)onRealtimeEventRecieved; + +@end + + +@protocol DypayIRISParameterHandler + +@optional + +- (nullable NSArray *)supportedParameterKeys; + +- (nullable id)parameterForKey:(nonnull NSString *)key; + +- (NSDictionary * _Nullable)exportParameters:(nullable NSArray *)required; + +- (NSDictionary * _Nullable)exportFeatureParameters; + +- (NSDictionary * _Nullable)exportFeatureOptions; + +@end + + + +@protocol DypayIRISConfigurationHandler + +@property (nullable, readonly) DypayDIRSValue *config; + +@optional +- (void)restore; + +@end + + + +@protocol DypayIRISConfigurationObserver + +@optional +- (void)onRemoteSettingsDidUpdate:(nonnull DypayDIRSValue *)config; + +- (void)onRealtimeSettingsDidUpdate:(nonnull DypayDIRSValue *)config; + +@end + + + +@protocol DypayIRISSentry + +//default schema +- (void)monitoring:(nonnull NSString *)key + dimensions:(nullable NSDictionary *)dimensions + options:(nullable NSDictionary *)options; + + +@end + + + + +#endif /* IRSInterfaceDefines_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISMacro.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISMacro.h new file mode 100644 index 0000000..a7f7fcb --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayIRISMacro.h @@ -0,0 +1,136 @@ +// +// DypayIRISMacro.h +// Pods +// +// Created by ByteDance on 2023/7/11. +// + +#ifndef DypayIRISMacro_h +#define DypayIRISMacro_h + +#include "metamacros.h" + + + +#define DypayIRIS_CONCAT(A, B) A##B + +#define DypayIRIS_EXPORT_MODULE(module_id, module_version) \ ++ (NSString *)moduleId { return module_id; } \ ++ (NSString *)moduleVersion { return module_version; } + +#define DypayIRIS_EXPORT_PLUGIN(module_id, module_version) \ ++ (NSString *)moduleId { return module_id; } \ ++ (NSString *)moduleVersion { return module_version; } \ ++ (BOOL)isPlugin { return YES; } + +#define DypayIRIS_EXPORT_PARAMETER(field, returnType) \ +- (returnType)DypayIRIS_CONCAT(__datairis_parameter__, field) + + + +/* + * Define SharedInstance Implementation + * + * SHARED_INSTANCE_IMPL(sharedManager) + * Equals + * + (instancetype)sharedManager {...} + */ +#undef EXPORT_SHARED_INSTANCE +#define EXPORT_SHARED_INSTANCE(sharedInstanceMethod) \ ++ (instancetype)sharedInstanceMethod \ +{ \ +static dispatch_once_t once; \ +static id __singleton__; \ +dispatch_once( &once, ^{ \ + __singleton__ = [[self alloc] init]; \ + if ([__singleton__ respondsToSelector:@selector(commonInit)]) { \ + [__singleton__ performSelector:@selector(commonInit)]; \ +}\ +}); \ +return __singleton__; \ +} \ + +/* + * Usage paired @weakify(self) & @strongify(self) + */ +#ifndef weakify +#if DEBUG +#if __has_feature(objc_arc) +#define weakify(object) autoreleasepool{} __weak __typeof__(object) weak##_##object = object; +#else +#define weakify(object) autoreleasepool{} __block __typeof__(object) block##_##object = object; +#endif +#else +#if __has_feature(objc_arc) +#define weakify(object) try{} @finally{} {} __weak __typeof__(object) weak##_##object = object; +#else +#define weakify(object) try{} @finally{} {} __block __typeof__(object) block##_##object = object; +#endif +#endif +#endif + +#ifndef strongify +#if DEBUG +#if __has_feature(objc_arc) +#define strongify(object) autoreleasepool{} __typeof__(object) object = weak##_##object; +#else +#define strongify(object) autoreleasepool{} __typeof__(object) object = block##_##object; +#endif +#else +#if __has_feature(objc_arc) +#define strongify(object) try{} @finally{} __typeof__(object) object = weak##_##object; +#else +#define strongify(object) try{} @finally{} __typeof__(object) object = block##_##object; +#endif +#endif +#endif + + + +#ifndef DypayIRIS_keywordify + +#if DEBUG +#define DypayIRIS_keywordify autoreleasepool {} +#else +#define DypayIRIS_keywordify try {} @catch (...) {} +#endif + +#endif + +/* + * + * @onExit { + //code + } + */ +#ifndef onExit +#define onExit \ +DypayIRIS_keywordify \ +__strong datairis_cleanup_t metamacro_concat(macro_exitBlock_, __LINE__) __attribute__((cleanup(datairis_executeCleanupBlock), unused)) = ^ + +typedef void (^datairis_cleanup_t)(void); +static inline void datairis_executeCleanupBlock (__strong datairis_cleanup_t *block) { + (*block)(); +} +#endif + + +/* + * { + * @lock_guard(lock) + * //mutex excution + * } + */ +#ifndef lock_guard +#define lock_guard(l) \ +DypayIRIS_keywordify \ +[l lock]; \ +@onExit { \ + [l unlock]; \ +}; +#endif + + + + +#endif /* DypayIRISMacro_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypaySDK-umbrella.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypaySDK-umbrella.h new file mode 100644 index 0000000..0852c50 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypaySDK-umbrella.h @@ -0,0 +1,74 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "DypayAPI.h" +#import "DypayDIRSApplication.h" +#import "DypayDIRSBasicFeatureOptions.h" +#import "DypayDIRSCompressionGzipPlugin.h" +#import "DypayDIRSContext.h" +#import "DypayDIRSEnviroment.h" +#import "DypayDIRSGlobalTimer.h" +#import "DypayDIRSStore.h" +#import "DypayDIRSValue.h" +#import "DypayIRISDefinesPrivate.h" +#import "DypayDIRSIdentity.h" +#import "DypayDIRSLogger.h" +#import "IRSLOG.h" +#import "DypayDIRSBasicModule.h" +#import "DypayDIRSModuleHive.h" +#import "DypayDIRSNetworking.h" +#import "DypayDIRSRequestParameters.h" +#import "DypayDataIRIS.h" +#import "DypayDIRSConfig.h" +#import "DypayDIRSEndpointConfiguration.h" +#import "DypayDIRSTracker.h" +#import "DypayDIRSConcurrentCollection.h" +#import "DypayDIRSErrorBuilder.h" +#import "DypayDIRSExtension.h" +#import "DypayDIRSMMapCache.h" +#import "DypayDIRSTask.h" +#import "DypayDIRSUtilities.h" +#import "DypayIRISInterfaceDefines.h" +#import "DypayIRISMacro.h" +#import "metamacros.h" +#import "DypayIRISDefines.h" +#import "DypayDIRSEvent.h" +#import "DypayDIRSEventBatchDispatcher.h" +#import "DypayDIRSEventBatchExecutor.h" +#import "DypayDIRSEventEntry.h" +#import "DypayDIRSEventListener.h" +#import "DypayDataIRISEvent.h" +#import "DypayDIRSEventBlockPlugin.h" +#import "DypayDIRSEventPacker.h" +#import "DypayDIRSEventRequestSchema.h" +#import "DypayDIRSEventSerializer.h" +#import "DypayDataIRISDefaultSchema.h" +#import "DIRSFMDB.h" +#import "DypayDIRSEventStore.h" +#import "DypayDIRSFMDatabase.h" +#import "DypayDIRSFMDatabaseQueue.h" +#import "DypayDIRSFMResultSet.h" +#import "DypayDIRSPreStorePlugin.h" +#import "DypayDataIRISFMDB.h" +#import "DypayDIRSEventSession.h" +#import "DypayDIRSTracker+Session.h" +#import "DypayDIRSRealtimeEventPlugin.h" +#import "DypayDIRSRemoteSettings.h" +#import "DypayDataIRISRemoteSettings.h" +#import "DypayDIRSRemoteSettingsSchema.h" +#import "DypayDIRSThrottlterPlugin.h" +#import "DypayDataIRISThrottlter.h" +#import "DypayTrackerManager.h" + +FOUNDATION_EXPORT double DypaySDKVersionNumber; +FOUNDATION_EXPORT const unsigned char DypaySDKVersionString[]; + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayTrackerManager.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayTrackerManager.h new file mode 100644 index 0000000..e0bd6c6 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/DypayTrackerManager.h @@ -0,0 +1,24 @@ +// +// DypayTrackerManager.h +// DypaySDK-CJPaySandBox +// +// Created by shanghuaijun on 2024/12/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class DypayDIRSTracker; +@interface DypayTrackerManager : NSObject + +@property (nonatomic, strong, readonly) DypayDIRSTracker *tracker; + ++ (instancetype)defaultService; + ++ (void)initConfig; + ++ (void)event:(NSString *_Nonnull)eventName params:(NSDictionary *_Nullable)params; + +@end + +NS_ASSUME_NONNULL_END diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/IRSLOG.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/IRSLOG.h new file mode 100644 index 0000000..ca61a59 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/IRSLOG.h @@ -0,0 +1,51 @@ +// +// IRSLOG.h +// Pods +// +// Created by ByteDance on 2023/7/11. +// + +#ifndef IRSLOG_h +#define IRSLOG_h + + +#ifdef __OBJC__ + +extern void datairis_log_oc(int level, id ctx, NSString *tag, NSString *,...); +#undef LOG_MACRO +#define LOG_MACRO(flag,ctx,tag,fmt,...) \ +if (ctx && ctx.config && ctx.config.logLevel >= flag) { \ + datairis_log_oc(flag, ctx, tag, fmt, ##__VA_ARGS__); \ +} + + +#endif + +#ifdef DypayIRIS_MINIMUM_VERSION + +#define LOG_DEBUG + +#define LOG_INFO + +#define LOG_WARN + +#else + +#undef LOG_DEBUG +#define LOG_DEBUG(ctx, tag, fmt, ...) LOG_MACRO(4 ,ctx, tag, fmt, ##__VA_ARGS__) +//#define LOG_DEBUG(ctx, tag, fmt, ...) + +#undef LOG_INFO +#define LOG_INFO(ctx, tag, fmt, ...) LOG_MACRO(3 ,ctx, tag, fmt, ##__VA_ARGS__) +//#define LOG_INFO(ctx, tag, fmt, ...) + +#undef LOG_WARN +#define LOG_WARN(ctx, tag, fmt, ...) LOG_MACRO(2 ,ctx, tag, fmt, ##__VA_ARGS__) + +#endif + +#undef LOG_ERROR +#define LOG_ERROR(ctx, tag, fmt, ...) LOG_MACRO(1 ,ctx, tag, fmt, ##__VA_ARGS__) + + +#endif /* IRSLOG_h */ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/metamacros.h b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/metamacros.h new file mode 100644 index 0000000..48665bc --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Headers/metamacros.h @@ -0,0 +1,669 @@ +/** + * Macros for metaprogramming + * ExtendedC + * + * Copyright (C) 2012 Justin Spahr-Summers + * Released under the MIT license + */ + +#ifndef EXTC_METAMACROS_H +#define EXTC_METAMACROS_H + + +/** + * Executes one or more expressions (which may have a void type, such as a call + * to a function that returns no value) and always returns true. + */ +#define metamacro_exprify(...) \ +((__VA_ARGS__), true) + +/** + * Returns a string representation of VALUE after full macro expansion. + */ +#define metamacro_stringify(VALUE) \ +metamacro_stringify_(VALUE) + +/** + * Returns A and B concatenated after full macro expansion. + */ +#define metamacro_concat(A, B) \ +metamacro_concat_(A, B) + +/** + * Returns the Nth variadic argument (starting from zero). At least + * N + 1 variadic arguments must be given. N must be between zero and twenty, + * inclusive. + */ +#define metamacro_at(N, ...) \ +metamacro_concat(metamacro_at, N)(__VA_ARGS__) + +/** + * Returns the number of arguments (up to twenty) provided to the macro. At + * least one argument must be provided. + * + * Inspired by P99: http://p99.gforge.inria.fr + */ +#define metamacro_argcount(...) \ +metamacro_at(20, __VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) + +/** + * Identical to #metamacro_foreach_cxt, except that no CONTEXT argument is + * given. Only the index and current argument will thus be passed to MACRO. + */ +#define metamacro_foreach(MACRO, SEP, ...) \ +metamacro_foreach_cxt(metamacro_foreach_iter, SEP, MACRO, __VA_ARGS__) + +/** + * For each consecutive variadic argument (up to twenty), MACRO is passed the + * zero-based index of the current argument, CONTEXT, and then the argument + * itself. The results of adjoining invocations of MACRO are then separated by + * SEP. + * + * Inspired by P99: http://p99.gforge.inria.fr + */ +#define metamacro_foreach_cxt(MACRO, SEP, CONTEXT, ...) \ +metamacro_concat(metamacro_foreach_cxt, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) + +/** + * Identical to #metamacro_foreach_cxt. This can be used when the former would + * fail due to recursive macro expansion. + */ +#define metamacro_foreach_cxt_recursive(MACRO, SEP, CONTEXT, ...) \ +metamacro_concat(metamacro_foreach_cxt_recursive, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) + +/** + * In consecutive order, appends each variadic argument (up to twenty) onto + * BASE. The resulting concatenations are then separated by SEP. + * + * This is primarily useful to manipulate a list of macro invocations into instead + * invoking a different, possibly related macro. + */ +#define metamacro_foreach_concat(BASE, SEP, ...) \ +metamacro_foreach_cxt(metamacro_foreach_concat_iter, SEP, BASE, __VA_ARGS__) + +/** + * Iterates COUNT times, each time invoking MACRO with the current index + * (starting at zero) and CONTEXT. The results of adjoining invocations of MACRO + * are then separated by SEP. + * + * COUNT must be an integer between zero and twenty, inclusive. + */ +#define metamacro_for_cxt(COUNT, MACRO, SEP, CONTEXT) \ +metamacro_concat(metamacro_for_cxt, COUNT)(MACRO, SEP, CONTEXT) + +/** + * Returns the first argument given. At least one argument must be provided. + * + * This is useful when implementing a variadic macro, where you may have only + * one variadic argument, but no way to retrieve it (for example, because \c ... + * always needs to match at least one argument). + * + * @code + + #define varmacro(...) \ + metamacro_head(__VA_ARGS__) + + * @endcode + */ +#define metamacro_head(...) \ +metamacro_head_(__VA_ARGS__, 0) + +/** + * Returns every argument except the first. At least two arguments must be + * provided. + */ +#define metamacro_tail(...) \ +metamacro_tail_(__VA_ARGS__) + +/** + * Returns the first N (up to twenty) variadic arguments as a new argument list. + * At least N variadic arguments must be provided. + */ +#define metamacro_take(N, ...) \ +metamacro_concat(metamacro_take, N)(__VA_ARGS__) + +/** + * Removes the first N (up to twenty) variadic arguments from the given argument + * list. At least N variadic arguments must be provided. + */ +#define metamacro_drop(N, ...) \ +metamacro_concat(metamacro_drop, N)(__VA_ARGS__) + +/** + * Decrements VAL, which must be a number between zero and twenty, inclusive. + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_dec(VAL) \ +metamacro_at(VAL, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) + +/** + * Increments VAL, which must be a number between zero and twenty, inclusive. + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_inc(VAL) \ +metamacro_at(VAL, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) + +/** + * If A is equal to B, the next argument list is expanded; otherwise, the + * argument list after that is expanded. A and B must be numbers between zero + * and twenty, inclusive. Additionally, B must be greater than or equal to A. + * + * @code + + // expands to true + metamacro_if_eq(0, 0)(true)(false) + + // expands to false + metamacro_if_eq(0, 1)(true)(false) + + * @endcode + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_if_eq(A, B) \ +metamacro_concat(metamacro_if_eq, A)(B) + +/** + * Identical to #metamacro_if_eq. This can be used when the former would fail + * due to recursive macro expansion. + */ +#define metamacro_if_eq_recursive(A, B) \ +metamacro_concat(metamacro_if_eq_recursive, A)(B) + +/** + * Returns 1 if N is an even number, or 0 otherwise. N must be between zero and + * twenty, inclusive. + * + * For the purposes of this test, zero is considered even. + */ +#define metamacro_is_even(N) \ +metamacro_at(N, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1) + +/** + * Returns the logical NOT of B, which must be the number zero or one. + */ +#define metamacro_not(B) \ +metamacro_at(B, 1, 0) + +// IMPLEMENTATION DETAILS FOLLOW! +// Do not write code that depends on anything below this line. +#define metamacro_stringify_(VALUE) # VALUE +#define metamacro_concat_(A, B) A ## B +#define metamacro_foreach_iter(INDEX, MACRO, ARG) MACRO(INDEX, ARG) +#define metamacro_head_(FIRST, ...) FIRST +#define metamacro_tail_(FIRST, ...) __VA_ARGS__ +#define metamacro_consume_(...) +#define metamacro_expand_(...) __VA_ARGS__ + +// implemented from scratch so that metamacro_concat() doesn't end up nesting +#define metamacro_foreach_concat_iter(INDEX, BASE, ARG) metamacro_foreach_concat_iter_(BASE, ARG) +#define metamacro_foreach_concat_iter_(BASE, ARG) BASE ## ARG + +// metamacro_at expansions +#define metamacro_at0(...) metamacro_head(__VA_ARGS__) +#define metamacro_at1(_0, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at2(_0, _1, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at3(_0, _1, _2, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at4(_0, _1, _2, _3, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at5(_0, _1, _2, _3, _4, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at6(_0, _1, _2, _3, _4, _5, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at7(_0, _1, _2, _3, _4, _5, _6, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at8(_0, _1, _2, _3, _4, _5, _6, _7, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at9(_0, _1, _2, _3, _4, _5, _6, _7, _8, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at10(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at11(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at12(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at13(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at14(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at15(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at17(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at18(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at19(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at20(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, ...) metamacro_head(__VA_ARGS__) + +// metamacro_foreach_cxt expansions +#define metamacro_foreach_cxt0(MACRO, SEP, CONTEXT) +#define metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) + +#define metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ +metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) \ +SEP \ +MACRO(1, CONTEXT, _1) + +#define metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ +metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ +SEP \ +MACRO(2, CONTEXT, _2) + +#define metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ +metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ +SEP \ +MACRO(3, CONTEXT, _3) + +#define metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ +metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ +SEP \ +MACRO(4, CONTEXT, _4) + +#define metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ +metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ +SEP \ +MACRO(5, CONTEXT, _5) + +#define metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ +metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ +SEP \ +MACRO(6, CONTEXT, _6) + +#define metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ +metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ +SEP \ +MACRO(7, CONTEXT, _7) + +#define metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ +metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ +SEP \ +MACRO(8, CONTEXT, _8) + +#define metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ +metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ +SEP \ +MACRO(9, CONTEXT, _9) + +#define metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ +metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ +SEP \ +MACRO(10, CONTEXT, _10) + +#define metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ +metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ +SEP \ +MACRO(11, CONTEXT, _11) + +#define metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ +metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ +SEP \ +MACRO(12, CONTEXT, _12) + +#define metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ +metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ +SEP \ +MACRO(13, CONTEXT, _13) + +#define metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ +metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ +SEP \ +MACRO(14, CONTEXT, _14) + +#define metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ +metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ +SEP \ +MACRO(15, CONTEXT, _15) + +#define metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ +metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ +SEP \ +MACRO(16, CONTEXT, _16) + +#define metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ +metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ +SEP \ +MACRO(17, CONTEXT, _17) + +#define metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ +metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ +SEP \ +MACRO(18, CONTEXT, _18) + +#define metamacro_foreach_cxt20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ +metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ +SEP \ +MACRO(19, CONTEXT, _19) + +// metamacro_foreach_cxt_recursive expansions +#define metamacro_foreach_cxt_recursive0(MACRO, SEP, CONTEXT) +#define metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) + +#define metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ +metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) \ +SEP \ +MACRO(1, CONTEXT, _1) + +#define metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ +metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ +SEP \ +MACRO(2, CONTEXT, _2) + +#define metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ +metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ +SEP \ +MACRO(3, CONTEXT, _3) + +#define metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ +metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ +SEP \ +MACRO(4, CONTEXT, _4) + +#define metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ +metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ +SEP \ +MACRO(5, CONTEXT, _5) + +#define metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ +metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ +SEP \ +MACRO(6, CONTEXT, _6) + +#define metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ +metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ +SEP \ +MACRO(7, CONTEXT, _7) + +#define metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ +metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ +SEP \ +MACRO(8, CONTEXT, _8) + +#define metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ +metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ +SEP \ +MACRO(9, CONTEXT, _9) + +#define metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ +metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ +SEP \ +MACRO(10, CONTEXT, _10) + +#define metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ +metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ +SEP \ +MACRO(11, CONTEXT, _11) + +#define metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ +metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ +SEP \ +MACRO(12, CONTEXT, _12) + +#define metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ +metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ +SEP \ +MACRO(13, CONTEXT, _13) + +#define metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ +metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ +SEP \ +MACRO(14, CONTEXT, _14) + +#define metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ +metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ +SEP \ +MACRO(15, CONTEXT, _15) + +#define metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ +metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ +SEP \ +MACRO(16, CONTEXT, _16) + +#define metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ +metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ +SEP \ +MACRO(17, CONTEXT, _17) + +#define metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ +metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ +SEP \ +MACRO(18, CONTEXT, _18) + +#define metamacro_foreach_cxt_recursive20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ +metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ +SEP \ +MACRO(19, CONTEXT, _19) + +// metamacro_for_cxt expansions +#define metamacro_for_cxt0(MACRO, SEP, CONTEXT) +#define metamacro_for_cxt1(MACRO, SEP, CONTEXT) MACRO(0, CONTEXT) + +#define metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt1(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(1, CONTEXT) + +#define metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(2, CONTEXT) + +#define metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(3, CONTEXT) + +#define metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(4, CONTEXT) + +#define metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(5, CONTEXT) + +#define metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(6, CONTEXT) + +#define metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(7, CONTEXT) + +#define metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(8, CONTEXT) + +#define metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(9, CONTEXT) + +#define metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(10, CONTEXT) + +#define metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(11, CONTEXT) + +#define metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(12, CONTEXT) + +#define metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(13, CONTEXT) + +#define metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(14, CONTEXT) + +#define metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(15, CONTEXT) + +#define metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(16, CONTEXT) + +#define metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(17, CONTEXT) + +#define metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(18, CONTEXT) + +#define metamacro_for_cxt20(MACRO, SEP, CONTEXT) \ +metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ +SEP \ +MACRO(19, CONTEXT) + +// metamacro_if_eq expansions +#define metamacro_if_eq0(VALUE) \ +metamacro_concat(metamacro_if_eq0_, VALUE) + +#define metamacro_if_eq0_0(...) __VA_ARGS__ metamacro_consume_ +#define metamacro_if_eq0_1(...) metamacro_expand_ +#define metamacro_if_eq0_2(...) metamacro_expand_ +#define metamacro_if_eq0_3(...) metamacro_expand_ +#define metamacro_if_eq0_4(...) metamacro_expand_ +#define metamacro_if_eq0_5(...) metamacro_expand_ +#define metamacro_if_eq0_6(...) metamacro_expand_ +#define metamacro_if_eq0_7(...) metamacro_expand_ +#define metamacro_if_eq0_8(...) metamacro_expand_ +#define metamacro_if_eq0_9(...) metamacro_expand_ +#define metamacro_if_eq0_10(...) metamacro_expand_ +#define metamacro_if_eq0_11(...) metamacro_expand_ +#define metamacro_if_eq0_12(...) metamacro_expand_ +#define metamacro_if_eq0_13(...) metamacro_expand_ +#define metamacro_if_eq0_14(...) metamacro_expand_ +#define metamacro_if_eq0_15(...) metamacro_expand_ +#define metamacro_if_eq0_16(...) metamacro_expand_ +#define metamacro_if_eq0_17(...) metamacro_expand_ +#define metamacro_if_eq0_18(...) metamacro_expand_ +#define metamacro_if_eq0_19(...) metamacro_expand_ +#define metamacro_if_eq0_20(...) metamacro_expand_ + +#define metamacro_if_eq1(VALUE) metamacro_if_eq0(metamacro_dec(VALUE)) +#define metamacro_if_eq2(VALUE) metamacro_if_eq1(metamacro_dec(VALUE)) +#define metamacro_if_eq3(VALUE) metamacro_if_eq2(metamacro_dec(VALUE)) +#define metamacro_if_eq4(VALUE) metamacro_if_eq3(metamacro_dec(VALUE)) +#define metamacro_if_eq5(VALUE) metamacro_if_eq4(metamacro_dec(VALUE)) +#define metamacro_if_eq6(VALUE) metamacro_if_eq5(metamacro_dec(VALUE)) +#define metamacro_if_eq7(VALUE) metamacro_if_eq6(metamacro_dec(VALUE)) +#define metamacro_if_eq8(VALUE) metamacro_if_eq7(metamacro_dec(VALUE)) +#define metamacro_if_eq9(VALUE) metamacro_if_eq8(metamacro_dec(VALUE)) +#define metamacro_if_eq10(VALUE) metamacro_if_eq9(metamacro_dec(VALUE)) +#define metamacro_if_eq11(VALUE) metamacro_if_eq10(metamacro_dec(VALUE)) +#define metamacro_if_eq12(VALUE) metamacro_if_eq11(metamacro_dec(VALUE)) +#define metamacro_if_eq13(VALUE) metamacro_if_eq12(metamacro_dec(VALUE)) +#define metamacro_if_eq14(VALUE) metamacro_if_eq13(metamacro_dec(VALUE)) +#define metamacro_if_eq15(VALUE) metamacro_if_eq14(metamacro_dec(VALUE)) +#define metamacro_if_eq16(VALUE) metamacro_if_eq15(metamacro_dec(VALUE)) +#define metamacro_if_eq17(VALUE) metamacro_if_eq16(metamacro_dec(VALUE)) +#define metamacro_if_eq18(VALUE) metamacro_if_eq17(metamacro_dec(VALUE)) +#define metamacro_if_eq19(VALUE) metamacro_if_eq18(metamacro_dec(VALUE)) +#define metamacro_if_eq20(VALUE) metamacro_if_eq19(metamacro_dec(VALUE)) + +// metamacro_if_eq_recursive expansions +#define metamacro_if_eq_recursive0(VALUE) \ +metamacro_concat(metamacro_if_eq_recursive0_, VALUE) + +#define metamacro_if_eq_recursive0_0(...) __VA_ARGS__ metamacro_consume_ +#define metamacro_if_eq_recursive0_1(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_2(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_3(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_4(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_5(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_6(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_7(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_8(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_9(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_10(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_11(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_12(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_13(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_14(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_15(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_16(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_17(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_18(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_19(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_20(...) metamacro_expand_ + +#define metamacro_if_eq_recursive1(VALUE) metamacro_if_eq_recursive0(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive2(VALUE) metamacro_if_eq_recursive1(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive3(VALUE) metamacro_if_eq_recursive2(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive4(VALUE) metamacro_if_eq_recursive3(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive5(VALUE) metamacro_if_eq_recursive4(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive6(VALUE) metamacro_if_eq_recursive5(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive7(VALUE) metamacro_if_eq_recursive6(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive8(VALUE) metamacro_if_eq_recursive7(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive9(VALUE) metamacro_if_eq_recursive8(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive10(VALUE) metamacro_if_eq_recursive9(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive11(VALUE) metamacro_if_eq_recursive10(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive12(VALUE) metamacro_if_eq_recursive11(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive13(VALUE) metamacro_if_eq_recursive12(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive14(VALUE) metamacro_if_eq_recursive13(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive15(VALUE) metamacro_if_eq_recursive14(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive16(VALUE) metamacro_if_eq_recursive15(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive17(VALUE) metamacro_if_eq_recursive16(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive18(VALUE) metamacro_if_eq_recursive17(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive19(VALUE) metamacro_if_eq_recursive18(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive20(VALUE) metamacro_if_eq_recursive19(metamacro_dec(VALUE)) + +// metamacro_take expansions +#define metamacro_take0(...) +#define metamacro_take1(...) metamacro_head(__VA_ARGS__) +#define metamacro_take2(...) metamacro_head(__VA_ARGS__), metamacro_take1(metamacro_tail(__VA_ARGS__)) +#define metamacro_take3(...) metamacro_head(__VA_ARGS__), metamacro_take2(metamacro_tail(__VA_ARGS__)) +#define metamacro_take4(...) metamacro_head(__VA_ARGS__), metamacro_take3(metamacro_tail(__VA_ARGS__)) +#define metamacro_take5(...) metamacro_head(__VA_ARGS__), metamacro_take4(metamacro_tail(__VA_ARGS__)) +#define metamacro_take6(...) metamacro_head(__VA_ARGS__), metamacro_take5(metamacro_tail(__VA_ARGS__)) +#define metamacro_take7(...) metamacro_head(__VA_ARGS__), metamacro_take6(metamacro_tail(__VA_ARGS__)) +#define metamacro_take8(...) metamacro_head(__VA_ARGS__), metamacro_take7(metamacro_tail(__VA_ARGS__)) +#define metamacro_take9(...) metamacro_head(__VA_ARGS__), metamacro_take8(metamacro_tail(__VA_ARGS__)) +#define metamacro_take10(...) metamacro_head(__VA_ARGS__), metamacro_take9(metamacro_tail(__VA_ARGS__)) +#define metamacro_take11(...) metamacro_head(__VA_ARGS__), metamacro_take10(metamacro_tail(__VA_ARGS__)) +#define metamacro_take12(...) metamacro_head(__VA_ARGS__), metamacro_take11(metamacro_tail(__VA_ARGS__)) +#define metamacro_take13(...) metamacro_head(__VA_ARGS__), metamacro_take12(metamacro_tail(__VA_ARGS__)) +#define metamacro_take14(...) metamacro_head(__VA_ARGS__), metamacro_take13(metamacro_tail(__VA_ARGS__)) +#define metamacro_take15(...) metamacro_head(__VA_ARGS__), metamacro_take14(metamacro_tail(__VA_ARGS__)) +#define metamacro_take16(...) metamacro_head(__VA_ARGS__), metamacro_take15(metamacro_tail(__VA_ARGS__)) +#define metamacro_take17(...) metamacro_head(__VA_ARGS__), metamacro_take16(metamacro_tail(__VA_ARGS__)) +#define metamacro_take18(...) metamacro_head(__VA_ARGS__), metamacro_take17(metamacro_tail(__VA_ARGS__)) +#define metamacro_take19(...) metamacro_head(__VA_ARGS__), metamacro_take18(metamacro_tail(__VA_ARGS__)) +#define metamacro_take20(...) metamacro_head(__VA_ARGS__), metamacro_take19(metamacro_tail(__VA_ARGS__)) + +// metamacro_drop expansions +#define metamacro_drop0(...) __VA_ARGS__ +#define metamacro_drop1(...) metamacro_tail(__VA_ARGS__) +#define metamacro_drop2(...) metamacro_drop1(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop3(...) metamacro_drop2(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop4(...) metamacro_drop3(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop5(...) metamacro_drop4(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop6(...) metamacro_drop5(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop7(...) metamacro_drop6(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop8(...) metamacro_drop7(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop9(...) metamacro_drop8(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop10(...) metamacro_drop9(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop11(...) metamacro_drop10(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop12(...) metamacro_drop11(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop13(...) metamacro_drop12(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop14(...) metamacro_drop13(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop15(...) metamacro_drop14(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop16(...) metamacro_drop15(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop17(...) metamacro_drop16(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop18(...) metamacro_drop17(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop19(...) metamacro_drop18(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop20(...) metamacro_drop19(metamacro_tail(__VA_ARGS__)) + +#endif + + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Info.plist b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Info.plist new file mode 100644 index 0000000..a2f0a7b Binary files /dev/null and b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Info.plist differ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Modules/module.modulemap b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Modules/module.modulemap new file mode 100644 index 0000000..9e1332b --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module DypaySDK { + umbrella header "DypaySDK-umbrella.h" + + export * + module * { export * } +} diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeDirectory b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..ae152f7 Binary files /dev/null and b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeDirectory differ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeRequirements b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..dbf9d61 Binary files /dev/null and b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeRequirements differ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeRequirements-1 b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 0000000..107fe3f Binary files /dev/null and b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeResources b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..37951ae --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeResources @@ -0,0 +1,1002 @@ + + + + + files + + Headers/DIRSFMDB.h + + kgwjZrevP7rOv8arUTUGH4Q8Hvo= + + Headers/DypayAPI.h + + aQBAQkd1z34vLFZvYKtBqNw3awM= + + Headers/DypayDIRSApplication.h + + I3cxoIezeeN+e6lwDKaU4P5O3z0= + + Headers/DypayDIRSBasicFeatureOptions.h + + CravyaW9l4INozOWdyfWtDoVOIA= + + Headers/DypayDIRSBasicModule.h + + PHu5ixETQckMyF4TSOid9ZWBgTY= + + Headers/DypayDIRSCompressionGzipPlugin.h + + ccNBjeiyJYIMGCFwiQLVr5HIUBI= + + Headers/DypayDIRSConcurrentCollection.h + + g9/6bUHO1GSbMKQNvWRYUXllWA8= + + Headers/DypayDIRSConfig.h + + UEc3j6MsqyXN7bYr4NjRLpbO65A= + + Headers/DypayDIRSContext.h + + TV0Wbsi4Cct2ac6etaN3VV+Yq/Y= + + Headers/DypayDIRSEndpointConfiguration.h + + 24KbpmUXk93sv5Uv9SuJq9r2XMI= + + Headers/DypayDIRSEnviroment.h + + fRCpa9Kg4cHuO+JhMUB1+i84XRM= + + Headers/DypayDIRSErrorBuilder.h + + sIpvM9R7RYEDxGqXTAJcKGDtHzo= + + Headers/DypayDIRSEvent.h + + brDlMdnRm9LbWi/H7aWumXkucWI= + + Headers/DypayDIRSEventBatchDispatcher.h + + S2bO1gCnvXL+fG5/Avrn3OPDoyI= + + Headers/DypayDIRSEventBatchExecutor.h + + dILCmVYXUMzsT/ge9nkpEgkrn/8= + + Headers/DypayDIRSEventBlockPlugin.h + + oVtn+a2/hxGA+JSkR+icbhI2mBQ= + + Headers/DypayDIRSEventEntry.h + + EeiHvY4o825SNPlDtZ61ehwP0mE= + + Headers/DypayDIRSEventListener.h + + sYPwglitcHzPUxpSlfnLZdjHp/M= + + Headers/DypayDIRSEventPacker.h + + rCnw0RHtF64PKrhGRAZg8ITOLds= + + Headers/DypayDIRSEventRequestSchema.h + + mYBQvF7CUGIT78DZx8LiGS4qeuU= + + Headers/DypayDIRSEventSerializer.h + + 249oz4U6N98VljRbOKm37+g9qQM= + + Headers/DypayDIRSEventSession.h + + xWeddAyOdDuJzBOUCGnT+GNmCDU= + + Headers/DypayDIRSEventStore.h + + QDPCAmHMAAhB+o9m17OcHsfvEnI= + + Headers/DypayDIRSExtension.h + + QjpK2NJk5Lk31blvA+EcrmtRWYo= + + Headers/DypayDIRSFMDatabase.h + + S0KOpEn16RCg87jCGhaIuMYudug= + + Headers/DypayDIRSFMDatabaseQueue.h + + UfffgoEsM9wer44EilEFNVH9N8o= + + Headers/DypayDIRSFMResultSet.h + + EJayAzMA4jhdYLhN2BGJxv2PFJM= + + Headers/DypayDIRSGlobalTimer.h + + 1wvhQaNKm/0K2QSnGagKEETBl0w= + + Headers/DypayDIRSIdentity.h + + hyKhZ92l5Ffj0j/r1OEQ4Dm4WEI= + + Headers/DypayDIRSLogger.h + + KlsbyPVVcMzVbS1iYMWws8Zq4dc= + + Headers/DypayDIRSMMapCache.h + + dUIi2Uoj6r+H3gK2KCX7cMWq5wU= + + Headers/DypayDIRSModuleHive.h + + fih8YbZS4kNcZMaxD+o4V1+YOd0= + + Headers/DypayDIRSNetworking.h + + 0+r2WJA/Tn/JLjPKCQOmqq45VoI= + + Headers/DypayDIRSPreStorePlugin.h + + NabLzACPAcTa1aR6Tjjbrcpnl5g= + + Headers/DypayDIRSRealtimeEventPlugin.h + + dd+gpG4d8RrbIx41JoUskD2DlCQ= + + Headers/DypayDIRSRemoteSettings.h + + rBL1CyKGP8b03xmRBbgt2Fvq9kg= + + Headers/DypayDIRSRemoteSettingsSchema.h + + fYiLfkDjdQAjrqpfYA6lxytBJQg= + + Headers/DypayDIRSRequestParameters.h + + mHhCZbXBqbRwkkqeEEnU/v4n5fQ= + + Headers/DypayDIRSStore.h + + 7oaKaM13Cw1dez9OT7GCo6eBUtI= + + Headers/DypayDIRSTask.h + + ffQ88u6gbbVOISYD/eOMPOnON7k= + + Headers/DypayDIRSThrottlterPlugin.h + + +qryICFAn/VcSFJLgfOT19dDCo4= + + Headers/DypayDIRSTracker+Session.h + + hiPODLF9wwVcEyy4gZvGqArAe6c= + + Headers/DypayDIRSTracker.h + + YX3GHz2RMYYhyS396R6E2SVGMA8= + + Headers/DypayDIRSUtilities.h + + FL5/gFUM1yeyfS8UU6j2hn/+MUs= + + Headers/DypayDIRSValue.h + + uLvAWU6rVVhbUV6RJnbKGMsoaWc= + + Headers/DypayDataIRIS.h + + SIJD04CbJUpza3QCjjlL93kMoPE= + + Headers/DypayDataIRISDefaultSchema.h + + GrY/4GX4pzJ58NDYJOz5mA6hyHg= + + Headers/DypayDataIRISEvent.h + + GFRPJjShBglZIYAqtvOaUHqr1dY= + + Headers/DypayDataIRISFMDB.h + + mB5uIgFihrVpwgX6My0jsqjTat0= + + Headers/DypayDataIRISRemoteSettings.h + + 4pA8IM5LK9J0LpZXC+j+EmeejPU= + + Headers/DypayDataIRISThrottlter.h + + GdsMIv4Fhdx5GW3jbDtRGRK9Cag= + + Headers/DypayIRISDefines.h + + g7pDc7TzT1Mrt964er53xyCtEyQ= + + Headers/DypayIRISDefinesPrivate.h + + DcI4aQKwwKvpT3iFHaZqHvghIJM= + + Headers/DypayIRISInterfaceDefines.h + + 4rABbkDnOwdPOh2ghvJo9XGegM4= + + Headers/DypayIRISMacro.h + + ++TLP1nwLHIEiKsrmiDrRp/h1Mc= + + Headers/DypaySDK-umbrella.h + + TjzdtwjkANhHuhvG3yHzy4SzIDs= + + Headers/DypayTrackerManager.h + + TeTRiDUUlAciy0C+urz9XXe20Z4= + + Headers/IRSLOG.h + + hzrSEqAbUBxzCpXZxnDK0bBRg3A= + + Headers/metamacros.h + + Yu6lZoIx1MMrXtkmNwFoqgca7fs= + + Info.plist + + HydqbS4yn99+fGyAvzY/Bg/6QrY= + + Modules/module.modulemap + + HdVKeYJbgbaLOj7ydHJJS60vWL8= + + + files2 + + Headers/DIRSFMDB.h + + hash + + kgwjZrevP7rOv8arUTUGH4Q8Hvo= + + hash2 + + +y7TnMmvzyxG/W2RPp/OWTblfk0feygHgDpmvFLHo34= + + + Headers/DypayAPI.h + + hash + + aQBAQkd1z34vLFZvYKtBqNw3awM= + + hash2 + + BDIZHZkKgl9W8kOPjcwC78odFpZ1bo0+xMRDgw3NxB4= + + + Headers/DypayDIRSApplication.h + + hash + + I3cxoIezeeN+e6lwDKaU4P5O3z0= + + hash2 + + 6qKYbPhs7+p5qGE1WTcKU0tltKHWSg6VMPtQuC2Lnfk= + + + Headers/DypayDIRSBasicFeatureOptions.h + + hash + + CravyaW9l4INozOWdyfWtDoVOIA= + + hash2 + + HMghSMevN8rcb3RFdiPkFl1C6YhplMy0VYBEJpmmRAE= + + + Headers/DypayDIRSBasicModule.h + + hash + + PHu5ixETQckMyF4TSOid9ZWBgTY= + + hash2 + + v+FDIx2+SeMNRuccwf/566sO4iaMs/l3w9SeRi+i1GY= + + + Headers/DypayDIRSCompressionGzipPlugin.h + + hash + + ccNBjeiyJYIMGCFwiQLVr5HIUBI= + + hash2 + + VQZtkbWl+s9M5fQEuu6c1ed+oPDdkQ4sXrcng3jq/+0= + + + Headers/DypayDIRSConcurrentCollection.h + + hash + + g9/6bUHO1GSbMKQNvWRYUXllWA8= + + hash2 + + jzHHuDENTWbSg+Uc+DR9Df/SUsgBFD3xV36D+8z94/U= + + + Headers/DypayDIRSConfig.h + + hash + + UEc3j6MsqyXN7bYr4NjRLpbO65A= + + hash2 + + uBOY9AFXgCXwXqFatPcAUzvLtT09Khleh8H9FPeosrI= + + + Headers/DypayDIRSContext.h + + hash + + TV0Wbsi4Cct2ac6etaN3VV+Yq/Y= + + hash2 + + A9N7cMn80Fn2N0agKxCtk7kPycFYFvevN72Eu2d+Fzc= + + + Headers/DypayDIRSEndpointConfiguration.h + + hash + + 24KbpmUXk93sv5Uv9SuJq9r2XMI= + + hash2 + + oJcZLvg9IU+dogdcQwHrPIXupbd9SuvHaTXkt3IWdoY= + + + Headers/DypayDIRSEnviroment.h + + hash + + fRCpa9Kg4cHuO+JhMUB1+i84XRM= + + hash2 + + pLDGclUveshOSUbFAjHB92B2GxaQmE9lY/iKnKWCHvg= + + + Headers/DypayDIRSErrorBuilder.h + + hash + + sIpvM9R7RYEDxGqXTAJcKGDtHzo= + + hash2 + + YoTJObXtOgK/f6XgVtY6JUOYedg9CMkWaRv66LZyiCA= + + + Headers/DypayDIRSEvent.h + + hash + + brDlMdnRm9LbWi/H7aWumXkucWI= + + hash2 + + VdQ6EPas7jX0IJgDKd7+fisQN3TAIhNi5Ba2B9fpjZw= + + + Headers/DypayDIRSEventBatchDispatcher.h + + hash + + S2bO1gCnvXL+fG5/Avrn3OPDoyI= + + hash2 + + q2RXzcO/xyT4fhgkuvkAvwDMplAqaMngwxvuHZfyZD8= + + + Headers/DypayDIRSEventBatchExecutor.h + + hash + + dILCmVYXUMzsT/ge9nkpEgkrn/8= + + hash2 + + Pun4DRrG+lsIe2rWpRNG9nzQK9uzsr6BFfs0PozIYqo= + + + Headers/DypayDIRSEventBlockPlugin.h + + hash + + oVtn+a2/hxGA+JSkR+icbhI2mBQ= + + hash2 + + v5+BvUeW1pB2NToCyLNWq5kmkDoIMKqlylcoC9yhD2w= + + + Headers/DypayDIRSEventEntry.h + + hash + + EeiHvY4o825SNPlDtZ61ehwP0mE= + + hash2 + + qusK6sdjqzDqm23hqe2gF4sOsYwocQuao/YpVvTlBMI= + + + Headers/DypayDIRSEventListener.h + + hash + + sYPwglitcHzPUxpSlfnLZdjHp/M= + + hash2 + + vsgUZiaghrQMyj+lUSU8OKMXP+SSrFLdZQU7ioR3PzU= + + + Headers/DypayDIRSEventPacker.h + + hash + + rCnw0RHtF64PKrhGRAZg8ITOLds= + + hash2 + + tRVPF8oZe2FKBis8nl9eEnXbEEG31g3KPDBI9Zyd7TY= + + + Headers/DypayDIRSEventRequestSchema.h + + hash + + mYBQvF7CUGIT78DZx8LiGS4qeuU= + + hash2 + + JzvBb/90iRfxlZSBFKJhUkd7U9HHAQVeNphy9w/EXeg= + + + Headers/DypayDIRSEventSerializer.h + + hash + + 249oz4U6N98VljRbOKm37+g9qQM= + + hash2 + + qqGXzNGxYUk0f5D5tkA0f2As7NelJi2LJVOk1IJqdDA= + + + Headers/DypayDIRSEventSession.h + + hash + + xWeddAyOdDuJzBOUCGnT+GNmCDU= + + hash2 + + lCEX+MPCHV4E/wguaNVYjFn0W4+/ICTKwQN4hIeKHtE= + + + Headers/DypayDIRSEventStore.h + + hash + + QDPCAmHMAAhB+o9m17OcHsfvEnI= + + hash2 + + 2MXyVN5yE7T++qnSDwFt6VVomQuHYbkd4Q6Ienyf5yQ= + + + Headers/DypayDIRSExtension.h + + hash + + QjpK2NJk5Lk31blvA+EcrmtRWYo= + + hash2 + + CNxkyRt3NtkR9l+XmD05FZxsC62YaWD5O+eMpoxrMrI= + + + Headers/DypayDIRSFMDatabase.h + + hash + + S0KOpEn16RCg87jCGhaIuMYudug= + + hash2 + + ZbAjpkuw6MrmOVUYm2LZupUJbrUKjQy5uKXrMKbCOr4= + + + Headers/DypayDIRSFMDatabaseQueue.h + + hash + + UfffgoEsM9wer44EilEFNVH9N8o= + + hash2 + + YBGFXedUsufs/m/U27bIV1QrMEvH6dQqnfkzYpwJI10= + + + Headers/DypayDIRSFMResultSet.h + + hash + + EJayAzMA4jhdYLhN2BGJxv2PFJM= + + hash2 + + bTdqcKuGJRmyhNIv5xZSnEInwDdu2CwvHBz4z8RhUv4= + + + Headers/DypayDIRSGlobalTimer.h + + hash + + 1wvhQaNKm/0K2QSnGagKEETBl0w= + + hash2 + + JnGjex3q2IpdTQDeYXnFKbrYal+vEn36BbWlGzt4ZNQ= + + + Headers/DypayDIRSIdentity.h + + hash + + hyKhZ92l5Ffj0j/r1OEQ4Dm4WEI= + + hash2 + + Fp7V4yvIyFxqdNtSYeYd5owaw7qAiMrmKCCgz8MhmJw= + + + Headers/DypayDIRSLogger.h + + hash + + KlsbyPVVcMzVbS1iYMWws8Zq4dc= + + hash2 + + 4K3XKIwW42gvE80qo25v973GkTeahGPiNvjzOhaRq1k= + + + Headers/DypayDIRSMMapCache.h + + hash + + dUIi2Uoj6r+H3gK2KCX7cMWq5wU= + + hash2 + + qA1xipuipRuizZDDt3D8az+tRaKpB9DFTU+2alGE86Q= + + + Headers/DypayDIRSModuleHive.h + + hash + + fih8YbZS4kNcZMaxD+o4V1+YOd0= + + hash2 + + AUQJvr7bvehGEeNclUB42jkVuBXJV7g5+zVdcXUMelg= + + + Headers/DypayDIRSNetworking.h + + hash + + 0+r2WJA/Tn/JLjPKCQOmqq45VoI= + + hash2 + + E26JOEMqjbsg3S1GbeNAImcFQqM3qwH/oPJw+SWEtsU= + + + Headers/DypayDIRSPreStorePlugin.h + + hash + + NabLzACPAcTa1aR6Tjjbrcpnl5g= + + hash2 + + EVtmz1gNUT1how3/+JQfuB7p5A1mmMrz9oa0DlUq4Ik= + + + Headers/DypayDIRSRealtimeEventPlugin.h + + hash + + dd+gpG4d8RrbIx41JoUskD2DlCQ= + + hash2 + + JKmSDciCa3X7cHC+wR+CFKJgGJ5K5UzoYnvkNnL+iQk= + + + Headers/DypayDIRSRemoteSettings.h + + hash + + rBL1CyKGP8b03xmRBbgt2Fvq9kg= + + hash2 + + nN0R4c9cs6bHoTtDPCZPRCRxo6Rg0wBrFr7QAoN95ww= + + + Headers/DypayDIRSRemoteSettingsSchema.h + + hash + + fYiLfkDjdQAjrqpfYA6lxytBJQg= + + hash2 + + ZurauyIPkznV9BTUKSu/xXExAN50Zd/nCk0PHXKJM7w= + + + Headers/DypayDIRSRequestParameters.h + + hash + + mHhCZbXBqbRwkkqeEEnU/v4n5fQ= + + hash2 + + M/KQK9q2+2Zf70/16z0UIclg0krWNVmuYBO/ZqpDeQc= + + + Headers/DypayDIRSStore.h + + hash + + 7oaKaM13Cw1dez9OT7GCo6eBUtI= + + hash2 + + ezLaGZn380/3uOpSNixD3SVThXtU8sPl/rzThWm7VC8= + + + Headers/DypayDIRSTask.h + + hash + + ffQ88u6gbbVOISYD/eOMPOnON7k= + + hash2 + + kP25LvhzumiWxRtIIOQm7bIYKTgO6BNQ30x2zS1SUt4= + + + Headers/DypayDIRSThrottlterPlugin.h + + hash + + +qryICFAn/VcSFJLgfOT19dDCo4= + + hash2 + + J3GLjLDFSnqjHzKa7eH9LISHvm9EHP0mVb3s2Ni0wUM= + + + Headers/DypayDIRSTracker+Session.h + + hash + + hiPODLF9wwVcEyy4gZvGqArAe6c= + + hash2 + + hw9i7UB3i7F/3ZhQZk6P6BRgYeFwt/YXWVbjjNa4leg= + + + Headers/DypayDIRSTracker.h + + hash + + YX3GHz2RMYYhyS396R6E2SVGMA8= + + hash2 + + r9ttfuK7c/Ka7km70KTgP5p1GmnupNT6c7HUCnDcEsg= + + + Headers/DypayDIRSUtilities.h + + hash + + FL5/gFUM1yeyfS8UU6j2hn/+MUs= + + hash2 + + l4bJvEnCLCSe80k8IOVb0/qJ1HywTHS+MGv05alNox4= + + + Headers/DypayDIRSValue.h + + hash + + uLvAWU6rVVhbUV6RJnbKGMsoaWc= + + hash2 + + w58C+sOUXze8dqgxrI8SAwMpu2G3m/l2sfbrcoh6X0s= + + + Headers/DypayDataIRIS.h + + hash + + SIJD04CbJUpza3QCjjlL93kMoPE= + + hash2 + + FOUGrQ8ssePPyhevPIOcy8HoSKSUkT/1ktc7eqeuUKw= + + + Headers/DypayDataIRISDefaultSchema.h + + hash + + GrY/4GX4pzJ58NDYJOz5mA6hyHg= + + hash2 + + MQwLZ4TrMsReOmF5lP9VQquXWJf7U6Y+4+vpTBbG0gw= + + + Headers/DypayDataIRISEvent.h + + hash + + GFRPJjShBglZIYAqtvOaUHqr1dY= + + hash2 + + lndmKz03CstAgJWgAoD1ObEWextQFaI+owNktsv/Wzk= + + + Headers/DypayDataIRISFMDB.h + + hash + + mB5uIgFihrVpwgX6My0jsqjTat0= + + hash2 + + VN0fA0i0jM5QPf3vw0mo4ooQY5NUiSinNxFGiSRT4RI= + + + Headers/DypayDataIRISRemoteSettings.h + + hash + + 4pA8IM5LK9J0LpZXC+j+EmeejPU= + + hash2 + + VQ3h2B+gOHkkI0JjLYywOrOKYGjh+RWG624cJtSsKxQ= + + + Headers/DypayDataIRISThrottlter.h + + hash + + GdsMIv4Fhdx5GW3jbDtRGRK9Cag= + + hash2 + + NZSvyz1+DKx9begnjYsz8C1npuwih9PPDRhTmrTZhHo= + + + Headers/DypayIRISDefines.h + + hash + + g7pDc7TzT1Mrt964er53xyCtEyQ= + + hash2 + + O+ef8PNt83KSrHuzoWhvqpjiefrFl5wYhRAab6e0fek= + + + Headers/DypayIRISDefinesPrivate.h + + hash + + DcI4aQKwwKvpT3iFHaZqHvghIJM= + + hash2 + + GxxfFJmGn661iA5+L0UDLHzk7rb3pVIR+rUN1r4N6lk= + + + Headers/DypayIRISInterfaceDefines.h + + hash + + 4rABbkDnOwdPOh2ghvJo9XGegM4= + + hash2 + + 4D9AkpwY3Wfshjzm4icqDHjZaipwnIaPAErJiq179l8= + + + Headers/DypayIRISMacro.h + + hash + + ++TLP1nwLHIEiKsrmiDrRp/h1Mc= + + hash2 + + 0v80PAJ4vc7zNDhK57ojQUdV2+z4pbdpWZ/FcnNkPoE= + + + Headers/DypaySDK-umbrella.h + + hash + + TjzdtwjkANhHuhvG3yHzy4SzIDs= + + hash2 + + mmIVp74+fwrsLUm3nNk8TwmQP+3mcYz/ZqjjNtiaJaw= + + + Headers/DypayTrackerManager.h + + hash + + TeTRiDUUlAciy0C+urz9XXe20Z4= + + hash2 + + IfgfrltnBFwPZ4jmy6hRGrKnri8n3zNK7NkNfR6T2EM= + + + Headers/IRSLOG.h + + hash + + hzrSEqAbUBxzCpXZxnDK0bBRg3A= + + hash2 + + isvQcdb4LWw1iBFgxOkZRzrEcCboantYul7ceU5TSYg= + + + Headers/metamacros.h + + hash + + Yu6lZoIx1MMrXtkmNwFoqgca7fs= + + hash2 + + 4u3stmNZzbexfw8KT8LBB4+oyHzvaDVIgXNCxjrGfJ4= + + + Modules/module.modulemap + + hash + + HdVKeYJbgbaLOj7ydHJJS60vWL8= + + hash2 + + A9MaJNm2xGcXg1HAnEbavMVi5z7f+1Wj7KwkDRwWCCc= + + + + 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/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeSignature b/uni_modules/tb-douyin-pay/utssdk/app-ios/Frameworks/DypaySDK.xcframework/ios-arm64_x86_64-simulator/DypaySDK.framework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..e69de29 diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/Info.plist b/uni_modules/tb-douyin-pay/utssdk/app-ios/Info.plist new file mode 100644 index 0000000..d97e72f --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/Info.plist @@ -0,0 +1,12 @@ + + + + + LSApplicationQueriesSchemes + + dypay1128 + dypay2329 + dypay8663 + + + diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/TbDouyinPayNative.swift b/uni_modules/tb-douyin-pay/utssdk/app-ios/TbDouyinPayNative.swift new file mode 100644 index 0000000..c03b191 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/TbDouyinPayNative.swift @@ -0,0 +1,91 @@ +import Foundation +import UIKit +import DypaySDK + +public class TbDouyinPayNative { + private static var pending: ((String) -> Void)? + private static var generation = UUID() + + public static func initialize(_ appId: String, _ scheme: String, _ link: String) { + DypayAPI.register(withAppID: appId, universalLink: link, callbackScheme: scheme) + } + + public static func available() -> Bool { DypayAPI.canOpenDypay() } + + public static func pay(_ payload: String, _ done: @escaping (String) -> Void) { + DispatchQueue.main.async { + guard pending == nil else { + done("{\"resultCode\":\"103\",\"errorMsg\":\"已有支付正在处理,请先查单\"}") + return + } + guard DypayAPI.canOpenDypay() else { + done("{\"resultCode\":\"100\",\"errorMsg\":\"请安装或升级抖音客户端\"}") + return + } + guard let bytes = payload.data(using: .utf8), + let info = try? JSONSerialization.jsonObject(with: bytes) as? [String: String], + let controller = foregroundController() else { + done("{\"resultCode\":\"2\",\"errorMsg\":\"支付参数或当前页面不可用\"}") + return + } + generation = UUID() + let ticket = generation + pending = done + DypayAPI.openDypay(withInfo: info, from: controller) { result in + finish(result as? [AnyHashable: Any], ticket) + } + // Keep a native lock after timeout: a late URL callback cannot identify a new order. + // The host must query the pending order rather than immediately initiate another pay. + } + } + + public static func processURL(_ url: URL) -> Bool { + let ticket = generation + return DypayAPI.processDypayResult(with: url) { result in + finish(result as? [AnyHashable: Any], ticket) + } + } + + public static func processActivity(_ activity: NSUserActivity) -> Bool { + let ticket = generation + return DypayAPI.processDypayResult(with: activity) { result in + finish(result as? [AnyHashable: Any], ticket) + } + } + + private static func finish(_ result: [AnyHashable: Any]?, _ ticket: UUID) { + DispatchQueue.main.async { + guard ticket == generation, let callback = pending else { return } + pending = nil + let code = result?["resultCode"].map { String(describing: $0) } ?? "3" + let message = result?["errorMsg"] as? String ?? "" + let normalized = ["resultCode": code, "errorMsg": message] + guard let data = try? JSONSerialization.data(withJSONObject: normalized), + let json = String(data: data, encoding: .utf8) else { + callback("{\"resultCode\":\"3\",\"errorMsg\":\"请查询订单状态\"}") + return + } + callback(json) + } + } + + private static func foregroundController() -> UIViewController? { + var windows: [UIWindow] = [] + if #available(iOS 13.0, *) { + windows = UIApplication.shared.connectedScenes + .compactMap { $0 as? UIWindowScene } + .filter { $0.activationState == .foregroundActive } + .flatMap { $0.windows } + } else { + windows = UIApplication.shared.windows + } + var controller = windows.first(where: { $0.isKeyWindow })?.rootViewController + while let current = controller { + if let presented = current.presentedViewController { controller = presented } + else if let nav = current as? UINavigationController { controller = nav.visibleViewController } + else if let tabs = current as? UITabBarController { controller = tabs.selectedViewController } + else { break } + } + return controller + } +} diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/config.json b/uni_modules/tb-douyin-pay/utssdk/app-ios/config.json new file mode 100644 index 0000000..1c44444 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/config.json @@ -0,0 +1,4 @@ +{ + "deploymentTarget": "12.0", + "frameworks": ["UIKit.framework", "WebKit.framework", "libsqlite3.tbd", "libz.tbd"] +} diff --git a/uni_modules/tb-douyin-pay/utssdk/app-ios/index.uts b/uni_modules/tb-douyin-pay/utssdk/app-ios/index.uts new file mode 100644 index 0000000..dc94060 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/app-ios/index.uts @@ -0,0 +1,34 @@ +import { UIApplication } from 'UIKit' +import { URL, NSUserActivity } from 'Foundation' +import { InitOptions, PayOptions, PayCallback } from '../interface.uts' +import { configure, invoke } from '../common.uts' + +export function initDypay(options: InitOptions): boolean { + if (options.callbackScheme.trim().length == 0 || !configure(options.appId)) return false + TbDouyinPayNative.initialize(options.appId, options.callbackScheme, options.universalLink ?? '') + return true +} + +export function canOpenDypay(): boolean { + return TbDouyinPayNative.available() +} + +export function openDypay(options: PayOptions, callback: PayCallback): void { + invoke(options, callback, (payload: string, loading: boolean, done: (raw: string) => void) => { + TbDouyinPayNative.pay(payload, done) + }) +} + +export class TbDouyinPayHook implements UTSiOSHookProxy { + applicationOpenURLOptions(app: UIApplication | null, url: URL, + options: Map | null = null): boolean { + return TbDouyinPayNative.processURL(url) + } + + applicationContinueUserActivityRestorationHandler(application: UIApplication | null, + userActivity: NSUserActivity | null, + restorationHandler: ((res: [any] | null) => void) | null = null): boolean { + if (userActivity == null) return false + return TbDouyinPayNative.processActivity(userActivity!) + } +} diff --git a/uni_modules/tb-douyin-pay/utssdk/common.uts b/uni_modules/tb-douyin-pay/utssdk/common.uts new file mode 100644 index 0000000..e811e36 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/common.uts @@ -0,0 +1,62 @@ +import { PayOptions, PayCallback, PayResult } from './interface.uts' + +let appId = '' +let busy = false +let sequence = 0 + +export function configure(id: string): boolean { + if (busy || id.trim().length == 0) return false + appId = id + return true +} + +export function invoke(options: PayOptions, callback: PayCallback, + nativePay: (payload: string, loading: boolean, done: (raw: string) => void) => void): void { + if (busy) { + const result: PayResult = { resultCode: '103', errorMsg: '已有支付正在进行,请勿重复点击', needsQuery: true } + callback(result) + return + } + let valid = false + try { + const info = options.payInfo + const values = [info.appid, info.partnerid, info.prepayid, info.package, info.noncestr, info.timestamp, info.sign] + valid = appId.length > 0 && info.appid == appId && info.package == 'Sign=DYPay' + values.forEach((value: string) => { if (value.trim().length == 0) valid = false }) + if (!/^[0-9]{1,10}$/.test(info.timestamp) || info.noncestr.length > 32) valid = false + } catch (e) { valid = false } + if (!valid) { + const result: PayResult = { resultCode: '-1', errorMsg: '支付参数不完整或 AppID 不匹配,请重新下单', needsQuery: false } + callback(result) + return + } + busy = true + sequence += 1 + const current = sequence + const timer = setTimeout(() => { + if (!busy || sequence != current) return + busy = false + sequence += 1 + const result: PayResult = { resultCode: '3', errorMsg: '支付结果等待超时,请查询订单,勿重复付款', needsQuery: true } + callback(result) + }, 300000) + const complete = (raw: string): void => { + if (!busy || sequence != current) return + busy = false + clearTimeout(timer) + let result: PayResult = { resultCode: '3', errorMsg: '支付结果未知,请查询订单', needsQuery: true } + try { + const parsed = JSON.parseObject(raw) + if (parsed != null) { + result.resultCode = parsed.getString('resultCode') ?? '3' + result.errorMsg = parsed.getString('errorMsg') ?? '' + } + } catch (e) { /* An invalid native result must never become a payment success. */ } + callback(result) + } + try { + nativePay(JSON.stringify(options.payInfo), options.showLoading ?? true, complete) + } catch (e) { + complete('{"resultCode":"2","errorMsg":"无法调用支付 SDK,请查询订单后重试"}') + } +} diff --git a/uni_modules/tb-douyin-pay/utssdk/interface.uts b/uni_modules/tb-douyin-pay/utssdk/interface.uts new file mode 100644 index 0000000..4c80146 --- /dev/null +++ b/uni_modules/tb-douyin-pay/utssdk/interface.uts @@ -0,0 +1,29 @@ +export type InitOptions = { + appId: string, + callbackScheme: string, + universalLink?: string | null +} + +// All fields must come from the authenticated server prepay response. +export type PayInfo = { + appid: string, + partnerid: string, + prepayid: string, + package: string, + noncestr: string, + timestamp: string, + sign: string +} + +export type PayOptions = { + payInfo: PayInfo, + showLoading?: boolean | null +} + +// Code 0 is only an SDK hint, never proof that the order was paid. +export type PayResult = { + resultCode: string, + errorMsg: string, + needsQuery: boolean +} +export type PayCallback = (result: PayResult) => void diff --git a/utils/douyin-pay-adapter.mjs b/utils/douyin-pay-adapter.mjs new file mode 100644 index 0000000..4d9a842 --- /dev/null +++ b/utils/douyin-pay-adapter.mjs @@ -0,0 +1,40 @@ +// Pure adapter: keeps merchant credentials and signing on the server. +export function toSdkPayInfo(payment) { + const data = payment?.douyin; + if (!data) throw new Error('后端未返回抖音支付参数'); + if (data.type && data.type !== 'app') throw new Error('当前仅支持抖音 App 支付'); + let nested = data.orderInfo || {}; + if (typeof nested === 'string') { + try { nested = JSON.parse(nested); } + catch (_) { throw new Error('抖音支付 orderInfo 格式错误'); } + } + const field = (camel, lower) => nested[lower] ?? nested[camel] ?? data[camel] ?? data[lower]; + const info = { + appid: field('appId', 'appid'), + partnerid: field('mchId', 'partnerid'), + prepayid: field('prepayId', 'prepayid'), + package: field('packageValue', 'package'), + noncestr: field('nonceStr', 'noncestr'), + timestamp: field('timeStamp', 'timestamp'), + sign: field('sign', 'sign') + }; + if (typeof info.timestamp === 'number' && Number.isSafeInteger(info.timestamp)) info.timestamp = String(info.timestamp); + for (const [key, value] of Object.entries(info)) { + if (typeof value !== 'string' || !value.trim()) { + throw new Error(`缺少支付参数 ${key},请先部署后端 SDK 签名补丁`); + } + } + if (info.package !== 'Sign=DYPay') throw new Error('抖音支付 package 不正确'); + return info; +} + +// request is the App's existing authenticated request wrapper, returning ApiResult.data. +export async function queryUntilSettled(request, orderNum, { attempts = 5, pause = 1500 } = {}) { + for (let i = 0; i < attempts; i++) { + const result = await request({ url: '/payment/queryResult', method: 'GET', data: { orderNum } }); + if (result?.state === 2) return { state: 'paid' }; + if (result?.state === 3) return { state: 'failed' }; + if (i + 1 < attempts) await new Promise(resolve => setTimeout(resolve, pause)); + } + return { state: 'pending' }; +} diff --git a/utils/douyin-pay.js b/utils/douyin-pay.js new file mode 100644 index 0000000..268bf3d --- /dev/null +++ b/utils/douyin-pay.js @@ -0,0 +1,127 @@ +// #ifdef APP-PLUS +import { initDypay, canOpenDypay, openDypay } from '@/uni_modules/tb-douyin-pay'; +// #endif +import request from './request.js'; +import { BASE_URL } from './config.js'; +import { TOKEN_NAME, USER_DATA } from './auth.js'; +import { toSdkPayInfo, queryUntilSettled } from './douyin-pay-adapter.mjs'; + +let active = false; +let resuming = false; +function accountKey() { + if (!uni.getStorageSync(TOKEN_NAME)) return ''; + const user = uni.getStorageSync(USER_DATA) || {}; + const id = user.userId || user.id; + return id ? `tb-douyin:${BASE_URL}:${id}` : ''; +} +async function query(orderNum) { + return queryUntilSettled(async options => { + const response = await request({ ...options, isShowLoading: false }); + if (response?.bizcode !== 100) throw new Error('查询支付结果失败'); + return response.data; + }, orderNum); +} + +export function douyinPayTypes(types) { + // #ifdef H5 + return types.split(',').includes('6') ? types : `${types},6`; + // #endif + // #ifdef APP-PLUS + return types.split(',').includes('6') ? types : `${types},6`; + // #endif + // #ifndef APP-PLUS + return types; + // #endif +} +export function filterDouyinPayWays(ways) { + // #ifdef H5 + return ways || []; + // #endif + // #ifdef APP-PLUS + return ways || []; + // #endif + // #ifndef APP-PLUS + return (ways || []).filter(item => item.type !== 'douyin'); + // #endif +} +function showState(state, key, orderNum) { + if (key !== accountKey()) return; + if (state.state !== 'pending' && uni.getStorageSync(key) === orderNum) uni.removeStorageSync(key); + uni.$emit('douyin-payment-result', { orderNum, state: state.state }); + uni.showToast({ title: state.state === 'paid' ? '支付成功' : state.state === 'failed' + ? '支付未成功,请查看订单' : '支付结果待确认,请稍后查看订单', icon: 'none', duration: 2500 }); +} + +// Runs BEFORE creating an order. Never start another payment while an earlier result is unknown. +export async function prepareDouyinPay(payway) { + if (payway !== 'douyin') return true; + try { + // #ifndef APP-PLUS + throw new Error('抖音支付仅支持 Android/iOS App'); + // #endif + // #ifdef APP-PLUS + if (active || resuming) throw new Error('正在处理支付,请勿重复点击'); + const key = accountKey(); + if (!key) throw new Error('请先登录后再支付'); + const previous = uni.getStorageSync(key); + if (previous) { + resuming = true; + try { showState(await query(previous), key, previous); } + finally { resuming = false; } + return false; + } + if (!canOpenDypay()) throw new Error('请先安装或升级抖音客户端'); + return true; + // #endif + } catch (error) { + uni.showToast({ title: error.message || '暂时无法支付,请稍后重试', icon: 'none' }); + return false; + } +} + +// Takes the existing settlement/recharge response; does NOT create a second order. +export async function appDypayFun(payment) { + // #ifndef APP-PLUS + uni.showToast({ title: '抖音支付仅支持 Android/iOS App', icon: 'none' }); + return; + // #endif + // #ifdef APP-PLUS + if (active) return; + active = true; + const key = accountKey(); + try { + if (!key || !payment.orderNum) throw new Error('登录身份或支付订单编号缺失'); + const payInfo = toSdkPayInfo(payment); + const previous = uni.getStorageSync(key); + if (previous) { + const state = await query(previous); + showState(state, key, previous); + if (state.state === 'pending' || previous === payment.orderNum) return state; + } + uni.setStorageSync(key, payment.orderNum); + if (!initDypay({ appId: payInfo.appid, callbackScheme: payment.douyin.callbackScheme || 'trustbridgeapp' })) { + throw new Error('支付初始化失败,请先查询订单'); + } + await new Promise(resolve => openDypay({ payInfo, showLoading: true }, resolve)); + const state = await query(payment.orderNum); + showState(state, key, payment.orderNum); + return state; + } catch (error) { + if (key === accountKey()) uni.showToast({ title: error.message || '支付结果待确认,请查看订单', icon: 'none' }); + return { state: 'error', message: error.message || '支付结果待确认,请查看订单' }; + } finally { active = false; } + // #endif +} + +export async function resumeDouyinPay() { + // #ifdef APP-PLUS + if (active || resuming) return; + const key = accountKey(); + const pending = key && uni.getStorageSync(key); + if (!pending) return; + resuming = true; + try { showState(await query(pending), key, pending); } + catch (_) { /* Keep the order for a later onShow. Never infer a payment failure. */ } + finally { resuming = false; } + // #endif +} diff --git a/utils/payUtils.js b/utils/payUtils.js index 8788657..062e472 100644 --- a/utils/payUtils.js +++ b/utils/payUtils.js @@ -1,3 +1,4 @@ +import { appDypayFun } from './douyin-pay.js'; import { feedback } from "@/api/payment.js"; /** @@ -110,250 +111,13 @@ export function zfbPayFun(alipay, orderId, orderNum) { } /** - * 抖音支付(兼容 iOS、Android App 端) - * @param {Object|String} dyPay 抖音支付参数 (支持 orderStr, schema, url, payUrl, orderInfo 等) - * @param {Object|String|Number} orderId 支付的订单ID - * @param {Object|String} orderNum 支付的订单编号 + * Compatibility entry for callers passing ApiResult.data.douyin separately. + * Native SDK invocation and authoritative result query are handled together. */ -export function douyinPayFun(dyPay, orderId, orderNum) { - console.log("抖音支付---入参:", dyPay, orderId, orderNum); - - return new Promise((resolve, reject) => { - if (!dyPay || (typeof dyPay === "object" && Object.keys(dyPay).length === 0)) { - uni.showToast({ - title: "支付参数错误", - icon: "none", - }); - jumpWayError(); - return reject(new Error("支付参数为空")); - } - - const d = typeof dyPay === "object" ? dyPay : {}; - const sub = (typeof d.orderInfo === "object" && d.orderInfo) ? d.orderInfo : {}; - const type = typeof dyPay === "object" ? (dyPay.type || "app") : "app"; - - // 1. 提取或生成 Scheme / URL (注意:排除 sign,避免将签名误认为 URL) - let orderStr = ""; - if (typeof dyPay === "string") { - orderStr = dyPay; - } else if (typeof dyPay === "object") { - orderStr = - dyPay.orderStr || - dyPay.schema || - dyPay.scheme || - dyPay.url || - dyPay.payUrl || - dyPay.link || - sub.orderStr || - sub.schema || - sub.scheme || - sub.url || - ""; - - // 如果未配置直接链接,则尝试通过 prepayId / pay_token 自动生成抖音收银台 Scheme 备用 - const token = d.prepayId || d.prepayid || sub.prepayid || sub.prepayId; - if (!orderStr && token) { - orderStr = `snssdk1128://pay?pay_token=${encodeURIComponent(token)}`; - } - } - - console.log("抖音支付---提取到的 Scheme / orderStr:", orderStr); - - // 2. 深度合并/映射原生支付所需的 orderInfo(融合根节点与 orderInfo 子节点,同时提供驼峰与小写命名) - const appId = d.appId || d.appid || sub.appId || sub.appid || ""; - const mchId = d.mchId || d.partnerid || d.mchid || sub.mchId || sub.partnerid || sub.mchid || ""; - const prepayId = d.prepayId || d.prepayid || sub.prepayId || sub.prepayid || ""; - const callbackScheme = d.callbackScheme || sub.callbackScheme || "trustbridgeapp"; - const packageValue = d.packageValue || d.package || sub.packageValue || sub.package || "Sign=DYPay"; - const nonceStr = d.nonceStr || d.noncestr || sub.nonceStr || sub.noncestr || ""; - const timeStamp = String(d.timeStamp || d.timestamp || sub.timeStamp || sub.timestamp || ""); - const sign = d.sign || sub.sign || ""; - - const orderInfo = { - // 驼峰命名(标准 uni.requestPayment / 抖音 SDK) - appId, - mchId, - prepayId, - callbackScheme, - packageValue, - nonceStr, - timeStamp, - sign, - // 小写命名(部分原生桥接 SDK 兼容) - appid: appId, - partnerid: mchId, - mchid: mchId, - prepayid: prepayId, - package: packageValue, - noncestr: nonceStr, - timestamp: timeStamp, - service: 5, - }; - - // #ifdef APP-PLUS - // 情形 A:如果显式指定为 H5 方式 - if ( - type === "h5" && - orderStr && - (orderStr.startsWith("http://") || orderStr.startsWith("https://")) - ) { - uni.navigateTo({ - url: - `/pages/other_package/payment_processing/payment_processing?link=${encodeURIComponent( - orderStr - )}&orderNum=` + orderNum, - }); - resolve({ status: "processing" }); - return; - } - - // 情形 B:如果后端直接传入了协议 Scheme 串(如以 snssdk1128://, douyin:// 开头) - if ( - typeof dyPay === "string" || - (dyPay.orderStr && (dyPay.orderStr.startsWith("snssdk") || dyPay.orderStr.startsWith("douyin"))) - ) { - let openSuccess = false; - - // iOS Native.js 尝试 - if (plus.os.name === "iOS") { - try { - const UIApplication = plus.ios.importClass("UIApplication"); - const NSURL = plus.ios.importClass("NSURL"); - const app = UIApplication.sharedApplication(); - const nsUrl = NSURL.URLWithString(orderStr); - if (app && nsUrl && app.openURL(nsUrl)) { - openSuccess = true; - } - } catch (nativeErr) { - console.warn("iOS Native.js openURL 尝试:", nativeErr); - } - } - - // Android Native.js 尝试 - if (plus.os.name === "Android") { - try { - const Intent = plus.android.importClass("android.content.Intent"); - const Uri = plus.android.importClass("android.net.Uri"); - const main = plus.android.runtimeMainActivity(); - const intent = new Intent(Intent.ACTION_VIEW, Uri.parse(orderStr)); - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - main.startActivity(intent); - openSuccess = true; - } catch (androidErr) { - console.warn("Android Native.js Intent 尝试:", androidErr); - } - } - - if (!openSuccess) { - plus.runtime.openURL( - orderStr, - () => { - if (orderNum) { - uni.navigateTo({ - url: - `/pages/other_package/payment_processing/payment_processing?orderNum=` + - orderNum, - }); - } - resolve({ status: "invoked" }); - }, - (err) => { - console.error("拉起抖音客户端失败:", err); - const isSimulator = - plus.navigator && plus.navigator.isSimulator - ? plus.navigator.isSimulator() - : false; - let tip = "未检测到抖音客户端或拉起失败,请确认是否已安装抖音客户端"; - if (isSimulator) { - tip = "iOS模拟器无法打开第三方应用Scheme,请在安装了抖音的真机上测试"; - } else if (err && err.code === -3) { - tip = "未检测到抖音应用或当前基座未配置Scheme白名单,请确认真机已安装抖音"; - } - uni.showToast({ - title: tip, - icon: "none", - duration: 3000, - }); - jumpWayError(); - reject(err); - } - ); - } else { - if (orderNum) { - uni.navigateTo({ - url: - `/pages/other_package/payment_processing/payment_processing?orderNum=` + - orderNum, - }); - } - resolve({ status: "invoked" }); - } - return; - } - - // 情形 C:使用 uni.requestPayment 调起原生支付,失败时通过生成 Scheme 降级拉起 - uni.requestPayment({ - provider: "toutiao", - orderInfo: orderInfo, - service: 5, - success: function (res) { - console.log("抖音支付成功:", res); - payFeedbackFun(orderId, orderNum, 1); - jumpWayOk(); - resolve(res); - }, - fail: function (err) { - console.error("uni.requestPayment 抖音支付失败/不兼容,尝试 Scheme 降级拉起:", err); - if (orderStr) { - plus.runtime.openURL( - orderStr, - () => { - if (orderNum) { - uni.navigateTo({ - url: - `/pages/other_package/payment_processing/payment_processing?orderNum=` + - orderNum, - }); - } - resolve({ status: "invoked_fallback" }); - }, - (openErr) => { - console.error("openURL 降级失败:", openErr); - jumpWayError(); - reject(err); - } - ); - } else { - jumpWayError(); - reject(err); - } - }, - }); - return; - // #endif - - // 兜底处理 (H5 及非 App 环境) - if (orderStr) { - uni.navigateTo({ - url: - `/pages/other_package/payment_processing/payment_processing?link=${encodeURIComponent( - orderStr - )}&orderNum=` + orderNum, - }); - resolve({ status: "processing" }); - } else { - uni.showToast({ - title: "抖音支付暂仅支持在 App 端调用", - icon: "none", - }); - jumpWayError(); - reject(new Error("抖音支付暂仅支持在 App 端调用")); - } - }); +export function douyinPayFun(douyin, orderId, orderNum) { + return appDypayFun({ douyin, orderId, orderNum }); } - -// 导出别名方便不同调用习惯 export const dyPayFun = douyinPayFun; export const appDyPayFun = douyinPayFun; export const appDouyinPayFun = douyinPayFun; diff --git a/utils/request.js b/utils/request.js index 22c812d..ea1d193 100644 --- a/utils/request.js +++ b/utils/request.js @@ -56,10 +56,11 @@ function request(options) { url: BASE_URL + url, method, data, - header: { + header: { ...defaultHeaders, - ...headers, - }, + ...headers, + }, + timeout: 15000, success: (res) => { if (isShowLoading) { hideLoading(); @@ -67,8 +68,13 @@ function request(options) { let data = res.data; if (data && typeof data === "string") { - data = JSON.parse(data); - } + try { data = JSON.parse(data); } + catch (_) { reject(new Error('服务响应格式异常')); return; } + } + if (res.statusCode < 200 || res.statusCode >= 300 || !data) { + reject(new Error('服务请求失败,请稍后重试')); + return; + } if (data.status === 500) { uni.showToast({ title: "系统异常,请稍后再试", @@ -76,7 +82,8 @@ function request(options) { duration: 2000, // 持续时长,单位ms mask: false, // 是否显示透明蒙层,防止触摸穿透 }); - return; + reject(new Error('系统异常,请稍后再试')); + return; } // 601 微信登录没注册 if (data.bizcode === 100) { @@ -114,7 +121,8 @@ function request(options) { }); }, 2000); } - } else { + reject(data); + } else { console.log("错误-1", data, url); uni.showToast({ title: data.msg || "系统错误,请稍后再试", @@ -134,7 +142,7 @@ function request(options) { icon: "none", // 可选 success/loading/none duration: 2000, // 持续时长,单位ms }); - // reject(error); // 请求失败时返回错误信息 + reject(error); }, }); });