commit d4909b21b129e1432ccffb044deca0c6c29e8c64 Author: xiaoyi Date: Tue Nov 30 12:21:38 2021 +0800 feat:update upm diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8f6d568 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,78 @@ +# ChangeLog + +## 3.5.0 + +### Optimization and fixed bugs +- 支持性更新 + +## 3.4.0 + +## 3.3.0 + +- Native Update + +## 3.2.0 + +- Native Update + +## 3.1.0 + +- Native Update + +## 3.0.0 + +### Optimization + +- Bridge 新增 Task 桥接 + +## 2.1.7 + +### None + +## 2.1.6 + +### BreakingChanges + +- 修改 **TapCommon.OpenReviewInTapGlobal()** 方法命名 + +## 2.1.5 + +### Optimization and fixed bugs + +- 内部优化 + +## 2.1.4 + +### Optimization and fixed bugs + +- 优化多语言相关 +- 修复 JSON 解析错误 + +## 2.1.3 + +### New Feature + +* iOS 新增 TapTap 以及 Tap.IO 客户端安装判断 + +## 2.1.2 + +### Optimization and fixed bugs + +* 修复 iOS ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES 设置问题可能导致的 AppStore 审核无法通过 + +## 2.1.1 + +### Feature + +* Android 新增 TapTap App 相关支持功能 + +## 2.1.0 + +* 新增长链接支持 TapTap.Friends +* 海内外域名切换 + +## 2.0.0 + +### Feature + +* TapTap Common \ No newline at end of file diff --git a/CHANGELOG.md.meta b/CHANGELOG.md.meta new file mode 100644 index 0000000..904fb55 --- /dev/null +++ b/CHANGELOG.md.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 89a2f2ba3f4d4cf0b55f2f992c6b6afb +timeCreated: 1616744142 \ No newline at end of file diff --git a/Documentation.meta b/Documentation.meta new file mode 100644 index 0000000..345bff8 --- /dev/null +++ b/Documentation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e5655844e77cd49d8a69c4a299e31419 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Documentation/Bridge.md b/Documentation/Bridge.md new file mode 100644 index 0000000..920447b --- /dev/null +++ b/Documentation/Bridge.md @@ -0,0 +1,178 @@ +# TapCommon 用于支持 TapSDK 其他模块中 Android、iOS 与 Unity 的通信 + +> 目前 TapSDK 业务中,Unity 业务层实现的功能不多,主要作为桥接来调用 Android、iOS SDK 中的方法。 + +## 一、实现 Unity 调用 Android、iOS 方法 + +> 为了方便 Unity 一套代码可以调用双端方法,所以定义原生接口时,需要考虑 Android、iOS 语言之间的差异。 + +### Android 接口定义 + +- 使用 `@BridgeService` 、`@BridgeMethod` 、`@BridgeParam` 注解修饰 `类`、`方法`、`参数`。 +- `Activity`、`BridgeCallback` 这两个类型参数不需要 `@BridgeParam` 注解。 +- `@BridgeParam` 仅支持基本数据类型(包含 `String`)。 + +```java +@BridgeService("TestService") +public class TestService implementation IBridgeService { + + @BridgeMethod("testMethodWithCallback") + void testMethodWithCallback(BridgeCallback callback); + + @BridgeMethod("testMethodWithArgsAndCallback") + void testMethodWithArgsAndCallback(Activity activity, @BridgeParam("args1") String appId, @BridgeParam("args2") int args2, BridgeCallback callback); + +} + +``` + +### Android 接口实现 + +```java +public class TestService implementation TestService { + + @Override + public void testMethodWithCallback(BridgeCallback callback){ + callback.onResult("testMethodWithCallback 回调给 Unity 的参数"); + } + + @Override + public void testMethodWithArgsAndCallback(Activity activity, String appId,int args2, BridgeCallback callback){ + callback.onResult("testMethodWithArgsAndCallback 回调给 Unity 的参数"); + } + +} + +``` + +### iOS 接口定义 + +> iOS 方法名通过反射获取到的为 `args1:args2:bridgeCallback` ,所以 iOS 的方法定义与 Android 略有不同。 + +- 类名必须同 Android `@BridgeService` 所修饰的类名一致。 +- 参数名例如 `args1`、`args2` 必须同 Android `@BridgeParam` 修饰的一致,用于回调的 `iOS` 闭包的参数名必须为 `bridgeCallback`。 +- 当参数个数仅为 0 或者 仅为 闭包时,方法名必须同 Android `@BridgeMethod` 修饰的方法一致。 + +```objectivec +@interface TestService + +// 匹配的是 Android 中 testMethodWithCallback 方法 ++(void) testMethodWithCallback:(void (^)(NSString *result))callback; + +// 匹配的是 Android 中 testMethodWithArgsAndCallback 方法 ++(void) args1:(NSString*)args1 args2:(NSNumber*)args2 bridgeCallback:(void (^)(NSString *result))callback; + +@end +``` + +### iOS 接口实现 + +```objectivec +@implementation TestService + ++(void) testMethodWithCallback:(void (^)(NSString *result)) callback{ + callback(@"testMethodWithCallback 回调给 Unity 的参数"); +} + ++(void) args1:(NSString*)args1 args2:(NSNumber*)args2 bridgeCallback:(void (^)(NSString *result))callback{ + callback(@"testMethodWithArgsAndCallback 回调给 Unity 的参数"); +} + +@end +``` + +### Unity 调用上文中定义的 Android、iOS 接口 + +#### 1.初始化 + +```c# +// Android 初始化 +//CLZ_NAME 和IMP_NAME为 接口以及实现类的全路径包名 例如:com.tds.bridge.TestService,com.tds.bridge.TestServiceImpl +EngineBridge.GetInstance().Register(CLZ_NAME, IMP_NAME); + +// iOS 无需初始化 +``` +#### 2.调用方法 + +`Bridge.CallHandler` 为异步方法,执行线程的流程为: + +Unity Thread -> Native MainThread -> Execute Function -> Unity Thread + +所以执行 `CallHandler` 的 Thread 和 `Action` 的 Thread 都为 Unity 当前 Thread。 + +```c# + var command = new Command.Builder() + .Service("TestService") // @BridgeService 值以及 iOS 类名 + .Method("testMethodWithArgsAndCallback") // @BridgeMethod 值 以及 iOS 方法名 + .Args("args1","value") // @BridgeParam 值 以及 iOS 参数名 + .Args("args2",1) // 同上 + .Callback(true) // 是否需要添加 BridgeCallback + .OnceTime(true) // 当前 BridgeCallback 是否常驻内存 + .CommandBuilder(); + + // 需要回调 + EngineBridge.GetInstance().CallHandler(command,result=>{ + if(EngineBridge.CheckResult(result)){ + // 桥接调用成功 + // 当前 Content 则为 Android、iOS 通过 BridgeCallback 传给 Unity 的值 + var content = result.content; + } + }); + + // 不需要回调 + EngineBridge.GetInstance().CallHandler(command); +``` + +## 二、Android 、iOS 调用 Unity + +鉴于 TapSDK 3.1.+ 之后,Android 与 iOS 需要同步 `TapBootstrap` 中 `TDSUser` 的部分参数,所以 `TapCommon` 在当前版本支持了原生简单的调用 Unity 接口。 + +以下以 Android、iOS 需要 Unity 提供 `sessionToken` 以及 `objectId` 为例 + +### Unity 实现 ITapPropertiesProxy 接口并注册 + +```c# +public class SessionTokenProxy:ITapPropertiesProxy{ + + public string GetProperties(){ + return "sessionToken-kafjaskldfjasjdhfajkdfajdfas"; + } + +} + +public class ObjectIdProxy:ITapPropertiesProxy { + + public string GetProperties(){ + return "objectId-dafasdfad"; + } + +} + +// 通过 TapCommon 注册 Native 需要调用的接口 +TapCommon.RegisterProperties("sessionToken",new SessionTokenProxy()); + +TapCommon.RegisterProperties("objectid",new ObjectIdProxy()); +``` + +### Android、iOS 调用 Unity 实现的 ITapPropertiesProxy 来获取所需要的值 + +Android 获取 `sessionToken` 以及 `objectId` + +```java +String sessionToken = TapPropertiesHolder.INSTANCE.getProperty("sessionToken"); +String objectId = TapPropertiesHolder.INSTANCE.getProperty("objectId"); +``` + +iOS 获取 `sessionToken` 以及 `objectId` + +```objectivec +NSString* sessionToken = [[TapPropertiesHolder shareInstance] getProperty:@"sessionToken"]; +NSString* objectId = [[TapPropertiesHolder shareInstance] getProperty:@"objectId"]; +``` + + + + + + + diff --git a/Documentation/Bridge.md.meta b/Documentation/Bridge.md.meta new file mode 100644 index 0000000..e8f8eec --- /dev/null +++ b/Documentation/Bridge.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c2be0874429944a43820d92aa06185f4 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Documentation/README.md b/Documentation/README.md new file mode 100644 index 0000000..bf7679e --- /dev/null +++ b/Documentation/README.md @@ -0,0 +1,89 @@ +## TapTap.Common + +### 接口描述 + +#### 1.获取地区 + +```c# +TapCommon.GetRegionCode(isMainland => +{ + // true 中国大陆 false 非中国大陆 +}); +``` + +#### 2. TapTap 是否安装 + +```c# +TapCommon.IsTapTapInstalled(installed => +{ + // true 安装 false 未安装 +}); +``` + +#### 3. TapTap IO 是否安装 + +```c# +TapCommon.IsTapTapGlobalInstalled(installed => +{ + // true 安装 false 未安装 +}); +``` + +### Android 独占方法 + +#### 4. 在 TapTap 更新游戏 + +```c# +TapCommon.UpdateGameInTapTap(appId,updateSuccess => +{ + // true 更新成功 false 更新失败 +}); +``` + +#### 5. 在 TapTap IO 更新游戏 + +```c# +TapCommon.UpdateGameInTapGlobal(appId,updateSuccess => +{ + // true 更新成功 false 更新失败 +}); +``` + +#### 6. 在 TapTap 打开当前游戏的评论区 + +```c# +TapCommon.OpenReviewInTapTap(appId,openSuccess => +{ + // true 打开评论区 false 打开失败 +}); +``` + +#### 6. 在 TapTap IO 打开当前游戏的评论区 + +```c# +TapCommon.OpenReviewInTapGlobal(appId,openSuccess => +{ + // true 打开评论区 false 打开失败 +}); +``` + +#### 7. 唤起 TapTap 客户端更新游戏 + +appId: 游戏在 TapTap 商店的唯一身份标识 + +例如:https://www.taptap.com/app/187168 ,其中 187168 是 appid. + +```c# +// 在 TapTap 客户端更新游戏,失败时通过浏览器打开 Tap 网站对应的游戏页面 +// 当你在国内区上架时使用 +bool isSuccess = await TapCommon.UpdateGameAndFailToWebInTapTap(string appId); +// 当你在海外区上架时使用 +bool isSuccess = await TapCommon.UpdateGameAndFailToWebInTapGlobal(string appId): +``` + +如果你需要在唤起 Tap 客户端失败时跳转到自己的网页 + +```c# +bool isSuccess = await TapCommon.UpdateGameAndFailToWebInTapTap(string appId, string webUrl) +bool isSuccess = await TapCommon.UpdateGameAndFailToWebInTapGlobal(string appId, string webUrl) +``` \ No newline at end of file diff --git a/Documentation/README.md.meta b/Documentation/README.md.meta new file mode 100644 index 0000000..1a6d5ca --- /dev/null +++ b/Documentation/README.md.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1d7008a3a22e45a4bfe9605e6d050a29 +timeCreated: 1616744132 \ No newline at end of file diff --git a/Editor.meta b/Editor.meta new file mode 100644 index 0000000..323556b --- /dev/null +++ b/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 28e2e71fed1414ad3978a4e5575065f6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/Plist.cs b/Editor/Plist.cs new file mode 100644 index 0000000..e4bed47 --- /dev/null +++ b/Editor/Plist.cs @@ -0,0 +1,954 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Xml; + +namespace TapTap.Common.Editor +{ + public static class Plist + { + private static List offsetTable = new List(); + private static List objectTable = new List(); + private static int refCount; + private static int objRefSize; + private static int offsetByteSize; + private static long offsetTableOffset; + + #region Public Functions + + public static object readPlist(string path) + { + using (FileStream f = new FileStream(path, FileMode.Open, FileAccess.Read)) + { + return readPlist(f, plistType.Auto); + } + } + + public static object readPlistSource(string source) + { + return readPlist(System.Text.Encoding.UTF8.GetBytes(source)); + } + + public static object readPlist(byte[] data) + { + return readPlist(new MemoryStream(data), plistType.Auto); + } + + public static plistType getPlistType(Stream stream) + { + byte[] magicHeader = new byte[8]; + stream.Read(magicHeader, 0, 8); + + if (BitConverter.ToInt64(magicHeader, 0) == 3472403351741427810) + { + return plistType.Binary; + } + else + { + return plistType.Xml; + } + } + + public static object readPlist(Stream stream, plistType type) + { + if (type == plistType.Auto) + { + type = getPlistType(stream); + stream.Seek(0, SeekOrigin.Begin); + } + + if (type == plistType.Binary) + { + using (BinaryReader reader = new BinaryReader(stream)) + { + byte[] data = reader.ReadBytes((int) reader.BaseStream.Length); + return readBinary(data); + } + } + else + { + XmlDocument xml = new XmlDocument(); + xml.XmlResolver = null; + xml.Load(stream); + return readXml(xml); + } + } + + public static void writeXml(object value, string path) + { + using (StreamWriter writer = new StreamWriter(path)) + { + writer.Write(writeXml(value)); + } + } + + public static void writeXml(object value, Stream stream) + { + using (StreamWriter writer = new StreamWriter(stream)) + { + writer.Write(writeXml(value)); + } + } + + public static string writeXml(object value) + { + using (MemoryStream ms = new MemoryStream()) + { + XmlWriterSettings xmlWriterSettings = new XmlWriterSettings(); + xmlWriterSettings.Encoding = new System.Text.UTF8Encoding(false); + xmlWriterSettings.ConformanceLevel = ConformanceLevel.Document; + xmlWriterSettings.Indent = true; + + using (XmlWriter xmlWriter = XmlWriter.Create(ms, xmlWriterSettings)) + { + xmlWriter.WriteStartDocument(); + //xmlWriter.WriteComment("DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" " + "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\""); + xmlWriter.WriteDocType("plist", "-//Apple Computer//DTD PLIST 1.0//EN", + "http://www.apple.com/DTDs/PropertyList-1.0.dtd", null); + xmlWriter.WriteStartElement("plist"); + xmlWriter.WriteAttributeString("version", "1.0"); + compose(value, xmlWriter); + xmlWriter.WriteEndElement(); + xmlWriter.WriteEndDocument(); + xmlWriter.Flush(); + xmlWriter.Close(); + return System.Text.Encoding.UTF8.GetString(ms.ToArray()); + } + } + } + + public static void writeBinary(object value, string path) + { + using (BinaryWriter writer = new BinaryWriter(new FileStream(path, FileMode.Create))) + { + writer.Write(writeBinary(value)); + } + } + + public static void writeBinary(object value, Stream stream) + { + using (BinaryWriter writer = new BinaryWriter(stream)) + { + writer.Write(writeBinary(value)); + } + } + + public static byte[] writeBinary(object value) + { + offsetTable.Clear(); + objectTable.Clear(); + refCount = 0; + objRefSize = 0; + offsetByteSize = 0; + offsetTableOffset = 0; + + //Do not count the root node, subtract by 1 + int totalRefs = countObject(value) - 1; + + refCount = totalRefs; + + objRefSize = RegulateNullBytes(BitConverter.GetBytes(refCount)).Length; + + composeBinary(value); + + writeBinaryString("bplist00", false); + + offsetTableOffset = (long) objectTable.Count; + + offsetTable.Add(objectTable.Count - 8); + + offsetByteSize = RegulateNullBytes(BitConverter.GetBytes(offsetTable[offsetTable.Count - 1])).Length; + + List offsetBytes = new List(); + + offsetTable.Reverse(); + + for (int i = 0; i < offsetTable.Count; i++) + { + offsetTable[i] = objectTable.Count - offsetTable[i]; + byte[] buffer = RegulateNullBytes(BitConverter.GetBytes(offsetTable[i]), offsetByteSize); + Array.Reverse(buffer); + offsetBytes.AddRange(buffer); + } + + objectTable.AddRange(offsetBytes); + + objectTable.AddRange(new byte[6]); + objectTable.Add(Convert.ToByte(offsetByteSize)); + objectTable.Add(Convert.ToByte(objRefSize)); + + var a = BitConverter.GetBytes((long) totalRefs + 1); + Array.Reverse(a); + objectTable.AddRange(a); + + objectTable.AddRange(BitConverter.GetBytes((long) 0)); + a = BitConverter.GetBytes(offsetTableOffset); + Array.Reverse(a); + objectTable.AddRange(a); + + return objectTable.ToArray(); + } + + #endregion + + #region Private Functions + + private static object readXml(XmlDocument xml) + { + XmlNode rootNode = xml.DocumentElement.ChildNodes[0]; + return parse(rootNode); + } + + private static object readBinary(byte[] data) + { + offsetTable.Clear(); + List offsetTableBytes = new List(); + objectTable.Clear(); + refCount = 0; + objRefSize = 0; + offsetByteSize = 0; + offsetTableOffset = 0; + + List bList = new List(data); + + List trailer = bList.GetRange(bList.Count - 32, 32); + + parseTrailer(trailer); + + objectTable = bList.GetRange(0, (int) offsetTableOffset); + + offsetTableBytes = bList.GetRange((int) offsetTableOffset, bList.Count - (int) offsetTableOffset - 32); + + parseOffsetTable(offsetTableBytes); + + return parseBinary(0); + } + + private static Dictionary parseDictionary(XmlNode node) + { + XmlNodeList children = node.ChildNodes; + if (children.Count % 2 != 0) + { + throw new DataMisalignedException("Dictionary elements must have an even number of child nodes"); + } + + Dictionary dict = new Dictionary(); + + for (int i = 0; i < children.Count; i += 2) + { + XmlNode keynode = children[i]; + XmlNode valnode = children[i + 1]; + + if (keynode.Name != "key") + { + throw new ApplicationException("expected a key node"); + } + + object result = parse(valnode); + + if (result != null) + { + dict.Add(keynode.InnerText, result); + } + } + + return dict; + } + + private static List parseArray(XmlNode node) + { + List array = new List(); + + foreach (XmlNode child in node.ChildNodes) + { + object result = parse(child); + if (result != null) + { + array.Add(result); + } + } + + return array; + } + + private static void composeArray(List value, XmlWriter writer) + { + writer.WriteStartElement("array"); + foreach (object obj in value) + { + compose(obj, writer); + } + + writer.WriteEndElement(); + } + + private static object parse(XmlNode node) + { + switch (node.Name) + { + case "dict": + return parseDictionary(node); + case "array": + return parseArray(node); + case "string": + return node.InnerText; + case "integer": + // int result; + //int.TryParse(node.InnerText, System.Globalization.NumberFormatInfo.InvariantInfo, out result); + return Convert.ToInt32(node.InnerText, System.Globalization.NumberFormatInfo.InvariantInfo); + case "real": + return Convert.ToDouble(node.InnerText, System.Globalization.NumberFormatInfo.InvariantInfo); + case "false": + return false; + case "true": + return true; + case "null": + return null; + case "date": + return XmlConvert.ToDateTime(node.InnerText, XmlDateTimeSerializationMode.Utc); + case "data": + return Convert.FromBase64String(node.InnerText); + } + + throw new ApplicationException(String.Format("Plist Node `{0}' is not supported", node.Name)); + } + + private static void compose(object value, XmlWriter writer) + { + if (value == null || value is string) + { + writer.WriteElementString("string", value as string); + } + else if (value is int || value is long) + { + writer.WriteElementString("integer", + ((int) value).ToString(System.Globalization.NumberFormatInfo.InvariantInfo)); + } + else if (value is System.Collections.Generic.Dictionary || + value.GetType().ToString().StartsWith("System.Collections.Generic.Dictionary`2[System.String")) + { + //Convert to Dictionary + Dictionary dic = value as Dictionary; + if (dic == null) + { + dic = new Dictionary(); + IDictionary idic = (IDictionary) value; + foreach (var key in idic.Keys) + { + dic.Add(key.ToString(), idic[key]); + } + } + + writeDictionaryValues(dic, writer); + } + else if (value is List) + { + composeArray((List) value, writer); + } + else if (value is byte[]) + { + writer.WriteElementString("data", Convert.ToBase64String((Byte[]) value)); + } + else if (value is float || value is double) + { + writer.WriteElementString("real", + ((double) value).ToString(System.Globalization.NumberFormatInfo.InvariantInfo)); + } + else if (value is DateTime) + { + DateTime time = (DateTime) value; + string theString = XmlConvert.ToString(time, XmlDateTimeSerializationMode.Utc); + writer.WriteElementString("date", theString); //, "yyyy-MM-ddTHH:mm:ssZ")); + } + else if (value is bool) + { + writer.WriteElementString(value.ToString().ToLower(), ""); + } + else + { + throw new Exception(String.Format("Value type '{0}' is unhandled", value.GetType().ToString())); + } + } + + private static void writeDictionaryValues(Dictionary dictionary, XmlWriter writer) + { + writer.WriteStartElement("dict"); + foreach (string key in dictionary.Keys) + { + object value = dictionary[key]; + writer.WriteElementString("key", key); + compose(value, writer); + } + + writer.WriteEndElement(); + } + + private static int countObject(object value) + { + int count = 0; + switch (value.GetType().ToString()) + { + case "System.Collections.Generic.Dictionary`2[System.String,System.Object]": + Dictionary dict = (Dictionary) value; + foreach (string key in dict.Keys) + { + count += countObject(dict[key]); + } + + count += dict.Keys.Count; + count++; + break; + case "System.Collections.Generic.List`1[System.Object]": + List list = (List) value; + foreach (object obj in list) + { + count += countObject(obj); + } + + count++; + break; + default: + count++; + break; + } + + return count; + } + + private static byte[] writeBinaryDictionary(Dictionary dictionary) + { + List buffer = new List(); + List header = new List(); + List refs = new List(); + for (int i = dictionary.Count - 1; i >= 0; i--) + { + var o = new object[dictionary.Count]; + dictionary.Values.CopyTo(o, 0); + composeBinary(o[i]); + offsetTable.Add(objectTable.Count); + refs.Add(refCount); + refCount--; + } + + for (int i = dictionary.Count - 1; i >= 0; i--) + { + var o = new string[dictionary.Count]; + dictionary.Keys.CopyTo(o, 0); + composeBinary(o[i]); //); + offsetTable.Add(objectTable.Count); + refs.Add(refCount); + refCount--; + } + + if (dictionary.Count < 15) + { + header.Add(Convert.ToByte(0xD0 | Convert.ToByte(dictionary.Count))); + } + else + { + header.Add(0xD0 | 0xf); + header.AddRange(writeBinaryInteger(dictionary.Count, false)); + } + + + foreach (int val in refs) + { + byte[] refBuffer = RegulateNullBytes(BitConverter.GetBytes(val), objRefSize); + Array.Reverse(refBuffer); + buffer.InsertRange(0, refBuffer); + } + + buffer.InsertRange(0, header); + + + objectTable.InsertRange(0, buffer); + + return buffer.ToArray(); + } + + private static byte[] composeBinaryArray(List objects) + { + List buffer = new List(); + List header = new List(); + List refs = new List(); + + for (int i = objects.Count - 1; i >= 0; i--) + { + composeBinary(objects[i]); + offsetTable.Add(objectTable.Count); + refs.Add(refCount); + refCount--; + } + + if (objects.Count < 15) + { + header.Add(Convert.ToByte(0xA0 | Convert.ToByte(objects.Count))); + } + else + { + header.Add(0xA0 | 0xf); + header.AddRange(writeBinaryInteger(objects.Count, false)); + } + + foreach (int val in refs) + { + byte[] refBuffer = RegulateNullBytes(BitConverter.GetBytes(val), objRefSize); + Array.Reverse(refBuffer); + buffer.InsertRange(0, refBuffer); + } + + buffer.InsertRange(0, header); + + objectTable.InsertRange(0, buffer); + + return buffer.ToArray(); + } + + private static byte[] composeBinary(object obj) + { + byte[] value; + switch (obj.GetType().ToString()) + { + case "System.Collections.Generic.Dictionary`2[System.String,System.Object]": + value = writeBinaryDictionary((Dictionary) obj); + return value; + + case "System.Collections.Generic.List`1[System.Object]": + value = composeBinaryArray((List) obj); + return value; + + case "System.Byte[]": + value = writeBinaryByteArray((byte[]) obj); + return value; + + case "System.Double": + value = writeBinaryDouble((double) obj); + return value; + + case "System.Int32": + value = writeBinaryInteger((int) obj, true); + return value; + + case "System.String": + value = writeBinaryString((string) obj, true); + return value; + + case "System.DateTime": + value = writeBinaryDate((DateTime) obj); + return value; + + case "System.Boolean": + value = writeBinaryBool((bool) obj); + return value; + + default: + return new byte[0]; + } + } + + public static byte[] writeBinaryDate(DateTime obj) + { + List buffer = + new List(RegulateNullBytes(BitConverter.GetBytes(PlistDateConverter.ConvertToAppleTimeStamp(obj)), + 8)); + buffer.Reverse(); + buffer.Insert(0, 0x33); + objectTable.InsertRange(0, buffer); + return buffer.ToArray(); + } + + public static byte[] writeBinaryBool(bool obj) + { + List buffer = new List(new byte[1] {(bool) obj ? (byte) 9 : (byte) 8}); + objectTable.InsertRange(0, buffer); + return buffer.ToArray(); + } + + private static byte[] writeBinaryInteger(int value, bool write) + { + List buffer = new List(BitConverter.GetBytes((long) value)); + buffer = new List(RegulateNullBytes(buffer.ToArray())); + while (buffer.Count != Math.Pow(2, Math.Log(buffer.Count) / Math.Log(2))) + buffer.Add(0); + int header = 0x10 | (int) (Math.Log(buffer.Count) / Math.Log(2)); + + buffer.Reverse(); + + buffer.Insert(0, Convert.ToByte(header)); + + if (write) + objectTable.InsertRange(0, buffer); + + return buffer.ToArray(); + } + + private static byte[] writeBinaryDouble(double value) + { + List buffer = new List(RegulateNullBytes(BitConverter.GetBytes(value), 4)); + while (buffer.Count != Math.Pow(2, Math.Log(buffer.Count) / Math.Log(2))) + buffer.Add(0); + int header = 0x20 | (int) (Math.Log(buffer.Count) / Math.Log(2)); + + buffer.Reverse(); + + buffer.Insert(0, Convert.ToByte(header)); + + objectTable.InsertRange(0, buffer); + + return buffer.ToArray(); + } + + private static byte[] writeBinaryByteArray(byte[] value) + { + List buffer = new List(value); + List header = new List(); + if (value.Length < 15) + { + header.Add(Convert.ToByte(0x40 | Convert.ToByte(value.Length))); + } + else + { + header.Add(0x40 | 0xf); + header.AddRange(writeBinaryInteger(buffer.Count, false)); + } + + buffer.InsertRange(0, header); + + objectTable.InsertRange(0, buffer); + + return buffer.ToArray(); + } + + private static byte[] writeBinaryString(string value, bool head) + { + List buffer = new List(); + List header = new List(); + foreach (char chr in value.ToCharArray()) + buffer.Add(Convert.ToByte(chr)); + + if (head) + { + if (value.Length < 15) + { + header.Add(Convert.ToByte(0x50 | Convert.ToByte(value.Length))); + } + else + { + header.Add(0x50 | 0xf); + header.AddRange(writeBinaryInteger(buffer.Count, false)); + } + } + + buffer.InsertRange(0, header); + + objectTable.InsertRange(0, buffer); + + return buffer.ToArray(); + } + + private static byte[] RegulateNullBytes(byte[] value) + { + return RegulateNullBytes(value, 1); + } + + private static byte[] RegulateNullBytes(byte[] value, int minBytes) + { + Array.Reverse(value); + List bytes = new List(value); + for (int i = 0; i < bytes.Count; i++) + { + if (bytes[i] == 0 && bytes.Count > minBytes) + { + bytes.Remove(bytes[i]); + i--; + } + else + break; + } + + if (bytes.Count < minBytes) + { + int dist = minBytes - bytes.Count; + for (int i = 0; i < dist; i++) + bytes.Insert(0, 0); + } + + value = bytes.ToArray(); + Array.Reverse(value); + return value; + } + + private static void parseTrailer(List trailer) + { + offsetByteSize = BitConverter.ToInt32(RegulateNullBytes(trailer.GetRange(6, 1).ToArray(), 4), 0); + objRefSize = BitConverter.ToInt32(RegulateNullBytes(trailer.GetRange(7, 1).ToArray(), 4), 0); + byte[] refCountBytes = trailer.GetRange(12, 4).ToArray(); + Array.Reverse(refCountBytes); + refCount = BitConverter.ToInt32(refCountBytes, 0); + byte[] offsetTableOffsetBytes = trailer.GetRange(24, 8).ToArray(); + Array.Reverse(offsetTableOffsetBytes); + offsetTableOffset = BitConverter.ToInt64(offsetTableOffsetBytes, 0); + } + + private static void parseOffsetTable(List offsetTableBytes) + { + for (int i = 0; i < offsetTableBytes.Count; i += offsetByteSize) + { + byte[] buffer = offsetTableBytes.GetRange(i, offsetByteSize).ToArray(); + Array.Reverse(buffer); + offsetTable.Add(BitConverter.ToInt32(RegulateNullBytes(buffer, 4), 0)); + } + } + + private static object parseBinaryDictionary(int objRef) + { + Dictionary buffer = new Dictionary(); + List refs = new List(); + int refCount = 0; + + int refStartPosition; + refCount = getCount(offsetTable[objRef], out refStartPosition); + + + if (refCount < 15) + refStartPosition = offsetTable[objRef] + 1; + else + refStartPosition = offsetTable[objRef] + 2 + + RegulateNullBytes(BitConverter.GetBytes(refCount), 1).Length; + + for (int i = refStartPosition; i < refStartPosition + refCount * 2 * objRefSize; i += objRefSize) + { + byte[] refBuffer = objectTable.GetRange(i, objRefSize).ToArray(); + Array.Reverse(refBuffer); + refs.Add(BitConverter.ToInt32(RegulateNullBytes(refBuffer, 4), 0)); + } + + for (int i = 0; i < refCount; i++) + { + buffer.Add((string) parseBinary(refs[i]), parseBinary(refs[i + refCount])); + } + + return buffer; + } + + private static object parseBinaryArray(int objRef) + { + List buffer = new List(); + List refs = new List(); + int refCount = 0; + + int refStartPosition; + refCount = getCount(offsetTable[objRef], out refStartPosition); + + + if (refCount < 15) + refStartPosition = offsetTable[objRef] + 1; + else + //The following integer has a header aswell so we increase the refStartPosition by two to account for that. + refStartPosition = offsetTable[objRef] + 2 + + RegulateNullBytes(BitConverter.GetBytes(refCount), 1).Length; + + for (int i = refStartPosition; i < refStartPosition + refCount * objRefSize; i += objRefSize) + { + byte[] refBuffer = objectTable.GetRange(i, objRefSize).ToArray(); + Array.Reverse(refBuffer); + refs.Add(BitConverter.ToInt32(RegulateNullBytes(refBuffer, 4), 0)); + } + + for (int i = 0; i < refCount; i++) + { + buffer.Add(parseBinary(refs[i])); + } + + return buffer; + } + + private static int getCount(int bytePosition, out int newBytePosition) + { + byte headerByte = objectTable[bytePosition]; + byte headerByteTrail = Convert.ToByte(headerByte & 0xf); + int count; + if (headerByteTrail < 15) + { + count = headerByteTrail; + newBytePosition = bytePosition + 1; + } + else + count = (int) parseBinaryInt(bytePosition + 1, out newBytePosition); + + return count; + } + + private static object parseBinary(int objRef) + { + byte header = objectTable[offsetTable[objRef]]; + switch (header & 0xF0) + { + case 0: + { + //If the byte is + //0 return null + //9 return true + //8 return false + return (objectTable[offsetTable[objRef]] == 0) + ? (object) null + : ((objectTable[offsetTable[objRef]] == 9) ? true : false); + } + case 0x10: + { + return parseBinaryInt(offsetTable[objRef]); + } + case 0x20: + { + return parseBinaryReal(offsetTable[objRef]); + } + case 0x30: + { + return parseBinaryDate(offsetTable[objRef]); + } + case 0x40: + { + return parseBinaryByteArray(offsetTable[objRef]); + } + case 0x50: //String ASCII + { + return parseBinaryAsciiString(offsetTable[objRef]); + } + case 0x60: //String Unicode + { + return parseBinaryUnicodeString(offsetTable[objRef]); + } + case 0xD0: + { + return parseBinaryDictionary(objRef); + } + case 0xA0: + { + return parseBinaryArray(objRef); + } + } + + throw new Exception("This type is not supported"); + } + + public static object parseBinaryDate(int headerPosition) + { + byte[] buffer = objectTable.GetRange(headerPosition + 1, 8).ToArray(); + Array.Reverse(buffer); + double appleTime = BitConverter.ToDouble(buffer, 0); + DateTime result = PlistDateConverter.ConvertFromAppleTimeStamp(appleTime); + return result; + } + + private static object parseBinaryInt(int headerPosition) + { + int output; + return parseBinaryInt(headerPosition, out output); + } + + private static object parseBinaryInt(int headerPosition, out int newHeaderPosition) + { + byte header = objectTable[headerPosition]; + int byteCount = (int) Math.Pow(2, header & 0xf); + byte[] buffer = objectTable.GetRange(headerPosition + 1, byteCount).ToArray(); + Array.Reverse(buffer); + //Add one to account for the header byte + newHeaderPosition = headerPosition + byteCount + 1; + return BitConverter.ToInt32(RegulateNullBytes(buffer, 4), 0); + } + + private static object parseBinaryReal(int headerPosition) + { + byte header = objectTable[headerPosition]; + int byteCount = (int) Math.Pow(2, header & 0xf); + byte[] buffer = objectTable.GetRange(headerPosition + 1, byteCount).ToArray(); + Array.Reverse(buffer); + + return BitConverter.ToDouble(RegulateNullBytes(buffer, 8), 0); + } + + private static object parseBinaryAsciiString(int headerPosition) + { + int charStartPosition; + int charCount = getCount(headerPosition, out charStartPosition); + + var buffer = objectTable.GetRange(charStartPosition, charCount); + return buffer.Count > 0 ? Encoding.ASCII.GetString(buffer.ToArray()) : string.Empty; + } + + private static object parseBinaryUnicodeString(int headerPosition) + { + int charStartPosition; + int charCount = getCount(headerPosition, out charStartPosition); + charCount = charCount * 2; + + byte[] buffer = new byte[charCount]; + byte one, two; + + for (int i = 0; i < charCount; i += 2) + { + one = objectTable.GetRange(charStartPosition + i, 1)[0]; + two = objectTable.GetRange(charStartPosition + i + 1, 1)[0]; + + if (BitConverter.IsLittleEndian) + { + buffer[i] = two; + buffer[i + 1] = one; + } + else + { + buffer[i] = one; + buffer[i + 1] = two; + } + } + + return Encoding.Unicode.GetString(buffer); + } + + private static object parseBinaryByteArray(int headerPosition) + { + int byteStartPosition; + int byteCount = getCount(headerPosition, out byteStartPosition); + return objectTable.GetRange(byteStartPosition, byteCount).ToArray(); + } + + #endregion + } + + public enum plistType + { + Auto, + Binary, + Xml + } + + public static class PlistDateConverter + { + public static long timeDifference = 978307200; + + public static long GetAppleTime(long unixTime) + { + return unixTime - timeDifference; + } + + public static long GetUnixTime(long appleTime) + { + return appleTime + timeDifference; + } + + public static DateTime ConvertFromAppleTimeStamp(double timestamp) + { + DateTime origin = new DateTime(2001, 1, 1, 0, 0, 0, 0); + return origin.AddSeconds(timestamp); + } + + public static double ConvertToAppleTimeStamp(DateTime date) + { + DateTime begin = new DateTime(2001, 1, 1, 0, 0, 0, 0); + TimeSpan diff = date - begin; + return Math.Floor(diff.TotalSeconds); + } + } +} \ No newline at end of file diff --git a/Editor/Plist.cs.meta b/Editor/Plist.cs.meta new file mode 100644 index 0000000..a99b2d9 --- /dev/null +++ b/Editor/Plist.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 66eefeda055244c784769597b08e679e +timeCreated: 1617120740 \ No newline at end of file diff --git a/Editor/TapCommonCompile.cs b/Editor/TapCommonCompile.cs new file mode 100644 index 0000000..4b5fc1f --- /dev/null +++ b/Editor/TapCommonCompile.cs @@ -0,0 +1,192 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEngine; + +#if UNITY_IOS +using UnityEditor.iOS.Xcode; +#endif +namespace TapTap.Common.Editor +{ +#if UNITY_IOS + public static class TapCommonCompile + { + public static string GetProjPath(string path) + { + return PBXProject.GetPBXProjectPath(path); + } + + public static PBXProject ParseProjPath(string path) + { + var proj = new PBXProject(); + proj.ReadFromString(File.ReadAllText(path)); + return proj; + } + + public static string GetUnityFrameworkTarget(PBXProject proj) + { +#if UNITY_2019_3_OR_NEWER + string target = proj.GetUnityFrameworkTargetGuid(); + return target; +#endif + var unityPhoneTarget = proj.TargetGuidByName("Unity-iPhone"); + return unityPhoneTarget; + } + + public static string GetUnityTarget(PBXProject proj) + { +#if UNITY_2019_3_OR_NEWER + string target = proj.GetUnityMainTargetGuid(); + return target; +#endif + var unityPhoneTarget = proj.TargetGuidByName("Unity-iPhone"); + return unityPhoneTarget; + } + + + public static bool CheckTarget(string target) + { + return string.IsNullOrEmpty(target); + } + + public static bool HandlerIOSSetting(string path, string appDataPath, string resourceName, + string modulePackageName, + string moduleName, string[] bundleNames, string target, string projPath, PBXProject proj) + { + var resourcePath = Path.Combine(path, resourceName); + + var parentFolder = Directory.GetParent(appDataPath).FullName; + + Debug.Log($"ProjectFolder path:{parentFolder}"); + + if (Directory.Exists(resourcePath)) + { + Directory.Delete(resourcePath, true); + } + + Directory.CreateDirectory(resourcePath); + + var remotePackagePath = + TapFileHelper.FilterFile(parentFolder + "/Library/PackageCache/", $"{modulePackageName}@"); + + var assetLocalPackagePath = TapFileHelper.FilterFile(parentFolder + "/Assets/TapTap/", moduleName); + + var localPackagePath = TapFileHelper.FilterFile(parentFolder, moduleName); + + var tdsResourcePath = ""; + + if (!string.IsNullOrEmpty(remotePackagePath)) + { + tdsResourcePath = remotePackagePath; + } + else if (!string.IsNullOrEmpty(assetLocalPackagePath)) + { + tdsResourcePath = assetLocalPackagePath; + } + else if (!string.IsNullOrEmpty(localPackagePath)) + { + tdsResourcePath = localPackagePath; + } + + if (string.IsNullOrEmpty(tdsResourcePath)) + { + Debug.LogError("tdsResourcePath is NUll"); + return false; + } + + tdsResourcePath = $"{tdsResourcePath}/Plugins/iOS/Resource"; + + Debug.Log($"Find {moduleName} path:{tdsResourcePath}"); + + if (!Directory.Exists(tdsResourcePath)) + { + Debug.LogError($"Can't Find {bundleNames}"); + return false; + } + + TapFileHelper.CopyAndReplaceDirectory(tdsResourcePath, resourcePath); + foreach (var name in bundleNames) + { + proj.AddFileToBuild(target, + proj.AddFile(Path.Combine(resourcePath, name), Path.Combine(resourcePath, name), + PBXSourceTree.Source)); + } + File.WriteAllText(projPath, proj.WriteToString()); + return true; + } + + public static bool HandlerPlist(string pathToBuildProject, string infoPlistPath) + { + //添加info + var plistPath = pathToBuildProject + "/Info.plist"; + var plist = new PlistDocument(); + plist.ReadFromString(File.ReadAllText(plistPath)); + var rootDic = plist.root; + + var items = new List + { + "tapsdk", + "tapiosdk", + }; + + if (!(rootDic["LSApplicationQueriesSchemes"] is PlistElementArray plistElementList)) + { + plistElementList = rootDic.CreateArray("LSApplicationQueriesSchemes"); + } + + foreach (var t in items) + { + plistElementList.AddString(t); + } + + if (string.IsNullOrEmpty(infoPlistPath)) return false; + var dic = (Dictionary) Plist.readPlist(infoPlistPath); + var taptapId = ""; + + foreach (var item in dic) + { + if (item.Key.Equals("taptap")) + { + var taptapDic = (Dictionary) item.Value; + foreach (var taptapItem in taptapDic.Where(taptapItem => taptapItem.Key.Equals("client_id"))) + { + taptapId = "tt" + (string) taptapItem.Value; + } + } + else + { + rootDic.SetString(item.Key, item.Value.ToString()); + } + } + + //添加url + var dict = plist.root.AsDict(); + if (!(dict["CFBundleURLTypes"] is PlistElementArray array)) + { + array = dict.CreateArray("CFBundleURLTypes"); + } + + var dict2 = array.AddDict(); + dict2.SetString("CFBundleURLName", "TapTap"); + var array2 = dict2.CreateArray("CFBundleURLSchemes"); + array2.AddString(taptapId); + + Debug.Log("TapSDK change plist Success"); + File.WriteAllText(plistPath, plist.WriteToString()); + return true; + } + + public static string GetValueFromPlist(string infoPlistPath, string key) + { + if (infoPlistPath == null) + { + return null; + } + + var dic = (Dictionary) Plist.readPlist(infoPlistPath); + return (from item in dic where item.Key.Equals(key) select (string) item.Value).FirstOrDefault(); + } + + } +#endif +} \ No newline at end of file diff --git a/Editor/TapCommonCompile.cs.meta b/Editor/TapCommonCompile.cs.meta new file mode 100644 index 0000000..77e4114 --- /dev/null +++ b/Editor/TapCommonCompile.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c5475af505e04119831448fe963f9c2c +timeCreated: 1617120740 \ No newline at end of file diff --git a/Editor/TapCommonIOSProcessor.cs b/Editor/TapCommonIOSProcessor.cs new file mode 100644 index 0000000..75ff3da --- /dev/null +++ b/Editor/TapCommonIOSProcessor.cs @@ -0,0 +1,71 @@ +using System.IO; +using UnityEditor; +using UnityEditor.Callbacks; +# if UNITY_IOS +using UnityEditor.iOS.Xcode; +#endif +using UnityEngine; + +namespace TapTap.Common.Editor +{ +# if UNITY_IOS + public static class TapCommonIOSProcessor + { + // 添加标签,unity导出工程后自动执行该函数 + [PostProcessBuild(99)] + public static void OnPostprocessBuild(BuildTarget buildTarget, string path) + { + if (buildTarget != BuildTarget.iOS) return; + + // 获得工程路径 + var projPath = TapCommonCompile.GetProjPath(path); + var proj = TapCommonCompile.ParseProjPath(projPath); + var target = TapCommonCompile.GetUnityTarget(proj); + var unityFrameworkTarget = TapCommonCompile.GetUnityFrameworkTarget(proj); + + if (TapCommonCompile.CheckTarget(target)) + { + Debug.LogError("Unity-iPhone is NUll"); + return; + } + + proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC"); + proj.AddBuildProperty(unityFrameworkTarget, "OTHER_LDFLAGS", "-ObjC"); + + proj.SetBuildProperty(target, "ENABLE_BITCODE", "NO"); + proj.SetBuildProperty(target, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "YES"); + proj.SetBuildProperty(target, "SWIFT_VERSION", "5.0"); + proj.SetBuildProperty(target, "CLANG_ENABLE_MODULES", "YES"); + + proj.SetBuildProperty(unityFrameworkTarget, "ENABLE_BITCODE", "NO"); + proj.SetBuildProperty(unityFrameworkTarget, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "NO"); + proj.SetBuildProperty(unityFrameworkTarget, "SWIFT_VERSION", "5.0"); + proj.SetBuildProperty(unityFrameworkTarget, "CLANG_ENABLE_MODULES", "YES"); + + proj.AddFrameworkToProject(unityFrameworkTarget, "MobileCoreServices.framework", false); + proj.AddFrameworkToProject(unityFrameworkTarget, "WebKit.framework", false); + proj.AddFrameworkToProject(unityFrameworkTarget, "Security.framework", false); + proj.AddFrameworkToProject(unityFrameworkTarget, "SystemConfiguration.framework", false); + proj.AddFrameworkToProject(unityFrameworkTarget, "CoreTelephony.framework", false); + proj.AddFrameworkToProject(unityFrameworkTarget, "SystemConfiguration.framework", false); + + proj.AddFileToBuild(unityFrameworkTarget, + proj.AddFile("usr/lib/libc++.tbd", "libc++.tbd", PBXSourceTree.Sdk)); + + if (TapCommonCompile.HandlerIOSSetting(path, + Application.dataPath, + "TapCommonResource", + "com.taptap.tds.common", + "Common", + new[] {"TapCommonResource.bundle"}, + target, projPath, proj)) + { + Debug.Log("TapCommon add Bundle Success!"); + return; + } + + Debug.LogError("TapCommon add Bundle Failed!"); + } + } +#endif +} \ No newline at end of file diff --git a/Editor/TapCommonIOSProcessor.cs.meta b/Editor/TapCommonIOSProcessor.cs.meta new file mode 100644 index 0000000..7ed37ba --- /dev/null +++ b/Editor/TapCommonIOSProcessor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 28d4870389ed406eac7c8849da60c644 +timeCreated: 1617120740 \ No newline at end of file diff --git a/Editor/TapFileHelper.cs b/Editor/TapFileHelper.cs new file mode 100644 index 0000000..d60d306 --- /dev/null +++ b/Editor/TapFileHelper.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using System.IO; +using UnityEngine; + +namespace TapTap.Common.Editor +{ + public class TapFileHelper : System.IDisposable + { + private string filePath; + + public TapFileHelper(string fPath) + { + filePath = fPath; + if (!System.IO.File.Exists(filePath)) + { + Debug.LogError(filePath + "路径下文件不存在"); + return; + } + } + + public void WriteBelow(string below, string text) + { + StreamReader streamReader = new StreamReader(filePath); + string all = streamReader.ReadToEnd(); + streamReader.Close(); + int beginIndex = all.IndexOf(below, StringComparison.Ordinal); + if (beginIndex == -1) + { + Debug.LogError(filePath + "中没有找到字符串" + below); + return; + } + + int endIndex = all.LastIndexOf("\n", beginIndex + below.Length, StringComparison.Ordinal); + all = all.Substring(0, endIndex) + "\n" + text + "\n" + all.Substring(endIndex); + StreamWriter streamWriter = new StreamWriter(filePath); + streamWriter.Write(all); + streamWriter.Close(); + } + + public void Replace(string below, string newText) + { + StreamReader streamReader = new StreamReader(filePath); + string all = streamReader.ReadToEnd(); + streamReader.Close(); + int beginIndex = all.IndexOf(below, StringComparison.Ordinal); + if (beginIndex == -1) + { + Debug.LogError(filePath + "中没有找到字符串" + below); + return; + } + + all = all.Replace(below, newText); + StreamWriter streamWriter = new StreamWriter(filePath); + streamWriter.Write(all); + streamWriter.Close(); + } + + public void Dispose() + { + } + + public static void CopyAndReplaceDirectory(string srcPath, string dstPath) + { + if (Directory.Exists(dstPath)) + Directory.Delete(dstPath, true); + if (File.Exists(dstPath)) + File.Delete(dstPath); + + Directory.CreateDirectory(dstPath); + + foreach (var file in Directory.GetFiles(srcPath)) + File.Copy(file, Path.Combine(dstPath, Path.GetFileName(file))); + + foreach (var dir in Directory.GetDirectories(srcPath)) + CopyAndReplaceDirectory(dir, Path.Combine(dstPath, Path.GetFileName(dir))); + } + + public static string FilterFile(string srcPath, string filterName) + { + if (!Directory.Exists(srcPath)) + { + return null; + } + + foreach (var dir in Directory.GetDirectories(srcPath)) + { + string fileName = Path.GetFileName(dir); + if (fileName.StartsWith(filterName)) + { + return Path.Combine(srcPath, Path.GetFileName(dir)); + } + } + + return null; + } + + public static FileInfo RecursionFilterFile(string dir, string fileName) + { + List fileInfoList = new List(); + Director(dir, fileInfoList); + foreach (FileInfo item in fileInfoList) + { + if (fileName.Equals(item.Name)) + { + return item; + } + } + + return null; + } + + public static void Director(string dir, List list) + { + DirectoryInfo d = new DirectoryInfo(dir); + FileInfo[] files = d.GetFiles(); + DirectoryInfo[] directs = d.GetDirectories(); + foreach (FileInfo f in files) + { + list.Add(f); + } + + foreach (DirectoryInfo dd in directs) + { + Director(dd.FullName, list); + } + } + } +} \ No newline at end of file diff --git a/Editor/TapFileHelper.cs.meta b/Editor/TapFileHelper.cs.meta new file mode 100644 index 0000000..4544e0a --- /dev/null +++ b/Editor/TapFileHelper.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d1556fcb81944af6a42170d3e1c99269 +timeCreated: 1617120740 \ No newline at end of file diff --git a/Editor/TapTap.Common.Editor.asmdef b/Editor/TapTap.Common.Editor.asmdef new file mode 100644 index 0000000..f3863ba --- /dev/null +++ b/Editor/TapTap.Common.Editor.asmdef @@ -0,0 +1,13 @@ +{ + "name": "TapTap.Common.Editor", + "optionalUnityReferences": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [] +} \ No newline at end of file diff --git a/Editor/TapTap.Common.Editor.asmdef.meta b/Editor/TapTap.Common.Editor.asmdef.meta new file mode 100644 index 0000000..35eb2db --- /dev/null +++ b/Editor/TapTap.Common.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 616cea76def2d4f059b94440fc8cc03d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins.meta b/Plugins.meta new file mode 100644 index 0000000..4643bb3 --- /dev/null +++ b/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 72ddac62e7598413680ccc6ef4858979 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Android.meta b/Plugins/Android.meta new file mode 100644 index 0000000..1ef290c --- /dev/null +++ b/Plugins/Android.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c40d795a083b457fa3d923415533822c +timeCreated: 1616744098 \ No newline at end of file diff --git a/Plugins/Android/libs.meta b/Plugins/Android/libs.meta new file mode 100644 index 0000000..c2589e0 --- /dev/null +++ b/Plugins/Android/libs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9c15be9bece843a4b6998999a603f389 +timeCreated: 1616744107 \ No newline at end of file diff --git a/Plugins/Android/libs/TapCommon_3.5.0.aar b/Plugins/Android/libs/TapCommon_3.5.0.aar new file mode 100644 index 0000000..bb90299 Binary files /dev/null and b/Plugins/Android/libs/TapCommon_3.5.0.aar differ diff --git a/Plugins/Android/libs/TapCommon_3.5.0.aar.meta b/Plugins/Android/libs/TapCommon_3.5.0.aar.meta new file mode 100644 index 0000000..0136d2e --- /dev/null +++ b/Plugins/Android/libs/TapCommon_3.5.0.aar.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: 2e6f1e5009dd74466bb7808deb1ba7d8 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Android: Android + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/TapTap.Common.deps.json b/Plugins/TapTap.Common.deps.json new file mode 100644 index 0000000..5091e20 --- /dev/null +++ b/Plugins/TapTap.Common.deps.json @@ -0,0 +1,75 @@ +{ + "runtimeTarget": { + "name": ".NETStandard,Version=v2.0/", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETStandard,Version=v2.0": {}, + ".NETStandard,Version=v2.0/": { + "TapTap.Common/1.0.0": { + "dependencies": { + "NETStandard.Library": "2.0.3", + "UnityEditor": "0.0.0.0", + "UnityEngine": "0.0.0.0" + }, + "runtime": { + "TapTap.Common.dll": {} + } + }, + "Microsoft.NETCore.Platforms/1.1.0": {}, + "NETStandard.Library/2.0.3": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0" + } + }, + "UnityEditor/0.0.0.0": { + "runtime": { + "UnityEditor.dll": { + "assemblyVersion": "0.0.0.0", + "fileVersion": "0.0.0.0" + } + } + }, + "UnityEngine/0.0.0.0": { + "runtime": { + "UnityEngine.dll": { + "assemblyVersion": "0.0.0.0", + "fileVersion": "0.0.0.0" + } + } + } + } + }, + "libraries": { + "TapTap.Common/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "path": "microsoft.netcore.platforms/1.1.0", + "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" + }, + "NETStandard.Library/2.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", + "path": "netstandard.library/2.0.3", + "hashPath": "netstandard.library.2.0.3.nupkg.sha512" + }, + "UnityEditor/0.0.0.0": { + "type": "reference", + "serviceable": false, + "sha512": "" + }, + "UnityEngine/0.0.0.0": { + "type": "reference", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/Plugins/TapTap.Common.deps.json.meta b/Plugins/TapTap.Common.deps.json.meta new file mode 100644 index 0000000..b7df757 --- /dev/null +++ b/Plugins/TapTap.Common.deps.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 73783fbd0117e4f6088bf812d1a568b0 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/TapTap.Common.dll b/Plugins/TapTap.Common.dll new file mode 100644 index 0000000..8a9a192 Binary files /dev/null and b/Plugins/TapTap.Common.dll differ diff --git a/Plugins/TapTap.Common.dll.meta b/Plugins/TapTap.Common.dll.meta new file mode 100644 index 0000000..18a250b --- /dev/null +++ b/Plugins/TapTap.Common.dll.meta @@ -0,0 +1,86 @@ +fileFormatVersion: 2 +guid: 75f4d9bf431824223b16a7cb0de56fd3 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 0 + Exclude Linux64: 0 + Exclude OSXUniversal: 0 + Exclude Win: 0 + Exclude Win64: 0 + Exclude iOS: 1 + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: x86_64 + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: x86_64 + - first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: x86 + - first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: x86_64 + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/TapTap.Common.pdb b/Plugins/TapTap.Common.pdb new file mode 100644 index 0000000..6efe48a Binary files /dev/null and b/Plugins/TapTap.Common.pdb differ diff --git a/Plugins/TapTap.Common.pdb.meta b/Plugins/TapTap.Common.pdb.meta new file mode 100644 index 0000000..63ea256 --- /dev/null +++ b/Plugins/TapTap.Common.pdb.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0f443a727b2704d32966d84ec19ee8ee +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS.meta b/Plugins/iOS.meta new file mode 100644 index 0000000..9ba314a --- /dev/null +++ b/Plugins/iOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2e935f15b899147eaa8b62cdef502046 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource.meta b/Plugins/iOS/Resource.meta new file mode 100644 index 0000000..9f336ae --- /dev/null +++ b/Plugins/iOS/Resource.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2192f0da58ae410089b7aabfc9375ca4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle.meta b/Plugins/iOS/Resource/TapCommonResource.bundle.meta new file mode 100644 index 0000000..7261762 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 862aa0341df21484eb4a08a6ee21f9c3 +folderAsset: yes +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/TapCommonLanguage.json b/Plugins/iOS/Resource/TapCommonResource.bundle/TapCommonLanguage.json new file mode 100644 index 0000000..3507668 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/TapCommonLanguage.json @@ -0,0 +1,23 @@ +{ + "zh_hans":{ + "network_error_click_retry":"网络异常,点击重试" + }, + "en":{ + "network_error_click_retry":"Network error, click to retry" + }, + "zh_hant":{ + "network_error_click_retry":"網路異常,點擊重試" + }, + "ja":{ + "network_error_click_retry":"ネットワークエラーです。もう一度やり直してください" + }, + "ko":{ + "network_error_click_retry":"네트워크 오류, 다시 시도하기" + }, + "th":{ + "network_error_click_retry":"พบข้อผิดพลาดในการเชื่อมต่อ กรุณาลองอีกครั้ง" + }, + "id":{ + "network_error_click_retry":"Jaringan error. Harap coba lagi." + } +} diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/TapCommonLanguage.json.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/TapCommonLanguage.json.meta new file mode 100644 index 0000000..acd3dca --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/TapCommonLanguage.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 79e4f9ebbd71047bb9ab9a85daeb9193 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images.meta new file mode 100644 index 0000000..7223220 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b90cb19a0ccd14069b203014806a6748 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@2x.png b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@2x.png new file mode 100644 index 0000000..60119f8 Binary files /dev/null and b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@2x.png differ diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@2x.png.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@2x.png.meta new file mode 100644 index 0000000..3378791 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 19fc6b14a3c6245fb80d172e19bc459f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@3x.png b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@3x.png new file mode 100644 index 0000000..f88ef81 Binary files /dev/null and b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@3x.png differ diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@3x.png.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@3x.png.meta new file mode 100644 index 0000000..1f333e4 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_close@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6b195edcbdd694b0bb422b2f2c4423b9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@2x.png b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@2x.png new file mode 100644 index 0000000..0361994 Binary files /dev/null and b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@2x.png differ diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@2x.png.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@2x.png.meta new file mode 100644 index 0000000..3e03261 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 21fdeeca33c2d48258227cea39860103 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@3x.png b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@3x.png new file mode 100644 index 0000000..63c3b56 Binary files /dev/null and b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@3x.png differ diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@3x.png.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@3x.png.meta new file mode 100644 index 0000000..d1b9a56 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_cancel@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2f74478f5ddcc4628ad879e8c8f1cc22 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@2x.png b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@2x.png new file mode 100644 index 0000000..6251d3d Binary files /dev/null and b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@2x.png differ diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@2x.png.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@2x.png.meta new file mode 100644 index 0000000..b7852c8 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fbf577ace10714238ac825fb2069a5f5 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@3x.png b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@3x.png new file mode 100644 index 0000000..f26bec3 Binary files /dev/null and b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@3x.png differ diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@3x.png.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@3x.png.meta new file mode 100644 index 0000000..538891f --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_close@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 269ea3a1cfd224d50bbfc20e0b529eb0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@2x.png b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@2x.png new file mode 100644 index 0000000..371bf8d Binary files /dev/null and b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@2x.png differ diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@2x.png.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@2x.png.meta new file mode 100644 index 0000000..79f515f --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4ef285809644943588a98cc1bad12d80 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@3x.png b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@3x.png new file mode 100644 index 0000000..1db710b Binary files /dev/null and b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@3x.png differ diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@3x.png.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@3x.png.meta new file mode 100644 index 0000000..6f65ad0 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_dialog_confirm@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 497164c4329b345dc9fcf9a603822bd4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@2x.png b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@2x.png new file mode 100644 index 0000000..f4b63f4 Binary files /dev/null and b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@2x.png differ diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@2x.png.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@2x.png.meta new file mode 100644 index 0000000..c28aee4 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6e4c19f7cee284504ba294c04ddc21ff +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@3x.png b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@3x.png new file mode 100644 index 0000000..4f2ea9e Binary files /dev/null and b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@3x.png differ diff --git a/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@3x.png.meta b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@3x.png.meta new file mode 100644 index 0000000..4df7c85 --- /dev/null +++ b/Plugins/iOS/Resource/TapCommonResource.bundle/images/ic_reload@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 440bced484e8f4ab28accda051d448f0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework.meta b/Plugins/iOS/TapCommonSDK.framework.meta new file mode 100644 index 0000000..8e03b27 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework.meta @@ -0,0 +1,28 @@ +fileFormatVersion: 2 +guid: 2a236b3c23efa4a80b48d344322d8741 +folderAsset: yes +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers.meta b/Plugins/iOS/TapCommonSDK.framework/Headers.meta new file mode 100644 index 0000000..5847f31 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5386a5f959aa641daaa74403aaf5d5eb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/ActionModel.h b/Plugins/iOS/TapCommonSDK.framework/Headers/ActionModel.h new file mode 100644 index 0000000..9523395 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/ActionModel.h @@ -0,0 +1,20 @@ +// +// ActionModel.h +// TDSCommon +// +// Created by TapTap-David on 2021/1/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface ActionModel : NSObject +@property (nonatomic, copy) NSString *click; +@property (nonatomic, copy) NSString *like; +@property (nonatomic, copy) NSString *comment; +@property (nonatomic, copy) NSString *collect; +@property (nonatomic, copy) NSString *impression; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/ActionModel.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/ActionModel.h.meta new file mode 100644 index 0000000..841260f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/ActionModel.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7192b5b81be2642b382635a17f4f6677 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/ComponentMessageDelegate.h b/Plugins/iOS/TapCommonSDK.framework/Headers/ComponentMessageDelegate.h new file mode 100644 index 0000000..e163f5f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/ComponentMessageDelegate.h @@ -0,0 +1,16 @@ +// +// ComponentMessageDelegate.h +// TapCommonSDK +// +// Created by Bottle K on 2021/5/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@protocol ComponentMessageDelegate + +- (void)onMessageWithCode:(NSInteger)code extras:(NSDictionary *)extras; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/ComponentMessageDelegate.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/ComponentMessageDelegate.h.meta new file mode 100644 index 0000000..99c52f0 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/ComponentMessageDelegate.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9af68ef3917fb467483451283cd49b10 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/EngineBridgeError.h b/Plugins/iOS/TapCommonSDK.framework/Headers/EngineBridgeError.h new file mode 100644 index 0000000..cc6396e --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/EngineBridgeError.h @@ -0,0 +1,19 @@ +// +// EngineBridgeError.h +// EngineBridge +// +// Created by xe on 2020/9/28. +// Copyright © 2020 xe. All rights reserved. +// +#import + +typedef NSString *KLTypeStr NS_STRING_ENUM; + +FOUNDATION_EXPORT KLTypeStr const COMMAND_PARSE_ERROR; + +FOUNDATION_EXPORT KLTypeStr const COMMAND_SERVICE_ERROR; + +FOUNDATION_EXPORT KLTypeStr const COMMAND_METHOD_ERROR; + +FOUNDATION_EXPORT KLTypeStr const COMMAND_ARGS_ERROR; + diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/EngineBridgeError.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/EngineBridgeError.h.meta new file mode 100644 index 0000000..4030e33 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/EngineBridgeError.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6e5d1a4fbca2e4eed9c2b0742ee386f0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/LoginModel.h b/Plugins/iOS/TapCommonSDK.framework/Headers/LoginModel.h new file mode 100644 index 0000000..f2fff07 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/LoginModel.h @@ -0,0 +1,44 @@ +// +// LoginModel.h +// TapCommonSDK +// +// Created by Bottle K on 2021/6/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +//登录流程中触发的事件 +FOUNDATION_EXPORT NSString *const LOGIN_ACTION_AUTHORIZE_START; +FOUNDATION_EXPORT NSString *const LOGIN_ACTION_TAPTAP_AUTHORIZE_OPEN; +FOUNDATION_EXPORT NSString *const LOGIN_ACTION_TAPTAP_AUTHORIZE_BACK; +FOUNDATION_EXPORT NSString *const LOGIN_ACTION_TAPTAP_AUTHORIZE_TOKEN; +FOUNDATION_EXPORT NSString *const LOGIN_ACTION_TAPTAP_AUTHORIZE_PROFILE; +FOUNDATION_EXPORT NSString *const LOGIN_ACTION_TAPTAP_AUTHORIZE_SUCCESS; +FOUNDATION_EXPORT NSString *const LOGIN_ACTION_TAPTAP_AUTHORIZE_FAIL; +FOUNDATION_EXPORT NSString *const LOGIN_ACTION_TAPTAP_AUTHORIZE_CANCEL; + +//登录类型 +FOUNDATION_EXPORT NSString *const LOGIN_TYPE_TAPTAP; +FOUNDATION_EXPORT NSString *const LOGIN_TYPE_WEBVIEW; +FOUNDATION_EXPORT NSString *const LOGIN_TYPE_AUTO; + +@interface LoginModel : NSObject +//每次登录流程唯一ID +@property (nonatomic, copy) NSString *login_session_id; + +//登录流程中触发的事件 +@property (nonatomic, copy) NSString *login_action; + +//登录类型 +@property (nonatomic, copy, nullable) NSString *login_type; + +//错误code +@property (nonatomic, copy, nullable) NSString *login_error_code; + +//错误message +@property (nonatomic, copy, nullable) NSString *login_error_msg; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/LoginModel.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/LoginModel.h.meta new file mode 100644 index 0000000..36cb697 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/LoginModel.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5f386589c90264b5eb99eac6931aceeb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSArray+Safe.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSArray+Safe.h new file mode 100644 index 0000000..0e495b7 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSArray+Safe.h @@ -0,0 +1,25 @@ +// +// NSArray+Safe.h +// TapAchievement +// +// Created by TapTap-David on 2020/9/15. +// Copyright © 2020 taptap. All rights reserved. +// + +#import + +@interface NSArray (Safe) + +- (void)tds_each:(void (^)(id object, NSUInteger index))block; + +- (void)tds_apply:(void (^)(id object, NSUInteger index))block; + +- (NSArray *)tds_map:(id (^)(id object, NSUInteger index))block; + +- (id)tds_reduce:(id (^)(id accumulated, id object))block; + +- (NSArray *)tds_filter:(BOOL (^)(id object, NSUInteger index))block; + +- (id)tds_safeObjectAtIndex:(NSUInteger)index; + +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSArray+Safe.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSArray+Safe.h.meta new file mode 100644 index 0000000..32933a6 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSArray+Safe.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e91dab301ab7946cd8908ae8bc3a74dc +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSBundle+Tools.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSBundle+Tools.h new file mode 100644 index 0000000..8580684 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSBundle+Tools.h @@ -0,0 +1,16 @@ +// +// NSBundle+Tools.h +// TDSAchievement +// +// Created by TapTap-David on 2020/8/26. +// Copyright © 2020 taptap. All rights reserved. +// +#import + +@interface NSBundle (Tools) ++ (instancetype)tds_bundleName:(NSString *)bundleName aClass:(Class)aClass; +- (NSString *)tds_localizedStringForKey:(NSString *)key value:(NSString *)value; +- (NSString *)tds_localizedStringForKey:(NSString *)key; + +- (UIImage *)tds_imageName:(NSString *)imageName; +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSBundle+Tools.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSBundle+Tools.h.meta new file mode 100644 index 0000000..a7d63c3 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSBundle+Tools.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 272cc39eb993047508c62438a989e128 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSData+Tools.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSData+Tools.h new file mode 100644 index 0000000..179ce72 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSData+Tools.h @@ -0,0 +1,22 @@ +// +// NSData+JSON.h +// NativeApp +// +// Created by JiangJiahao on 2018/3/9. +// Copyright © 2018年 JiangJiahao. All rights reserved. +// + +#import + +@interface NSData (JSON) + +- (NSArray *)tds_arrayFromJsonData; + +- (NSDictionary *)tds_dictionaryFromJsonData; + +- (NSString *)tds_stringFromData; + +- (NSData *)tds_aes256Encrypt:(NSString *)key; +- (NSData *)tds_aes256Decrypt:(NSString *)key; + +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSData+Tools.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSData+Tools.h.meta new file mode 100644 index 0000000..6d320f9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSData+Tools.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0a978e0a05c99408484e34c2ccb3464d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+JSON.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+JSON.h new file mode 100644 index 0000000..57fa4af --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+JSON.h @@ -0,0 +1,18 @@ +// +// NSDictionary+JSON.h +// NativeApp +// +// Created by JiangJiahao on 2018/10/11. +// Copyright © 2018 JiangJiahao. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSDictionary (JSON) +- (NSString *)tds_jsonString; +- (NSString *)tds_jsonStringWithoutOptions:(NSJSONWritingOptions)opt; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+JSON.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+JSON.h.meta new file mode 100644 index 0000000..bb60a63 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+JSON.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 209c5870a15de4f4f8b26b21895a5955 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+TDSSafe.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+TDSSafe.h new file mode 100644 index 0000000..94c23d6 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+TDSSafe.h @@ -0,0 +1,24 @@ +// +// NSDictionary+TDSSafe.h +// TDSCommon +// +// Created by Insomnia on 2020/10/20. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSDictionary (TDSSafe) + +- (BOOL)tds_boolForKey:(NSString *)key; +- (NSInteger)tds_integerForKey:(NSString *)key; +- (NSDictionary *)tds_dicForKey:(NSString *)key; +- (NSString *)tds_stringForKey:(NSString *)key; +- (NSArray *)tds_arrayForKey:(NSString *)key; +- (NSSet *)tds_setForKey:(NSString *)key; +- (NSNumber *)tds_numberForKey:(NSString *)key; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+TDSSafe.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+TDSSafe.h.meta new file mode 100644 index 0000000..47a85db --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSDictionary+TDSSafe.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e067dd4ba22944aa99e03f1b52fdd015 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSError+Ext.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSError+Ext.h new file mode 100644 index 0000000..f597867 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSError+Ext.h @@ -0,0 +1,19 @@ +// +// NSError+Ext.h +// TapAchievement +// +// Created by TapTap-David on 2020/9/22. +// Copyright © 2020 taptap. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSError (Ext) ++ (instancetype)errorWithMessage:(NSString *)errorMsg code:(NSInteger)code; + ++ (instancetype)errorWithContent:(NSString *)content message:(NSString *)message code:(NSInteger)code; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSError+Ext.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSError+Ext.h.meta new file mode 100644 index 0000000..55742ef --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSError+Ext.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4eeb4b3e721fc45779586f6d8a420470 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSMutableArray+Safe.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSMutableArray+Safe.h new file mode 100644 index 0000000..1c3f0d9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSMutableArray+Safe.h @@ -0,0 +1,23 @@ +// +// NSMutableArray+Safe.h +// TapAchievement +// +// Created by TapTap-David on 2020/9/24. +// Copyright © 2020 taptap. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSMutableArray (Safe) +- (void)tt_safeAddObject:(id)anObject; + +- (void)tt_addNonNullObject:(id)anObject; + +- (void)tt_safeInsertObject:(id)anObject atIndex:(NSUInteger)index; + +- (void)tt_safeReplaceObjectAtIndex:(NSUInteger)index withObject:(id)anObject; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSMutableArray+Safe.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSMutableArray+Safe.h.meta new file mode 100644 index 0000000..d660b97 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSMutableArray+Safe.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: beaa9e67229d64992a0f9d9fd60f299e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSCoding.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSCoding.h new file mode 100644 index 0000000..08a080d --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSCoding.h @@ -0,0 +1,23 @@ +// +// NSObject+TDSCoding.h +// TDSCommon +// +// Created by Insomnia on 2020/10/20. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSObject (TDSCoding) +/** + * 解码(从文件中解析对象) + */ +- (void)tds_decode:(NSCoder *)decoder; +/** + * 编码(将对象写入文件中) + */ +- (void)tds_encode:(NSCoder *)encoder; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSCoding.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSCoding.h.meta new file mode 100644 index 0000000..dd56337 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSCoding.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0f48089c9f0fd43328ee4ee66e903260 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSModel.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSModel.h new file mode 100644 index 0000000..72498f5 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSModel.h @@ -0,0 +1,30 @@ +// +// NSObject+TDSModel.h +// TDSCommon +// +// Created by Insomnia on 2020/10/20. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol TDSModel +@optional + ++ (NSDictionary *)replacedKeyFromPropertyName; ++ (NSString *)replacedKeyFromPropertyName:(NSString *)propertyName; ++ (NSDictionary *)objectClassInArray; ++ (Class)objectClassInArray:(NSString *)propertyName; + +@end + +@interface NSObject (TDSModel) + ++ (instancetype)tds_modelWithKeyValues:(id)keyValues; + +- (NSDictionary *)tds_keyValues; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSModel.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSModel.h.meta new file mode 100644 index 0000000..4b6f78b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSModel.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0e1b8aa9e354141a3878d975fed9385d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSProperty.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSProperty.h new file mode 100644 index 0000000..d86dcf6 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSProperty.h @@ -0,0 +1,25 @@ +// +// NSObject+TDSProperty.h +// TDSCommon +// +// Created by Insomnia on 2020/10/20. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^TDSClassesEnumerator) (Class cls, BOOL *stop); + +typedef void (^TDSPropertiesEnumerator) (TDSProperty *property, BOOL *stop); + +@interface NSObject (TDSProperty) ++ (void)tds_enumerateProperties:(TDSPropertiesEnumerator)enumerator; + ++ (void)tds_enumerateClasses:(TDSClassesEnumerator)enumerator; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSProperty.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSProperty.h.meta new file mode 100644 index 0000000..8e4053f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSObject+TDSProperty.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fba826192a8f847db9917e7438011840 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSString+Tools.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NSString+Tools.h new file mode 100644 index 0000000..48d156f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSString+Tools.h @@ -0,0 +1,34 @@ +// +// NSString+Tools.h +// TDS +// +// Created by JiangJiahao on 2018/4/24. +// Copyright © 2018年 dyy. All rights reserved. +// + +#import + +@interface NSString (Tools) +- (NSString *)tds_URLEncodedString; +- (NSString *)tds_URLDecodedString; +///反转字符串 +- (NSString *)tds_reverse; + +// MD5 hash of the file on the filesystem specified by path ++ (NSString *)tds_stringWithMD5OfFile:(NSString *)path; +// The string's MD5 hash +- (NSString *)tds_MD5Hash; + +// base64 +- (NSString *)tds_base64Encode; +- (NSString *)tds_base64Decode; + +// aes256 +- (NSString *)tds_aes256Encrypt:(NSString *)key; +- (NSString *)tds_aes256Decrypt:(NSString *)key; + +/// 是否是空字符串 ++ (BOOL)tds_isEmpty:(NSString *)string; + +- (NSDictionary *)tds_toDictionary; +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NSString+Tools.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NSString+Tools.h.meta new file mode 100644 index 0000000..b7a0db0 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NSString+Tools.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8bc01c7bcd32b4b878e4f2d3df1bcae9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NetworkStateModel.h b/Plugins/iOS/TapCommonSDK.framework/Headers/NetworkStateModel.h new file mode 100644 index 0000000..cf37c6b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NetworkStateModel.h @@ -0,0 +1,20 @@ +// +// NetworkStateModel.h +// TDSCommon +// +// Created by TapTap-David on 2021/3/23. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NetworkStateModel : NSObject +@property (nonatomic, copy) NSString *session_id; //每次启动唯一ID +@property (nonatomic, copy) NSString *host; //服务器 +@property (nonatomic, assign) NSInteger code; //返回码200成功 +@property (nonatomic, assign) CGFloat delay; //网络延迟时间(毫秒) +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/NetworkStateModel.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/NetworkStateModel.h.meta new file mode 100644 index 0000000..d2a2537 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/NetworkStateModel.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 419f856e6062640ee9c8afdd7c3ab573 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/PageModel.h b/Plugins/iOS/TapCommonSDK.framework/Headers/PageModel.h new file mode 100644 index 0000000..636f720 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/PageModel.h @@ -0,0 +1,37 @@ +// +// PageModel.h +// TDSCommon +// +// Created by TapTap-David on 2021/1/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +//页面唯一id +FOUNDATION_EXPORT NSString *const PAGE_ID_TAPTAP_AUTHORIZE_WEB; +FOUNDATION_EXPORT NSString *const PAGE_ID_TAPTAP_AUTHORIZE_TAPTAPCLIENT; +FOUNDATION_EXPORT NSString *const PAGE_ID_GAME; +//页面别名 +FOUNDATION_EXPORT NSString *const PAGE_NAME_TAPTAP_AUTHORIZE_WEB; +FOUNDATION_EXPORT NSString *const PAGE_NAME_TAPTAP_AUTHORIZE_TAPTAPCLIENT; +FOUNDATION_EXPORT NSString *const PAGE_NAME_GAME; + +//页面事件名 +FOUNDATION_EXPORT NSString *const PAGE_ACTION_APPEAR; +FOUNDATION_EXPORT NSString *const PAGE_ACTION_DISAPPEAR; + +@interface PageModel : NSObject +//页面唯一id +@property (nonatomic, copy, nullable) NSString *page_id; + +//页面别名 +@property (nonatomic, copy, nullable) NSString *page_name; + +//页面事件名 +@property (nonatomic, copy, nullable) NSString *page_action; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/PageModel.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/PageModel.h.meta new file mode 100644 index 0000000..36099e2 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/PageModel.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 98cbc4a27676d4ba9b04b02a0233fb9b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/PlatformXUA.h b/Plugins/iOS/TapCommonSDK.framework/Headers/PlatformXUA.h new file mode 100644 index 0000000..a3e4a25 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/PlatformXUA.h @@ -0,0 +1,17 @@ +// +// PlatformXUA.h +// TapCommonSDK +// +// Created by Bottle K on 2021/6/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PlatformXUA : NSObject +@property (nonatomic, copy) NSDictionary *xuaMap; ++ (instancetype)shareInstance; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/PlatformXUA.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/PlatformXUA.h.meta new file mode 100644 index 0000000..4fe0829 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/PlatformXUA.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 203b93403eb204a0dbdbd9201f56b08b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccount.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccount.h new file mode 100644 index 0000000..6d995b7 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccount.h @@ -0,0 +1,45 @@ +// +// TDSAccount.h +// TDSCommon +// +// Created by Bottle K on 2020/9/29. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM (NSInteger, TDSAccountType) { + TAP, + XD, + XDG, + TYPE_TDS, +LC +}; + +@interface TDSAccount : NSObject + +/// xd token +@property (nonatomic, copy, readonly) NSString *token; +/// tap/tds +@property (nonatomic, copy, readonly) NSString *kid; +@property (nonatomic, copy, readonly) NSString *accessToken; +@property (nonatomic, copy, readonly) NSString *tokenType; +@property (nonatomic, copy, readonly) NSString *macKey; +@property (nonatomic, copy, readonly) NSString *macAlgorithm; +/// tds +@property (nonatomic, assign, readonly) long expireIn; +/// lc +@property (nonatomic, copy, readonly) NSString *clientId; +@property (nonatomic, copy, readonly) NSString *clientToken; +@property (nonatomic, copy, readonly) NSString *sessionToken; + +- (instancetype)initWithToken:(NSString *)token type:(TDSAccountType)type; + +- (instancetype)initWithLC:(NSString *)token type:(TDSAccountType)type; + +- (TDSAccountType)getAccountType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccount.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccount.h.meta new file mode 100644 index 0000000..127d0d9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccount.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0d5363b6cf7c44196a7f8e3044357f6d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountNotification.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountNotification.h new file mode 100644 index 0000000..813fae7 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountNotification.h @@ -0,0 +1,19 @@ +// +// TDSAccountNotification.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/4/26. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +extern NSString *const TAP_LOGIN_SUCCESS_NOTIFICATION; +extern NSString *const TAP_LOGIN_FAIL_NOTIFICATION; + +@interface TDSAccountNotification : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountNotification.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountNotification.h.meta new file mode 100644 index 0000000..7ab40f1 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountNotification.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9c731fb54d7184c71b6f325247174f5c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountProvider.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountProvider.h new file mode 100644 index 0000000..2e3c970 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountProvider.h @@ -0,0 +1,22 @@ +// +// TDSAccountProvider.h +// TapCommonSDK +// +// Created by Bottle K on 2021/3/30. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol TDSAccountProvider + +- (nullable TDSAccount *)getAccount; + +- (nullable NSDictionary *)getLocalUserInfo; + +- (void)getAccountUser:(void (^)(NSDictionary *_Nullable userInfo, NSError *_Nullable error))handler; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountProvider.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountProvider.h.meta new file mode 100644 index 0000000..54be4db --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAccountProvider.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 45422e8b3a4e449648435edab7d3dff4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAsyncHttp.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAsyncHttp.h new file mode 100644 index 0000000..f0f5476 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAsyncHttp.h @@ -0,0 +1,80 @@ +// +// AsyncHttp.h +// +// Created by JiangJiahao on 2018/3/9. +// Copyright © 2018年 JiangJiahao. All rights reserved. +// 简单HTTP请求 + +#import +#import + +extern NSString *const TDS_TIMEOUTKEY; +extern NSString *const TDS_HTTPMETHODKEY; +extern NSString *const TDS_HTTPBODYKEY; +extern NSString *const TDS_DATAFORMAT; +extern NSString *const TDS_CACHE_POLICY_KEY; +extern NSString *const TDS_PROTOBUF_KEY; + +/** + header + */ +extern NSString *const TDS_AUTH_KEY; + + +typedef void(^CallBackBlock)(TDSHttpResult *result); +typedef void(^GetAllCallBack)(NSArray *resultArr,BOOL successAll); + + +@interface TDSAsyncHttp : NSObject +@property (nonatomic,copy) CallBackBlock callBackBlock; +@property (nonatomic,copy) CallBackBlock failedCallback; + +- (void)stopTask; +- (void)retryTask; + +- (void)handleSuccessResult:(TDSHttpResult *)result; +- (void)handleFailResult:(TDSHttpResult *)result; + +/// GET请求 +/// @param urlStr url +/// @param requestParams 网络请求参数,如超时、格式等 +/// @param customHeaderParams 自定义请求头参数 +/// @param params 本次请求参数 +/// @param callBackBlock 成功回调 +/// @param failedCallback 失败回调 +- (TDSAsyncHttp *)httpGet:(NSString *)urlStr + requestParams:(NSDictionary *)requestParams + customHeader:(NSDictionary *)customHeaderParams + params:(NSDictionary *)params + callBack:(CallBackBlock)callBackBlock failedCallback:(CallBackBlock)failedCallback; + +/** + 多个get请求并发,同时返回 + + @param urlStrArr URL数组 + @param requestParamsArr 请求参数数组 + @param customHeaderParamsArr 自定义请求头数组 + @param paramsDicArr 参数数组 + @param callback 回掉 + */ +- (void)httpGetAll:(NSArray *)urlStrArr + requestParamsArr:(NSArray *)requestParamsArr + customHeadersArr:(NSArray *)customHeaderParamsArr + params:(NSArray *)paramsDicArr + callback:(GetAllCallBack)callback; + +/// POST请求 +/// @param urlStr URL +/// @param requestParams 网络请求参数,如超时、数据格式、请求头等 +/// @param customHeaderParams 自定义请求头参数 +/// @param params 本次请求参数 +/// @param callBackBlock 成功回调 +/// @param failedCallback 失败回调 +- (TDSAsyncHttp *)httpPost:(NSString *)urlStr + requestParams:(NSDictionary *)requestParams + customHeader:(NSDictionary *)customHeaderParams + params:(NSDictionary *)params + callBack:(CallBackBlock)callBackBlock + failedCallback:(CallBackBlock)failedCallback; + +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAsyncHttp.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAsyncHttp.h.meta new file mode 100644 index 0000000..f65ad29 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAsyncHttp.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e0efdd281872c49e6847c5d161ffb59b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAutoLayout.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAutoLayout.h new file mode 100644 index 0000000..04fc30d --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAutoLayout.h @@ -0,0 +1,78 @@ +// +// XDGAutoLayout.h +// XDG +// +// Created by JiangJiahao on 2020/8/20. +// Copyright © 2020 JiangJiahao. All rights reserved. +// 简单自动布局类 + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSAutoLayout : NSObject + ++ (void)openAutoLayout:(UIView *)targetView; ++ (void)safeAreaLayout:(BOOL)safe; + ++ (NSLayoutConstraint *)layoutHeight:(UIView *)targetView height:(CGFloat)height; ++ (NSLayoutConstraint *)layoutWidth:(UIView *)targetView width:(CGFloat)width; + +/// 相等约束相等布局 +/// @param view1 view1 +/// @param view2 view2 ++ (void)layoutViewEqual:(UIView *)view1 toView:(UIView *)view2; + ++ (NSLayoutConstraint *)layoutViewEqual:(UIView *)view1 + toView:(UIView *)view2 + attribute:(NSLayoutAttribute)attr; + ++ (NSLayoutConstraint *)layoutViewEqual:(UIView *)view1 + toView:(UIView *)view2 + attribute:(NSLayoutAttribute)attr + offset:(CGFloat)offset; + ++ (NSLayoutConstraint *)layoutViewEqual:(UIView *)view1 + attribute:(NSLayoutAttribute)attr1 + toView:(UIView *)view2 + attribute:(NSLayoutAttribute)attr2; + +/// 约束两个view相等 +/// @param view1 view1 +/// @param attr1 view1约束 +/// @param view2 view2 +/// @param attr2 view2约束 +/// @param constant 距离 ++ (NSLayoutConstraint *)layoutViewEqual:(UIView *)view1 + attribute:(NSLayoutAttribute)attr1 + toView:(UIView *)view2 + attribute:(NSLayoutAttribute)attr2 + constant:(CGFloat)constant; + +/// 约束两个view,更大 +/// @param view1 view1 +/// @param attr1 view1约束 +/// @param view2 view2 +/// @param attr2 view2约束 +/// @param constant 距离 ++ (NSLayoutConstraint *)layoutViewGreater:(UIView *)view1 + attribute:(NSLayoutAttribute)attr1 + toView:(nullable UIView *)view2 + attribute:(NSLayoutAttribute)attr2 + constant:(CGFloat)constant; + +/// 约束两个view,更小 +/// @param view1 view1 +/// @param attr1 view1约束 +/// @param view2 view2 +/// @param attr2 view2约束 +/// @param constant 距离 ++ (NSLayoutConstraint *)layoutViewLesser:(UIView *)view1 + attribute:(NSLayoutAttribute)attr1 + toView:(nullable UIView *)view2 + attribute:(NSLayoutAttribute)attr2 + constant:(CGFloat)constant; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAutoLayout.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAutoLayout.h.meta new file mode 100644 index 0000000..c7632cd --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSAutoLayout.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 59cc175e6b9c2407391cbb7149b0d0f1 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBaseManager.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBaseManager.h new file mode 100644 index 0000000..340c988 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBaseManager.h @@ -0,0 +1,21 @@ +// +// TDSSDK.h +// TDSCommon +// +// Created by Bottle K on 2020/10/13. +// + +#import +#import + +#define TapCommonSDK @"TapCommon" +#define TapCommonSDK_VERSION_NUMBER @"30500001" +#define TapCommonSDK_VERSION @"3.5.0" + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSBaseManager : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBaseManager.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBaseManager.h.meta new file mode 100644 index 0000000..74a77a8 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBaseManager.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e25d31c76f72a4b368ecb79799df13b5 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridge.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridge.h new file mode 100644 index 0000000..5cca4f9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridge.h @@ -0,0 +1,39 @@ +// +// bridge.h +// bridge +// +// Created by xe on 2020/10/15. +// Copyright © 2020 xe. All rights reserved. +// + +#import + +#import +#import +#import +#import +#import +#import + +//! Project version number for bridge. +FOUNDATION_EXPORT double bridgeVersionNumber; + +//! Project version string for bridge. +FOUNDATION_EXPORT const unsigned char bridgeVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +@interface TDSBridge : NSObject + +@property (nonatomic, weak) iddelegte; + ++ (instancetype)instance; + +- (void)callHandler:(NSString*) command; + +- (void)registerHandler:(NSString*) command + bridgeCallback:(id) callback; + +@end + + diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridge.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridge.h.meta new file mode 100644 index 0000000..d6aacb0 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridge.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b2b82319f812341b38a5d373fff4d321 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeCallback.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeCallback.h new file mode 100644 index 0000000..46902f7 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeCallback.h @@ -0,0 +1,16 @@ +// +// BridgeCallback.h +// Bridge +// +// Created by xe on 2020/10/16. +// Copyright © 2020 xe. All rights reserved. +// +#import + +@protocol TDSBridgeCallback + +@optional + +- (void)onResult:(NSString *)msg; + +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeCallback.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeCallback.h.meta new file mode 100644 index 0000000..82faf7c --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeCallback.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ecc7b9cd4be644544ba5bc37ee9f9dbd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeException.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeException.h new file mode 100644 index 0000000..3efde93 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeException.h @@ -0,0 +1,13 @@ +// +// BridgeException.h +// EngineBridge +// +// Created by xe on 2020/10/9. +// Copyright © 2020 xe. All rights reserved. +// + +#import + +@interface TDSBridgeException : NSException +@end + diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeException.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeException.h.meta new file mode 100644 index 0000000..f920a4a --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeException.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 37a855ea140a045c6997669d7d3a38bd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeProxy.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeProxy.h new file mode 100644 index 0000000..69c4c66 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeProxy.h @@ -0,0 +1,19 @@ +// +// EngineBridgeProxy.h +// Bridge +// +// Created by xe on 2020/10/15. +// Copyright © 2020 xe. All rights reserved. +// + +#import +#import +#import + +@interface TDSBridgeProxy : NSObject + ++ (TDSBridgeProxy *)shareInstance; + +- (void)onResult:(NSString*) result; + +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeProxy.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeProxy.h.meta new file mode 100644 index 0000000..fa80b9b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeProxy.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b9c7f91a62e3e4037b57268a3772a53e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeTool.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeTool.h new file mode 100644 index 0000000..32a21b6 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeTool.h @@ -0,0 +1,28 @@ +// +// BridgeTool.h +// EngineBridge +// +// Created by xe on 2020/10/9. +// Copyright © 2020 xe. All rights reserved. +// + +#import + +@interface TDSBridgeTool : NSObject + ++ (BOOL)isEmpty:(NSString *)str; + ++ (NSString *)jsonStringWithString:(NSString *)string; + ++ (NSString *)jsonStringWithArray:(NSArray *)array; + ++ (NSString *)jsonStringWithDictionary:(NSDictionary *)dictionary; + ++ (NSString *)jsonStringWithObject:(id)model; + ++ (NSString *)jsonStringWithMutaDic:(NSDictionary *)dic; + ++ (NSDictionary *)dictionaryWithModel:(id)model; + +@end + diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeTool.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeTool.h.meta new file mode 100644 index 0000000..cd2910d --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSBridgeTool.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 903612c4b6e7147899541da71615f173 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSButton.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSButton.h new file mode 100644 index 0000000..a709a8b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSButton.h @@ -0,0 +1,21 @@ +// +// TDSButton.h +// TapCommonSDK +// +// Created by Bottle K on 2021/4/27. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSButton : UIButton + +@property (nonatomic, assign) NSInteger mode; + +- (void)confirmMode; + +- (void)cancelMode; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSButton.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSButton.h.meta new file mode 100644 index 0000000..f52c99b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSButton.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 769fb48823d5547a5b3c32c501ac2a98 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommand.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommand.h new file mode 100644 index 0000000..2cf42ba --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommand.h @@ -0,0 +1,29 @@ +// +// Command.h +// EngineBridge +// +// Created by xe on 2020/9/28. +// Copyright © 2020 xe. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +@interface TDSCommand : NSObject + +@property (nonatomic,copy) NSString* service; +@property (nonatomic,copy) NSString* method; +@property (nonatomic,copy) NSString* args; +@property (nonatomic,copy) NSString* callbackId; +@property (nonatomic,assign) BOOL callback; +@property (nonatomic,assign) BOOL onceTime; + ++ (TDSCommand*)constructorCommand:(NSString*)commandJSON; + +- (NSString*)toJSON; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommand.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommand.h.meta new file mode 100644 index 0000000..966f9fe --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommand.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f2895f85f34f24793acdc4323f8fc1ce +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommandTask.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommandTask.h new file mode 100644 index 0000000..49c7b71 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommandTask.h @@ -0,0 +1,19 @@ +// +// CommandTask.h +// EngineBridge +// +// Created by xe on 2020/9/29. +// Copyright © 2020 xe. All rights reserved. +// +#import +#import +NS_ASSUME_NONNULL_BEGIN + +@interface TDSCommandTask : NSObject + +- (void)execute:(TDSCommand *)command brigeCallback:(void (^)(NSString * resultJSON))result; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommandTask.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommandTask.h.meta new file mode 100644 index 0000000..4e5b912 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommandTask.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d277d0841e9d241d49dc3f3379f0ce1d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonConfirmDialog.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonConfirmDialog.h new file mode 100644 index 0000000..78a1dce --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonConfirmDialog.h @@ -0,0 +1,23 @@ +// +// TDSCommonConfirmDialog.h +// TDSCommon +// +// Created by Bottle K on 2021/3/2. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^TDSCommonConfirmDialogHandler) (BOOL confirm); + +@interface TDSCommonConfirmDialog : UIView +- (void)setupWithTitle:(NSString *)title + content:(NSString *)content + cancelText:(NSString *)cancelText + confirmText:(NSString *)confirmText + handler:(TDSCommonConfirmDialogHandler)handler; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonConfirmDialog.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonConfirmDialog.h.meta new file mode 100644 index 0000000..8c225cb --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonConfirmDialog.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 735a3c112bb4a4a3fa777e11be7068f9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonDialogView.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonDialogView.h new file mode 100644 index 0000000..13c1260 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonDialogView.h @@ -0,0 +1,31 @@ +// +// TDSCommonDialogView.h +// TapCommonSDK +// +// Created by Bottle K on 2021/4/29. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol TDSCommonDialogProtocol + +- (void)onReloadData; +- (void)onClose; +@end + +@interface TDSCommonDialogView : UIView +@property (nonatomic, weak) id delegate; + +@property (nonatomic, strong) UIView *dialogView; + +//loading +@property (nonatomic, strong) UIView *loadingView; +//reload +@property (nonatomic, strong) UIView *reloadView; + +- (void)closeDialog; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonDialogView.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonDialogView.h.meta new file mode 100644 index 0000000..529b954 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonDialogView.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cd5ce22d819ec42a19e385c3c23a98df +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonHeader.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonHeader.h new file mode 100644 index 0000000..1116f2d --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonHeader.h @@ -0,0 +1,21 @@ +// +// TDSCommonHeader.h +// TDSCommon +// +// Created by Bottle K on 2020/9/29. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSCommonHeader : NSObject + +- (instancetype)init:(NSString *)sdkName + sdkVersionCode:(NSString *)sdkVersionCode + sdkVersionName:(NSString *)sdkVersionName; + +- (NSString *)getXUAValue; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonHeader.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonHeader.h.meta new file mode 100644 index 0000000..48fe534 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonHeader.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1f939eb683e5f4bc0936548d7228a427 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonService.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonService.h new file mode 100644 index 0000000..b12310f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonService.h @@ -0,0 +1,30 @@ +// +// TDSCommonService.h +// TDSCommon +// +// Created by TapTap-David on 2020/11/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSCommonService : NSObject + ++ (void)initWithConfig:(NSString*)configJSON versionName:(NSString*)versionName; + ++ (void)setXUA:(NSString*)json; + ++ (void)getRegionCode:(void (^)(NSString *result))callback; + ++ (void)isTapTapInstalled:(void (^)(NSString *result))callback; + ++ (void)isTapGlobalInstalled:(void (^)(NSString *result))callback; + ++ (void)preferredLanguage:(NSNumber *)language; + ++ (void)hostToBeReplaced:(NSString*)host replacedHost:(NSString*) replaceHost; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonService.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonService.h.meta new file mode 100644 index 0000000..dd3d823 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonService.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f7f451ab716cc4a85a9a9c9bb8d1a345 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUIHelper.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUIHelper.h new file mode 100644 index 0000000..c797f6c --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUIHelper.h @@ -0,0 +1,70 @@ +// +// TDSCommonUIHelper.h +// TDSCommon +// +// Created by Bottle K on 2021/3/2. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSCommonUIHelper : NSObject + +/// 从common bundle获取image ++ (UIImage *)getImageFromCommonWithImageName:(NSString *)name; + +/// 从bundle获取image ++ (UIImage *)getImageFromBundle:(NSString *)bundleName withImage:(NSString *)imageName; + +/// 从bundle获取翻译后的文案 ++ (NSString *)getTranslatedStringFromCommonWithKey:(NSString *)key; + +/// rgb转color ++ (UIColor *)rgbToColorWithRed:(CGFloat)red + green:(CGFloat)green + blue:(CGFloat)blue; + +/// rgba转color ++ (UIColor *)rgbToColorWithRed:(CGFloat)red + green:(CGFloat)green + blue:(CGFloat)blue + aplha:(CGFloat)alpha; + +/// hex转color ++ (UIColor *)hexToColor:(int)hexValue; + +/// hex转color ++ (UIColor *)hexToColor:(int)hexValue alpha:(CGFloat)alpha; + +/// 屏幕宽度,会根据横竖屏的变化而变化 ++ (CGFloat)screenWidth; + +/// 屏幕高度,会根据横竖屏的变化而变化 ++ (CGFloat)screenHeight; + +/// 屏幕宽度,跟横竖屏无关 ++ (CGFloat)deviceWidth; + +/// 屏幕高度,跟横竖屏无关 ++ (CGFloat)deviceHeight; + +/// 用户界面横屏了才会返回YES ++ (BOOL)isUILandscape; + +/// 无论支不支持横屏,只要设备横屏了,就会返回YES ++ (BOOL)isDeviceLandscape; + +/// 是否有刘海 ++ (BOOL)hasNotch; + +/// 安全区域(上左下右) ++ (UIEdgeInsets)safeAreaInsets; + ++ (UIViewController *)findTopViewController; + ++ (UIViewController *)findUIViewController:(UIViewController *)controller; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUIHelper.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUIHelper.h.meta new file mode 100644 index 0000000..53eda03 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUIHelper.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3cdb89e1104a7449a8483b4854886354 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUtils.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUtils.h new file mode 100644 index 0000000..19d7c6f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUtils.h @@ -0,0 +1,39 @@ +// +// TDSCommonUtils.h +// TDSCommon +// +// Created by TapTap-David on 2021/1/18. +// + +#import +#import "TDSTrackerConfig.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSCommonUtils : NSObject ++ (NSData *)lz4Compress:(NSData *)rawData; + ++ (uint32_t)transformTime; + ++ (NSString *)md5HexDigest:(NSData *)data; + ++ (NSString *)getDeviceIdentifier; + ++ (NSString *)getHardParam; + ++ (NSString *)getNetworkType; + ++ (NSString *)getNetWorkStatus:(NSString *)hostName; + ++ (NSString *)getTotalMemorySize:(unsigned long long)fileSize; + ++ (NSString *)getTotalDiskSize; + ++ (NSString *)localeIdentifier; + ++ (NSString *)getCpuInfo; + ++ (NSString *)topic:(TDSTrackerType)type; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUtils.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUtils.h.meta new file mode 100644 index 0000000..b8801f5 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSCommonUtils.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 226ab0bc8759242b183a2eeb5358f355 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDebounce.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDebounce.h new file mode 100644 index 0000000..c976c81 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDebounce.h @@ -0,0 +1,108 @@ +// +// TDSDebounce.h +// TDSCommon +// +// Created by JiangJiahao on 2021/3/22. +// + + +#import + +/** 自定管理执行与释放时,标记调用来源: 对象/类地址_方法名_调用行数 */ +#define TDSDebunceKey [NSString stringWithFormat:@"%p_%s_%d",self,__func__,__LINE__] +#define TDSDebunceKeyAppendCustom(customKey) [NSString stringWithFormat:@"%p_%s_%d%@",self,__func__,__LINE__,customKey] + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^TDSDebounceTaskBlock)(void); +extern double const DEBOUNCE_INTERVAL; // 默认频率间隔,0.5s + +/** + 相邻调用若都在间隔时间内,则合并成一次调用 + */ +@interface TDSDebounce : NSObject +#pragma mark - 自动管理 ++ (TDSDebounce *)debounceWithDebounceKey:(NSString *)debounceKey taskBlock:(TDSDebounceTaskBlock)taskBlock; + ++ (TDSDebounce *)debounceWithInterval:(NSTimeInterval)interval + debounceKey:(NSString *)debounceKey + taskBlock:(TDSDebounceTaskBlock)taskBlock; + +/// 自动执行一个Debounce(防抖)任务。 +/// 注意:适用调用不是异常频繁的任务,如用户按钮频繁点击限制 +/// @param interval 防抖间隔,默认0.5s +/// @param queue 任务执行队列,默认主队列 +/// @param debounceKey 任务来源标识,可使用默认宏 TDSDebunceKey 或 TDSDebunceKeyAppendCustom +/// @param taskBlock 需要执行的任务 ++ (TDSDebounce *)debounceWithInterval:(NSTimeInterval)interval + onQueue:(dispatch_queue_t)queue + debounceKey:(NSString *)debounceKey + taskBlock:(TDSDebounceTaskBlock)taskBlock; +#pragma mark - 手动管理 ++ (TDSDebounce *)manualDebounceWithTaskBlock:(TDSDebounceTaskBlock)taskBlock; + ++ (TDSDebounce *)manualDebounceWithInterval:(NSTimeInterval)interval + taskBlock:(TDSDebounceTaskBlock)taskBlock; + +/// 手动获取一个Debounce(防抖)任务,需要在不再使用时手动调用 dispose 释放 +/// 注意:适合在任务会异常频繁执行时进行限制 +/// @param interval 抖间隔,默认0.5s +/// @param queue 任务执行队列,默认主队列 +/// @param taskBlock 需要执行的任务 ++ (TDSDebounce *)manualDebounceWithInterval:(NSTimeInterval)interval + onQueue:(dispatch_queue_t)queue + taskBlock:(TDSDebounceTaskBlock)taskBlock; +#pragma mark - 执行与释放 +/// 触发任务执行,手动管理时调用 +- (void)invoke; + +/// 销毁任务,手动管理时调用 +- (void)dispose; + +@end + +#pragma mark - private classes +/** + 调用后等待间隔时间超时以后触发,每次触发后重新计时 + */ +@interface TDSDebounceTrailing : TDSDebounce + +@end + +/** + 调用后立即触发,间隔时间未超时无法再次触发,每次触发后重新计时 + */ +@interface TDSDebounceLeading : TDSDebounce + +@end + +/** + 使用方法: + 1.自动管理(自动执行/释放) + // 按钮事件或需要执行的函数,任务使用 Debounce 包裹 + - (void)testDebounce { + [TDSDebounceLeading debounceWithInterval:0.8 debounceKey:TDSDebunceKey taskBlock:^{ + // TODO 想要执行的任务 + }]; + } + + 2.手动管理 (创建时调用 manual 开头函数) + + @property (nonatomic, strong) TDSDebounce *testDebouncer; + + // 按钮事件或需要执行的函数,任务使用 Debounce 包裹 + - (void)testDebounce { + if (!self.testDebouncer) { + self.testDebouncer = [TDSDebounceLeading manualDebounceWithTaskBlock:^{ + // TODO 想要执行的任务 + }]; + } + [self.testDebouncer invoke]; + } + + // 在适当时机,如退出页面时释放 + [self.testDebouncer dispose]; + */ + +NS_ASSUME_NONNULL_END + diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDebounce.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDebounce.h.meta new file mode 100644 index 0000000..d02c2c8 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDebounce.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: df04bafc17bad4a06b28d1de940f4b9d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDomainManager.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDomainManager.h new file mode 100644 index 0000000..a1d329f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDomainManager.h @@ -0,0 +1,61 @@ +// +// TDSDomainManager.h +// TapCommonSDK +// +// Created by Bottle K on 2021/4/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol TDSDomainManagerDelegate + +@optional +- (void)checkDomainsDone:(NSDictionary *)resultInfo; + +@end + +FOUNDATION_EXTERN NSString *const DOMAIN_CHECK_HOST_KEY; +FOUNDATION_EXTERN NSString *const DOMAIN_CHECK_CODE_KEY; +FOUNDATION_EXTERN NSString *const DOMAIN_CHECK_DELAY_KEY; +FOUNDATION_EXTERN NSString *const DOMAIN_CHECK_REACHABLE_KEY; + +@interface TDSDomainManager : NSObject +/// 获取一个域名管理实例 +/// @param mainDomains 主域名 +/// @param backupDomains 备用域名 ++ (TDSDomainManager *)managerForDomains:(NSArray *)mainDomains backupDomains:(NSArray *)backupDomains; + +- (void)setupDelegate:(id)delegate; + +/// 指定域名检查接口 +/// @param checkAPI 检查接口 +- (void)setupCheckAPI:(NSString *)checkAPI; + +/// 获取一个当前可用域名 +- (NSString *)getActiveDomain; + +/// 标记一个域名为可用 +/// @param domain 域名 +- (void)activeDomain:(NSString *)domain; ++ (void)activeDomain:(NSString *)domain; + +/// 标记一个域名不可用 +/// @param domain 域名 +- (void)deactiveDomain:(NSString *)domain; ++ (void)deactiveDomain:(NSString *)domain; + +/// 开始检测域名,并定期检测 +- (void)startCheckDomains; + +/// 开始检测域名 +/// @param api 若传入api则会请求该api数据,若传入空则直接检查域名连通 +/// @param repeat 是否定时检测 +- (void)startCheckDomains:(nullable NSString *)api repeat:(BOOL)repeat; + +/// 停止检测域名 +- (void)stopCheckDomains; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDomainManager.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDomainManager.h.meta new file mode 100644 index 0000000..608ad32 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSDomainManager.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c5902277411414cf09f51c99da79e48f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSFilePath.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSFilePath.h new file mode 100644 index 0000000..1a6dae5 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSFilePath.h @@ -0,0 +1,24 @@ +// +// FilePath.h +// NativeApp +// +// Created by JiangJiahao on 2018/10/16. +// Copyright © 2018 JiangJiahao. All rights reserved. +// 文件路径类 + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSFilePath : NSObject ++ (NSString *)homePath; ++ (NSString *)documentsPath; ++ (NSString *)cachesPath; ++ (NSString *)tmpPath; ++ (NSString *)pathForFile:(NSString *)name type:(NSString *)type; ++ (NSString *)imagePath; + ++ (NSString *)bundlePath; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSFilePath.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSFilePath.h.meta new file mode 100644 index 0000000..cdb28bb --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSFilePath.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bece13283888a479e9869dd5cda8b5c8 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHostReplaceUtil.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHostReplaceUtil.h new file mode 100644 index 0000000..15c59e1 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHostReplaceUtil.h @@ -0,0 +1,26 @@ +// +// TDSHostReplaceUtil.h +// TapCommonSDK +// +// Created by Bottle K on 2021/8/3. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSHostReplaceUtil : NSObject ++ (instancetype)shareInstance; + +- (void)addReplacedHostPair:(NSString *)hostToBeReplaced replacedHost:(NSString *)replacedHost; + +- (void)clearReplacedHostPair:(NSString *)hostToBeReplaced; + +- (void)clear; + +- (NSString *)getReplacedHost:(NSString *)originalHost; + +- (BOOL)isTestMode; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHostReplaceUtil.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHostReplaceUtil.h.meta new file mode 100644 index 0000000..9c56e98 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHostReplaceUtil.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f6c2a857336574e7caaac61273fff4e6 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadBase.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadBase.h new file mode 100644 index 0000000..121be12 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadBase.h @@ -0,0 +1,30 @@ +// +// HttpDownloadBase.h +// NativeApp +// +// Created by JiangJiahao on 2018/10/16. +// Copyright © 2018 JiangJiahao. All rights reserved. +// 下载基类 + +#import + +typedef void(^downloadCallback)(BOOL success); + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSHttpDownloadBase : NSObject +/// 下载完成以后文件存储路径 ++ (NSString *)saveFilePath; + +/// 文件存储名 +/// @param url 文件url ++ (NSString *)saveFileName:(NSString *)url; + +/// 下载文件 +/// @param url 文件url +/// @param callback 下载结果回调 ++ (void)downloadFile:(NSString *)url callback:(downloadCallback)callback; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadBase.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadBase.h.meta new file mode 100644 index 0000000..e5f1716 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadBase.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 773dfd46bd8194a88bad0624cf9cf48b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadImage.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadImage.h new file mode 100644 index 0000000..8f4571f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadImage.h @@ -0,0 +1,19 @@ +// +// HttpDownloadImage.h +// NativeApp +// +// Created by JiangJiahao on 2018/10/16. +// Copyright © 2018 JiangJiahao. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSHttpDownloadImage : TDSHttpDownloadBase + ++ (void)downloadImage:(NSString *)url callback:(downloadCallback)callback; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadImage.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadImage.h.meta new file mode 100644 index 0000000..82d79fc --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpDownloadImage.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 93879c82d327a453e9451527c13b42fd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpRequest.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpRequest.h new file mode 100644 index 0000000..3afeca3 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpRequest.h @@ -0,0 +1,22 @@ +// +// HttpRequest.h +// +// Created by JiangJiahao on 2018/3/9. +// Copyright © 2018年 JiangJiahao. All rights reserved. +// Httpq请求封装 + +#import + +@interface TDSHttpRequest : NSObject + +//! GET参数拼接 ++ (NSString *)connectUrl:(NSString *)url params:(NSDictionary *)params; ++ (NSString *)connectUrl:(NSString *)url params:(NSDictionary *)params encode:(BOOL)encode; + +// POST请求参数拼接 ++ (NSString *)postStringWithParams:(NSDictionary *)params; + +// cookie ++ (NSString *)cookieStringForUrl:(NSString *)url; + +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpRequest.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpRequest.h.meta new file mode 100644 index 0000000..6c0adcc --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpRequest.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f9a9d6d9a967c40c49d750dff01ca007 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpResult.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpResult.h new file mode 100644 index 0000000..338f736 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpResult.h @@ -0,0 +1,23 @@ +// +// HttpResult.h +// +// Created by JiangJiahao on 2018/3/9. +// Copyright © 2018年 JiangJiahao. All rights reserved. +// + +#import + +@interface TDSHttpResult : NSObject + +@property (nonatomic,strong) NSData *data; +@property (nonatomic,strong) NSURLResponse *response; +@property (nonatomic,strong) NSError *error; +@property (nonatomic,strong) NSError *localError; // 本地错误 +@property (nonatomic,copy) NSString *originUrl; + +@property (nonatomic,copy) NSDictionary *resultDic; + +// 多个get同时返回数据时使用 +@property (nonatomic) NSArray *dataArr; + +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpResult.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpResult.h.meta new file mode 100644 index 0000000..78dbbc9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpResult.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0dd719be44275456a8eed2bf67b8666f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpUtil.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpUtil.h new file mode 100644 index 0000000..38d4a91 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpUtil.h @@ -0,0 +1,43 @@ +// +// TTAchievementUtil.h +// TapAchievement +// +// Created by TapTap-David on 2020/9/15. +// Copyright © 2020 taptap. All rights reserved. +// + +#import + + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSHttpUtil : NSObject ++ (NSString *)URLEncodeString:(NSString *)str; + ++ (NSString *)URLDecodeString:(NSString *)str; + ++ (NSString *)urlEncode:(NSString *)str; + ++ (NSString *)SHA256:(NSString *)key; + ++ (NSString *)md5String:(NSString *)str; + ++ (NSString *)getCurrentTime; + ++ (NSString *)randomString:(int)length; + ++ (NSString *)base64HMacSha1WithSecret:(NSString *)secret + signString:(NSString *)signString; + ++ (NSString *)getLcSignWithClientKey:(NSString *)clientKey; + ++ (NSString *)getMacToken:(NSString *)url + method:(NSString *)method + oauthID:(NSString *)oauthID +oauthMacKey:(NSString *)oauthMacKey; + ++ (NSString *)getDeviceId; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpUtil.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpUtil.h.meta new file mode 100644 index 0000000..33fd6a1 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSHttpUtil.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cb20f9cd2bc91462e8285c9b7c8b46b8 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSImageManager.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSImageManager.h new file mode 100644 index 0000000..2f3262d --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSImageManager.h @@ -0,0 +1,45 @@ +// +// ImageManager.h +// NativeApp +// +// Created by JiangJiahao on 2018/10/16. +// Copyright © 2018 JiangJiahao. All rights reserved. +// 图片辅助类,有些方法可以用catogary实现 + +#import +#import + +typedef void(^resultBlockWithName)(UIImage *_Nullable resultImage,NSString * _Nonnull imageName); +typedef void(^resultBlock)(UIImage *_Nullable resultImage); + + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSImageManager : NSObject +/// 图片缩放 +/// @param img 图片 +/// @param size 尺寸 ++ (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)size; + +/// 滤镜,高斯模糊 +/// @param image 图片 +/// @param blur 模糊程度 ++ (UIImage *)blurryImage:(UIImage *)image withBlurLevel:(CGFloat)blur; + +/// URL获取图片名称 +/// @param url 图片URL ++ (NSString *)imageNameWithUrl:(NSString *)url; + ++ (void)loadImage:(NSString *)imageName needDecode:(BOOL)needDecode resultBlock:(resultBlockWithName)block; ++ (void)loadImage:(NSString *)imageName resultBlock:(resultBlockWithName)block; ++ (void)loadImage:(NSString *)imageName size:(CGSize)size resultBlock:(resultBlockWithName)block; + +// 只需要传入"xxx.png" ++ (UIImage *)getBundleImage:(NSString *)imageName resultBlock:(resultBlockWithName)block; ++ (UIImage *)getBundleImage:(NSString *)imageName size:(CGSize)size resultBlock:(resultBlockWithName)block; + +//UIColor 转UIImage ++ (UIImage*)createImageWithColor: (UIColor *)color; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSImageManager.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSImageManager.h.meta new file mode 100644 index 0000000..0d154dd --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSImageManager.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 767cb4f96811b458cbd87d4116076f25 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLabel.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLabel.h new file mode 100644 index 0000000..e5fd85f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLabel.h @@ -0,0 +1,28 @@ +// +// TDSLabel.h +// XdComPlatform +// +// Created by JiangJiahao on 2020/5/14. +// Copyright © 2020 X.D. Network Inc. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^CopySuccessCallback)(void); + +typedef NS_ENUM(NSInteger,TDSLabelVerticalAlignment) { + TDSLabelVerticalAlignmentTop = 0, + TDSLabelVerticalAlignmentCenter, + TDSLabelVerticalAlignmentBottom, +}; + +@interface TDSLabel : UILabel +@property (nonatomic) UIEdgeInsets edgeInsets; +@property (nonatomic) BOOL canCopy; +@property (nonatomic) CopySuccessCallback copyCallback; +@property (nonatomic) TDSLabelVerticalAlignment verticalAlignment; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLabel.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLabel.h.meta new file mode 100644 index 0000000..862f0b9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLabel.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: be8ebc7a507ad45aa96a97b8b7c20606 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLightWebImageView.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLightWebImageView.h new file mode 100644 index 0000000..a945d59 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLightWebImageView.h @@ -0,0 +1,20 @@ +// +// XDLightWebImageView.h +// NativeApp +// +// Created by JiangJiahao on 2018/12/18. +// Copyright © 2018 JiangJiahao. All rights reserved. +// 轻量,没有点击事件 + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSLightWebImageView : UIView + +- (void)setImageWithUrl:(NSString *)imageUrl; +- (void)setImageWithUrl:(NSString *)imageUrl size:(CGSize)imageSize; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLightWebImageView.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLightWebImageView.h.meta new file mode 100644 index 0000000..4731ca0 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLightWebImageView.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0e96a24b0c8e340ffa189ac5701271d3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeManager.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeManager.h new file mode 100644 index 0000000..91e9e80 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeManager.h @@ -0,0 +1,50 @@ +// +// TDSLocalizeManager.h +// TDSCommon +// +// Created by Bottle K on 2021/3/8. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM (NSInteger, TapLanguageType) { + TapLanguageType_Auto = 0,// 自动 + TapLanguageType_zh_Hans,// 简体中文 + TapLanguageType_en,// 英文 + TapLanguageType_zh_Hant,// 繁体中文 + TapLanguageType_ja,// 日文 + TapLanguageType_ko,// 韩文 + TapLanguageType_th,// 泰文 + TapLanguageType_id,// 印度尼西亚语 +}; + +@interface TDSLocalizeManager : NSObject + +@property (nonatomic, assign) BOOL regionIsIO; + ++ (instancetype)shareInstance; + +/// 设定当前语言类型 +/// @param langType 语言类型 ++ (void)setCurrentLanguage:(TapLanguageType)langType; + +/// 注册SDK本地化翻译 +/// @param sdk SDK tag +/// @param filePath 本地化翻译文件位置 ++ (void)addSDKLocalization:(NSString *)sdk localizedFilePath:(NSString *)filePath; + +/// 注册SDK本地化翻译 +/// @param sdk SDK tag +/// @param localizedDic 本地化翻译字典 ++ (void)addSDKLocalization:(NSString *)sdk localizedDic:(NSDictionary *)localizedDic; + +/// 获取本地化翻译 +/// @param sdk SDK tag +/// @param key 本地化翻译key ++ (NSString *)getLocalizedStringWithSDK:(NSString *)sdk localizedKey:(NSString *)key; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeManager.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeManager.h.meta new file mode 100644 index 0000000..0d72668 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeManager.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dc8aa782f34dd40689fafaf486f8bc28 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeUtil.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeUtil.h new file mode 100644 index 0000000..2b2b2a8 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeUtil.h @@ -0,0 +1,28 @@ +// +// TDSLocalizeUtil.h +// TDSCommon +// +// Created by Bottle K on 2021/3/4. +// + +#import +#import "TDSLocalizeManager.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSLocalizeUtil : NSObject + ++ (instancetype)shareInstance; + ++ (void)setCurrentLanguage:(TapLanguageType)langType; + ++ (TapLanguageType)getCurrentLangType; + ++ (NSString *)getCurrentLangString; + ++ (NSDictionary *)readJsonFile:(NSString *)filePath; + ++ (NSString *)getTextWithLangDic:(NSDictionary *)dic byKey:(NSString *)key; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeUtil.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeUtil.h.meta new file mode 100644 index 0000000..44d80d9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLocalizeUtil.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 16820ca87456c4439baffbcafb143967 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLog.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLog.h new file mode 100644 index 0000000..e965e11 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLog.h @@ -0,0 +1,53 @@ +// +// TDSLog.h +// TDSCommon +// +// Created by Insomnia on 2020/10/26. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +#ifndef TDSLogInfo +#define TDSLogInfo(model, format, ...) TDSLogInfoFunc(model, [NSString stringWithFormat:format, ## __VA_ARGS__], __PRETTY_FUNCTION__) +#endif + +#ifndef TDSLogCustom +#define TDSLogCustom(model, tag, format, ...) TDSLogCustomFunc(model, tag, [NSString stringWithFormat:format, ## __VA_ARGS__], __PRETTY_FUNCTION__) +#endif + +#ifndef TDSLogCrash +#define TDSLogCrash(model, format, ...) TDSLogCustomFunc(model, @"Crash", [NSString stringWithFormat:format, ## __VA_ARGS__], __PRETTY_FUNCTION__) +#endif + +@interface TDSLogModel : NSObject +@property (nonatomic, copy, nonnull) NSString *sdkName; +@property (nonatomic, copy, nonnull) NSString *sdkCode; +@property (nonatomic, copy, nonnull) NSString *sdkVersion; +@end + +@protocol TDSLogDelegate +@optional +- (void)reciveLogWithModel:(TDSLogModel * _Nullable)model tag:(NSString * _Nullable)tag content:(id)content; +@end + +@interface TDSLog : NSObject + +@property (nonatomic, weak) id delegate; + ++ (instancetype)sharedInstance; + +- (void)tdsLogWithModel:(TDSLogModel * _Nonnull)model tag:(NSString *)tag content:(NSString *)content; + + + +@end + + +/** 记录Info标签日志 */ +FOUNDATION_EXPORT void TDSLogInfoFunc(TDSLogModel* _Nonnull model, NSString* _Nonnull log, const char * func); +/** 记录自定义标签日志 */ +FOUNDATION_EXPORT void TDSLogCustomFunc(TDSLogModel* _Nonnull model, NSString *_Nonnull tag, NSString* _Nonnull log,const char * func); + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLog.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLog.h.meta new file mode 100644 index 0000000..7729045 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLog.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 88fc20b13f99145928b4e441233cbc83 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLoggerService.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLoggerService.h new file mode 100644 index 0000000..2d38930 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLoggerService.h @@ -0,0 +1,17 @@ +// +// TDSLoggerService.h +// TDSCommon +// +// Created by Insomnia on 2020/10/30. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSLoggerService : NSObject + ++ (void)log:(NSString *)config tag:(NSString *)tag message:(NSString *)message; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLoggerService.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLoggerService.h.meta new file mode 100644 index 0000000..3bc2d26 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSLoggerService.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e1984538eb94e4303b5333765e89c648 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMacros.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMacros.h new file mode 100644 index 0000000..83b56d8 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMacros.h @@ -0,0 +1,63 @@ +// +// TDSMacros.h +// TDSCommon +// +// Created by Insomnia on 2020/10/19. +// + +#import +#import + +#ifndef TDS_LOCK +#define TDS_LOCK(lock) dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER); +#endif + +#ifndef TDS_UNLOCK +#define TDS_UNLOCK(lock) dispatch_semaphore_signal(lock); +#endif + +#define TDSSemaphoreCreate \ +static dispatch_semaphore_t signalSemaphore; \ +static dispatch_once_t onceTokenSemaphore; \ +dispatch_once(&onceTokenSemaphore, ^{ \ + signalSemaphore = dispatch_semaphore_create(1); \ +}); + +#define TDSSemaphoreWait TDS_LOCK(signalSemaphore) +#define TDSSemaphoreSignal TDS_UNLOCK(signalSemaphore) + +#ifndef weakify +#define weakify(...) \ +tds_keywordify \ +metamacro_foreach_cxt(tds_weakify_,, __weak, __VA_ARGS__) +#endif + +#ifndef strongify +#define strongify(...) \ +tds_keywordify \ +_Pragma("clang diagnostic push") \ +_Pragma("clang diagnostic ignored \"-Wshadow\"") \ +metamacro_foreach(tds_strongify_,, __VA_ARGS__) \ +_Pragma("clang diagnostic pop") +#endif + +#define tds_weakify_(INDEX, CONTEXT, VAR) \ +CONTEXT __typeof__(VAR) metamacro_concat(VAR, _weak_) = (VAR); + +#define tds_strongify_(INDEX, VAR) \ +__strong __typeof__(VAR) VAR = metamacro_concat(VAR, _weak_); + +#if DEBUG +#define tds_keywordify autoreleasepool {} +#else +#define tds_keywordify try {} @catch (...) {} +#endif + +#ifndef dispatch_main_async_safe +#define dispatch_main_async_safe(block)\ + if (dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL) == dispatch_queue_get_label(dispatch_get_main_queue())) {\ + block();\ + } else {\ + dispatch_async(dispatch_get_main_queue(), block);\ + } +#endif diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMacros.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMacros.h.meta new file mode 100644 index 0000000..4d042c4 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMacros.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6f6ddbb8b8f564114a8db0a980ea75e3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMemoryCache.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMemoryCache.h new file mode 100644 index 0000000..814ac0c --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMemoryCache.h @@ -0,0 +1,31 @@ +// +// XDCache.h +// XDCollectionView +// +// Created by JiangJiahao on 2019/5/22. +// Copyright © 2019 tapdb. All rights reserved. +// simple image cache + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSMemoryCache : NSObject ++ (TDSMemoryCache *)shareInstance; + +/// 设置最大缓存数量,默认50 +/// @param countLimit 缓存数量 ++ (void)setCacheCountLimit:(NSUInteger)countLimit; + +/// 设置缓存项目 +/// @param obj 缓存对象 +/// @param key key ++ (void)setObject:(id)obj forKey:(id)key; + +/// 获取缓存 +/// @param key Key ++ (id)objectForKey:(id)key; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMemoryCache.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMemoryCache.h.meta new file mode 100644 index 0000000..db47ad9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSMemoryCache.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7ad77a59517e0433a94aae7d02b4667d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSModelHelper.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSModelHelper.h new file mode 100644 index 0000000..337ea5d --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSModelHelper.h @@ -0,0 +1,91 @@ +// +// TDSModelHelper.h +// TDSCommon +// +// Created by Insomnia on 2020/10/20. +// + +#import +#import + +#ifndef __TDSConst__ +#define __TDSConst__ +extern NSString *const TDSTypeInt; +extern NSString *const TDSTypeFloat; +extern NSString *const TDSTypeDouble; +extern NSString *const TDSTypeLong; +extern NSString *const TDSTypeLongLong; +extern NSString *const TDSTypeChar; +extern NSString *const TDSTypeBOOL; +extern NSString *const TDSTypePointer; + +extern NSString *const TDSTypeIvar; +extern NSString *const TDSTypeMethod; +extern NSString *const TDSTypeBlock; +extern NSString *const TDSTypeClass; +extern NSString *const TDSTypeSEL; +extern NSString *const TDSTypeId; + +#endif + + + +@interface TDSPropertyType : NSObject +/** 类型标识符 */ +@property (nonatomic, copy) NSString *code; + +/** 是否为id类型 */ +@property (nonatomic, readonly, getter=isIdType) BOOL idType; + +/** 对象类型(如果是基本数据类型,此值为nil) */ +@property (nonatomic, readonly) Class typeClass; + +/** 类型是否来自于Foundation框架,比如NSString、NSArray */ +@property (nonatomic, readonly, getter = isFromFoundation) BOOL fromFoundation; +/** 类型是否不支持KVC */ +@property (nonatomic, readonly, getter = isKVCDisabled) BOOL KVCDisabled; + +/** + * 获得缓存的类型对象 + */ ++ (instancetype)cachedTypeWithCode:(NSString *)code; +@end + +@interface TDSProperty : NSObject +/** 成员属性 */ +@property (nonatomic, assign) objc_property_t property; +/** 成员属性名 */ +@property (nonatomic, readonly) NSString *name; + +/** 成员变量的类型 */ +@property (nonatomic, readonly) TDSPropertyType *type; +/** 成员来源于哪个类(可能是父类) */ +@property (nonatomic, assign) Class srcClass; + +/**** 同一个成员变量 - 父类和子类的行为可能不一致(key、keys、objectClassInArray) ****/ +/** 对应着字典中的key */ +- (void)setKey:(NSString *)key forClass:(Class)c; +- (NSString *)keyFromClass:(Class)c; + +/** 对应着字典中的多级key */ +- (NSArray *)keysFromClass:(Class)c; + +/** 模型数组中的模型类型 */ +- (void)setObjectClassInArray:(Class)objectClass forClass:(Class)c; +- (Class)objectClassInArrayFromClass:(Class)c; +/**** 同一个成员变量 - 父类和子类的行为可能不一致(key、keys、objectClassInArray) ****/ + +/** + * 设置成员变量的值 + */ +- (void)setValue:(id)value forObject:(id)object; +/** + * 得到成员变量的值 + */ +- (id)valueFromObject:(id)object; + +/** + * 初始化 + */ ++ (instancetype)cachedPropertyWithProperty:(objc_property_t)property; +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSModelHelper.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSModelHelper.h.meta new file mode 100644 index 0000000..ee077e0 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSModelHelper.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e18ebc68a634747b1835e803a8746364 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClient.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClient.h new file mode 100644 index 0000000..0ece75e --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClient.h @@ -0,0 +1,35 @@ +// +// TDSNetClient.h +// TDSCommon +// +// Created by Insomnia on 2020/10/20. +// + +#import +#import +#import + +// 待定 +typedef void (^TDSNetProgressBlock) (NSProgress *_Nonnull downloadProgress); +// 返回值待定 +typedef void (^TDSNetSuccessBlock) (NSDictionary *_Nullable resultDic); +// 返回值待定 +typedef void (^TDSNetFailureBlock) (NSError *_Nonnull error); + + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSNetClient : NSObject + +// success / failure 传递data中内容 +- (instancetype)initWithConfig:(TDSNetConfigModel *)config; + +- (void)requestWithModel:(TDSNetRequestModel *)model success:(TDSNetSuccessBlock)success; + +- (void)requestWithModel:(TDSNetRequestModel *)model success:(TDSNetSuccessBlock)success failure:(nullable TDSNetFailureBlock)failure; + +- (void)requestWithModel:(TDSNetRequestModel *)model success:(TDSNetSuccessBlock)success failure:(nullable TDSNetFailureBlock)failure progress:(nullable TDSNetProgressBlock)progress; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClient.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClient.h.meta new file mode 100644 index 0000000..de3cd6f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClient.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d89a3ea95901448fb879c348c262c592 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClientModel.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClientModel.h new file mode 100644 index 0000000..cc5901e --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClientModel.h @@ -0,0 +1,22 @@ +// +// TDSNetClientConfig.h +// TDSCommon +// +// Created by Insomnia on 2020/10/20. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSNetConfigModel : NSObject +/// 可扩展头 +@property (nonatomic, copy, nullable) NSString *baseUrl; +@property (nonatomic, copy, nullable) NSDictionary *extensionHeader; +@property (nonatomic, strong, nullable) TDSCommonHeader *commonHeader; +@property (nonatomic, strong, nullable) TDSAccount *account; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClientModel.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClientModel.h.meta new file mode 100644 index 0000000..9636837 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetClientModel.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 09734ad5b576c46debb7868a8ee7b66f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetExecutor.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetExecutor.h new file mode 100644 index 0000000..eee5a07 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetExecutor.h @@ -0,0 +1,48 @@ +// +// TDSNetExecutor.h +// TDSCommon +// +// Created by Insomnia on 2020/10/21. +// + +#import +#import + +typedef NS_ENUM (NSUInteger, TDSNetMethod) { + TDSNetMethodGet = 1, + TDSNetMethodPost +}; + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSNetRequestModel : NSObject + +@property (nonatomic, assign) TDSNetMethod method; + +@property (nonatomic, copy) NSString *url; + +@property (nonatomic, strong) id args; + +@property (nonatomic, strong) NSData *data; //protobuf Data数据 + +@property (nonatomic, assign) BOOL auth; + +@property (nonatomic) Class resCls; + +@property (nonatomic, copy, nullable) NSDictionary *header; + +@end + +@interface TDSNetExecutor<__covariant T>: NSObject + ++ (TDSNetExecutor *)create:(void(NS_NOESCAPE ^)(id subscriber))didSubscribe; + +- (void)success:(void(NS_NOESCAPE ^)(id _Nonnull x))success; + +- (void)success:(void(NS_NOESCAPE ^)(id _Nonnull x))success failure:(void (^)(NSError *error))failure; + +- (void)success:(void(NS_NOESCAPE ^)(id _Nonnull x))success failure:(void (^)(NSError *error))failure progress:(void(NS_NOESCAPE ^)(id progress))progress; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetExecutor.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetExecutor.h.meta new file mode 100644 index 0000000..b2a2d04 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetExecutor.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 941beae0ab93a4a4cb41df18abc73a8a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetInterceptor.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetInterceptor.h new file mode 100644 index 0000000..3691c9f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetInterceptor.h @@ -0,0 +1,36 @@ +// +// TDSNetInterceptor.h +// TDSCommon +// +// Created by Bottle K on 2021/2/25. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol TDSNetInterceptDelegate +@optional +- (void)receiveNetContent:(NSDictionary *)content; +@end + +@interface TDSNetInterceptor : NSObject + ++ (instancetype)new NS_UNAVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; + ++ (instancetype)sharedInstance; + +- (void)registerNetInterceptor:(NSString *)from delegate:(id)delegate; + +- (void)unRegisterNetInterceptor:(NSString *)from; + +- (void)interceptWithContent:(NSDictionary *)content; + ++ (void)checkAuthErrorAccessDenied:(NSDictionary *)params handler:(void (^)(NSDictionary *dataDic))handler; + ++ (void)checkAuthError:(NSDictionary *)params errorList:(NSArray *)errorList handler:(void (^)(NSDictionary *dataDic))handler; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetInterceptor.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetInterceptor.h.meta new file mode 100644 index 0000000..84e4f09 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetInterceptor.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 536820010917e4a1da7042d8b5fac781 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetSubscriber.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetSubscriber.h new file mode 100644 index 0000000..b7fb84f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetSubscriber.h @@ -0,0 +1,29 @@ +// +// TDSNetSubscriber.h +// TDSCommon +// +// Created by Insomnia on 2020/10/22. +// + +#import + +@protocol TDSNetSubscriber +@optional + +- (void)sendSuccess:(nullable id)value; + +- (void)sendFailure:(nullable NSError *)error; + +- (void)sendProgress:(nullable id)progress; + +@end + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSNetSubscriber : NSObject + ++ (instancetype)subscriberWithSuccess:(void (^)(id x))success failure:(nullable void (^)(NSError *error))error progress:(nullable void (^)(id progress))progress; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetSubscriber.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetSubscriber.h.meta new file mode 100644 index 0000000..faff96d --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetSubscriber.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fbf4e61af3933415e902e500da26304d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetworkTypeUtil.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetworkTypeUtil.h new file mode 100644 index 0000000..751d7f1 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetworkTypeUtil.h @@ -0,0 +1,18 @@ +// +// TDSNetworkTypeUtil.h +// TapCommonSDK +// +// Created by Bottle K on 2021/9/7. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSNetworkTypeUtil : NSObject ++ (instancetype)shareInstance; +- (NSString *)getMobileType; +- (NSInteger)getNetworkType; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetworkTypeUtil.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetworkTypeUtil.h.meta new file mode 100644 index 0000000..bf6ba10 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSNetworkTypeUtil.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e41175e725ebf41d58183a7a094f2343 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSProgressHUD.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSProgressHUD.h new file mode 100644 index 0000000..310ed61 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSProgressHUD.h @@ -0,0 +1,391 @@ +// TDSProgressHUD + +#import +#import +#import + +@class TDSBackgroundView; +@protocol TDSProgressHUDDelegate; + + +extern CGFloat const TDSProgressMaxOffset; + +typedef NS_ENUM(NSInteger, TDSProgressHUDMode) { + /// UIActivityIndicatorView. + TDSProgressHUDModeIndeterminate, + /// A round, pie-chart like, progress view. + TDSProgressHUDModeDeterminate, + /// Horizontal progress bar. + TDSProgressHUDModeDeterminateHorizontalBar, + /// Ring-shaped progress view. + TDSProgressHUDModeAnnularDeterminate, + /// Shows a custom view. + TDSProgressHUDModeCustomView, + /// Shows only labels. + TDSProgressHUDModeText +}; + +typedef NS_ENUM(NSInteger, TDSProgressHUDAnimation) { + /// Opacity animation + TDSProgressHUDAnimationFade, + /// Opacity + scale animation (zoom in when appearing zoom out when disappearing) + TDSProgressHUDAnimationZoom, + /// Opacity + scale animation (zoom out style) + TDSProgressHUDAnimationZoomOut, + /// Opacity + scale animation (zoom in style) + TDSProgressHUDAnimationZoomIn +}; + +typedef NS_ENUM(NSInteger, TDSProgressHUDBackgroundStyle) { + /// Solid color background + TDSProgressHUDBackgroundStyleSolidColor, + /// UIVisualEffectView or UIToolbar.layer background view + TDSProgressHUDBackgroundStyleBlur +}; + +typedef void (^TDSProgressHUDCompletionBlock)(void); + + +NS_ASSUME_NONNULL_BEGIN + + +/** + * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. + * + * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class. + * The XDGProgressHUD window spans over the entire space given to it by the initWithFrame: constructor and catches all + * user input on this region, thereby preventing the user operations on components below the view. + * + * @note To still allow touches to pass through the HUD, you can set hud.userInteractionEnabled = NO. + * @attention XDGProgressHUD is a UI class and should therefore only be accessed on the main thread. + */ +@interface TDSProgressHUD : UIView + +/** + * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. + * + * @note This method sets removeFromSuperViewOnHide. The HUD will automatically be removed from the view hierarchy when hidden. + * + * @param view The view that the HUD will be added to + * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use + * animations while appearing. + * @return A reference to the created HUD. + * + * @see hideHUDForView:animated: + * @see animationType + */ ++ (instancetype)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; + +/// @name Showing and hiding + +/** + * Finds the top-most HUD subview that hasn't finished and hides it. The counterpart to this method is showHUDAddedTo:animated:. + * + * @note This method sets removeFromSuperViewOnHide. The HUD will automatically be removed from the view hierarchy when hidden. + * + * @param view The view that is going to be searched for a HUD subview. + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use + * animations while disappearing. + * @return YES if a HUD was found and removed, NO otherwise. + * + * @see showHUDAddedTo:animated: + * @see animationType + */ ++ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; + +/** + * Finds the top-most HUD subview that hasn't finished and returns it. + * + * @param view The view that is going to be searched. + * @return A reference to the last HUD subview discovered. + */ ++ (nullable TDSProgressHUD *)HUDForView:(UIView *)view NS_SWIFT_NAME(forView(_:)); + +/** + * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with + * view.bounds as the parameter. + * + * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as + * the HUD's superview (i.e., the view that the HUD will be added to). + */ +- (instancetype)initWithView:(UIView *)view; + +/** + * Displays the HUD. + * + * @note You need to make sure that the main thread completes its run loop soon after this method call so that + * the user interface can be updated. Call this method when your task is already set up to be executed in a new thread + * (e.g., when using something like NSOperation or making an asynchronous call like NSURLRequest). + * + * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use + * animations while appearing. + * + * @see animationType + */ +- (void)showAnimated:(BOOL)animated; + +/** + * Hides the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to + * hide the HUD when your task completes. + * + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use + * animations while disappearing. + * + * @see animationType + */ +- (void)hideAnimated:(BOOL)animated; + +/** + * Hides the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to + * hide the HUD when your task completes. + * + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use + * animations while disappearing. + * @param delay Delay in seconds until the HUD is hidden. + * + * @see animationType + */ +- (void)hideAnimated:(BOOL)animated afterDelay:(NSTimeInterval)delay; + +/** + * The HUD delegate object. Receives HUD state notifications. + */ +@property (weak, nonatomic) id delegate; + +/** + * Called after the HUD is hidden. + */ +@property (copy, nullable) TDSProgressHUDCompletionBlock completionBlock; + +/** + * Grace period is the time (in seconds) that the invoked method may be run without + * showing the HUD. If the task finishes before the grace time runs out, the HUD will + * not be shown at all. + * This may be used to prevent HUD display for very short tasks. + * Defaults to 0 (no grace time). + * @note The graceTime needs to be set before the hud is shown. You thus can't use `showHUDAddedTo:animated:`, + * but instead need to alloc / init the HUD, configure the grace time and than show it manually. + */ +@property (assign, nonatomic) NSTimeInterval graceTime; + +/** + * The minimum time (in seconds) that the HUD is shown. + * This avoids the problem of the HUD being shown and than instantly hidden. + * Defaults to 0 (no minimum show time). + */ +@property (assign, nonatomic) NSTimeInterval minShowTime; + +/** + * Removes the HUD from its parent view when hidden. + * Defaults to NO. + */ +@property (assign, nonatomic) BOOL removeFromSuperViewOnHide; + +/// @name Appearance + +/** + * XDGProgressHUD operation mode. The default is TDSProgressHUDModeIndeterminate. + */ +@property (assign, nonatomic) TDSProgressHUDMode mode; + +/** + * A color that gets forwarded to all labels and supported indicators. Also sets the tintColor + * for custom views on iOS 7+. Set to nil to manage color individually. + * Defaults to semi-translucent black on iOS 7 and later and white on earlier iOS versions. + */ +@property (strong, nonatomic, nullable) UIColor *contentColor UI_APPEARANCE_SELECTOR; + +/** + * The animation type that should be used when the HUD is shown and hidden. + */ +@property (assign, nonatomic) TDSProgressHUDAnimation animationType UI_APPEARANCE_SELECTOR; + +/** + * The bezel offset relative to the center of the view. You can use TDSProgressMaxOffset + * and -TDSProgressMaxOffset to move the HUD all the way to the screen edge in each direction. + * E.g., CGPointMake(0.f, TDSProgressMaxOffset) would position the HUD centered on the bottom edge. + */ +@property (assign, nonatomic) CGPoint offset UI_APPEARANCE_SELECTOR; + +/** + * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). + * This also represents the minimum bezel distance to the edge of the HUD view. + * Defaults to 20.f + */ +@property (assign, nonatomic) CGFloat margin UI_APPEARANCE_SELECTOR; + +/** + Defaults to 13.f +*/ +@property (assign, nonatomic) CGFloat verticalMargin UI_APPEARANCE_SELECTOR; + + +/** + * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size). + */ +@property (assign, nonatomic) CGSize minSize UI_APPEARANCE_SELECTOR; + +/** + * Force the HUD dimensions to be equal if possible. + */ +@property (assign, nonatomic, getter = isSquare) BOOL square UI_APPEARANCE_SELECTOR; + +/** + * When enabled, the bezel center gets slightly affected by the device accelerometer data. + * Defaults to NO. + * + * @note This can cause main thread checker assertions on certain devices. https://github.com/jdg/XDGProgressHUD/issues/552 + */ +@property (assign, nonatomic, getter=areDefaultMotionEffectsEnabled) BOOL defaultMotionEffectsEnabled UI_APPEARANCE_SELECTOR; + +/// @name Progress + +/** + * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. + */ +@property (assign, nonatomic) float progress; + +/// @name ProgressObject + +/** + * The NSProgress object feeding the progress information to the progress indicator. + */ +@property (strong, nonatomic, nullable) NSProgress *progressObject; + +/// @name Views + +/** + * The view containing the labels and indicator (or customView). + */ +@property (strong, nonatomic, readonly)TDSBackgroundView *bezelView; + +/** + * View covering the entire HUD area, placed behind bezelView. + */ +@property (strong, nonatomic, readonly)TDSBackgroundView *backgroundView; + +/** + * The UIView (e.g., a UIImageView) to be shown when the HUD is in TDSProgressHUDModeCustomView. + * The view should implement intrinsicContentSize for proper sizing. For best results use approximately 37 by 37 pixels. + */ +@property (strong, nonatomic, nullable) UIView *customView; + +/** + * A label that holds an optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit + * the entire text. + */ +@property (strong, nonatomic, readonly) UILabel *label; + +/** + * A label that holds an optional details message displayed below the labelText message. The details text can span multiple lines. + */ +@property (strong, nonatomic, readonly) UILabel *detailsLabel; + +/** + * A button that is placed below the labels. Visible only if a target / action is added and a title is assigned.. + */ +@property (strong, nonatomic, readonly) UIButton *button; + +@end + + +@protocol TDSProgressHUDDelegate + +@optional + +/** + * Called after the HUD was fully hidden from the screen. + */ +- (void)hudWasHidden:(TDSProgressHUD *)hud; + +@end + + +/** + * A progress view for showing definite progress by filling up a circle (pie chart). + */ +@interface XDGRoundProgressView : UIView + +/** + * Progress (0.0 to 1.0) + */ +@property (nonatomic, assign) float progress; + +/** + * Indicator progress color. + * Defaults to white [UIColor whiteColor]. + */ +@property (nonatomic, strong) UIColor *progressTintColor; + +/** + * Indicator background (non-progress) color. + * Only applicable on iOS versions older than iOS 7. + * Defaults to translucent white (alpha 0.1). + */ +@property (nonatomic, strong) UIColor *backgroundTintColor; + +/* + * Display mode - NO = round or YES = annular. Defaults to round. + */ +@property (nonatomic, assign, getter = isAnnular) BOOL annular; + +@end + + +/** + * A flat bar progress view. + */ +@interface XDGBarProgressView : UIView + +/** + * Progress (0.0 to 1.0) + */ +@property (nonatomic, assign) float progress; + +/** + * Bar border line color. + * Defaults to white [UIColor whiteColor]. + */ +@property (nonatomic, strong) UIColor *lineColor; + +/** + * Bar background color. + * Defaults to clear [UIColor clearColor]; + */ +@property (nonatomic, strong) UIColor *progressRemainingColor; + +/** + * Bar progress color. + * Defaults to white [UIColor whiteColor]. + */ +@property (nonatomic, strong) UIColor *progressColor; + +@end + + +@interface TDSBackgroundView : UIView + +/** + * The background style. + * Defaults to TDSProgressHUDBackgroundStyleBlur. + */ +@property (nonatomic) TDSProgressHUDBackgroundStyle style; + +/** + * The blur effect style, when using TDSProgressHUDBackgroundStyleBlur. + * Defaults to UIBlurEffectStyleLight. + */ +@property (nonatomic) UIBlurEffectStyle blurEffectStyle; + +/** + * The background color or the blur tint color. + * + * Defaults to nil on iOS 13 and later and + * `[UIColor colorWithWhite:0.8f alpha:0.6f]` + * on older systems. + */ +@property (nonatomic, strong, nullable) UIColor *color; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSProgressHUD.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSProgressHUD.h.meta new file mode 100644 index 0000000..5a49d9f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSProgressHUD.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 352c802611c0943b1b5db5e5e5cce9e9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSReachability.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSReachability.h new file mode 100644 index 0000000..4791689 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSReachability.h @@ -0,0 +1,52 @@ +// +// XDReachability.h +// TDS +// +// Created by JiangJiahao on 2019/7/25. +// Copyright © 2019 X.D. Network Inc. All rights reserved. +// 直接用的YYReachability + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, TDSReachabilityStatus) { + TDSReachabilityStatusNone = 0, ///< Not Reachable + TDSReachabilityStatusWWAN = 1, ///< Reachable via WWAN (2G/3G/4G) + TDSReachabilityStatusWiFi = 2, ///< Reachable via WiFi +}; + +typedef NS_ENUM(NSUInteger, TDSReachabilityWWANStatus) { + TDSReachabilityWWANStatusNone = 0, ///< Not Reachable vis WWAN + TDSReachabilityWWANStatus2G = 2, ///< Reachable via 2G (GPRS/EDGE) 10~100Kbps + TDSReachabilityWWANStatus3G = 3, ///< Reachable via 3G (WCDMA/HSDPA/...) 1~10Mbps + TDSReachabilityWWANStatus4G = 4, ///< Reachable via 4G (eHRPD/LTE) 100Mbps + TDSReachabilityWWANStatus5G = 5, ///< Reachable via 5G (sa/nsa) 500Mbps +}; + +@interface TDSReachability : NSObject +@property (nonatomic, readonly) SCNetworkReachabilityFlags flags; ///< Current flags. +@property (nonatomic, readonly) TDSReachabilityStatus status; ///< Current status. +@property (nonatomic, readonly) TDSReachabilityWWANStatus wwanStatus NS_AVAILABLE_IOS(7_0); ///< Current WWAN status. +@property (nonatomic, readonly, getter=isReachable) BOOL reachable; ///< Current reachable status. + +/// Notify block which will be called on main thread when network changed. +@property (nullable, nonatomic, copy) void (^TDSReachabilityNotifyBlock)(TDSReachability *reachability); + +/// Create an object to check the reachability of the default route. ++ (instancetype)reachability; + +/// Create an object to check the reachability of the local WI-FI. ++ (instancetype)reachabilityForLocalWifi DEPRECATED_MSG_ATTRIBUTE("unnecessary and potentially harmful"); + +/// Create an object to check the reachability of a given host name. ++ (nullable instancetype)reachabilityWithHostname:(NSString *)hostname; + +/// Create an object to check the reachability of a given IP address +/// @param hostAddress You may pass `struct sockaddr_in` for IPv4 address or `struct sockaddr_in6` for IPv6 address. ++ (nullable instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSReachability.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSReachability.h.meta new file mode 100644 index 0000000..4b65bde --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSReachability.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3e8fab937621e4c928f9f4a12067c195 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionApi.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionApi.h new file mode 100644 index 0000000..34c8e53 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionApi.h @@ -0,0 +1,16 @@ +// +// TDSRegionApi.h +// TDSCommon +// +// Created by TapTap-David on 2020/11/18. +// + +#import +#import +NS_ASSUME_NONNULL_BEGIN + +@interface TDSRegionApi : NSObject ++ (TDSNetExecutor *)getDeviceRegion:(NSInteger)carrier bundleId:(NSString *)bundleId; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionApi.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionApi.h.meta new file mode 100644 index 0000000..9539a56 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionApi.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3cd326ed16195492eb4ad131f53a2290 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionHelper.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionHelper.h new file mode 100644 index 0000000..5bf6225 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionHelper.h @@ -0,0 +1,18 @@ +// +// TDSRegionHelper.h +// TDSCommon +// +// Created by TapTap-David on 2020/11/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSRegionHelper : NSObject + ++ (void)getRegionCode:(void(^)(BOOL isMainland))complete; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionHelper.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionHelper.h.meta new file mode 100644 index 0000000..5346c2f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionHelper.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d29ba60227fa74ae69b22cad9d81a307 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionNetClient.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionNetClient.h new file mode 100644 index 0000000..47b1436 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionNetClient.h @@ -0,0 +1,18 @@ +// +// TDSRegionNetClient.h +// TDSCommon +// +// Created by TapTap-David on 2020/11/18. +// + +#import +#import +NS_ASSUME_NONNULL_BEGIN + +@interface TDSRegionNetClient : NSObject ++ (instancetype)sharedInstance; + +- (TDSNetExecutor *)doWithRequest:(TDSNetRequestModel *)request; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionNetClient.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionNetClient.h.meta new file mode 100644 index 0000000..18278fc --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRegionNetClient.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 30f5fcb5b24324b66bdc26894b9ce13f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSResult.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSResult.h new file mode 100644 index 0000000..95d1462 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSResult.h @@ -0,0 +1,37 @@ +// +// Result.h +// EngineBridge +// +// Created by xe on 2020/9/28. +// Copyright © 2020 xe. All rights reserved. +// + + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSResult : NSObject + +@property (nonatomic,assign) int code; +@property (nonatomic,copy) NSString* message; +@property (nonatomic,copy) NSString* content; +@property (nonatomic,copy) NSString* callbackId; +@property (nonatomic,assign) BOOL onceTime; + ++ (TDSResult*)code:(int)code + content:(NSString*)content + callbackId:(NSString*)callbackId + message:(NSString*)message; + ++ (TDSResult*)code:(int)code + content:(NSString*)content + callbackId:(NSString*)callbackId + message:(NSString*)message + onceTime:(BOOL) onceTime; + +- (NSString*)toJSON; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSResult.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSResult.h.meta new file mode 100644 index 0000000..15e2ef0 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSResult.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a041eeb357ce546b6a3a878da52600d3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRouter.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRouter.h new file mode 100644 index 0000000..38aa638 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRouter.h @@ -0,0 +1,63 @@ +// +// TDSRouter.h +// TDSCommon +// +// Created by Insomnia on 2020/11/27. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +extern NSString *const TDSRouterURL; +extern NSString *const TDSRouterResp; +extern NSString *const TDSRouterParams; + +typedef void (^TDSRouterHandler)(NSDictionary *params); + +typedef void (^TDSRouterResponse)(NSDictionary *response); + + +/// TDS路由 +@interface TDSRouter : NSObject + +/// 注册路由 +/// @param url 路由路径,例如tds://service,并支持带参数路由tds://service/:user/:age +/// @param handler 接收参数,包含了注册的 URL 中对应的变量, 如注册的 URL 为ds://service/:user那么,就会传一个 @{@"user": "tds_name"} 这样的字典过来 ++ (void)registerServiceWithURL:(NSString *)url handler:(TDSRouterHandler)handler; + + +/// 反注册 +/// @param url 路由路径 ++ (void)unregisterServiceWithUrl:(NSString *)url; + +/// 请求路由 +/// @param url 路由路径 ++ (void)requestWithURL:(NSString *)url; + + +/// 请求路由 +/// @param url 路由路径 +/// @param params 请求参数 ++ (void)requestWithURL:(NSString *)url params:(NSDictionary * _Nullable)params; + +/// 请求路由 +/// @param url 路由路径 +/// @param params 请求参数 +/// @param response 返回值字典 ++ (void)requestWithURL:(NSString *)url params:(NSDictionary * _Nullable)params response:(TDSRouterResponse _Nullable)response; + +/// 是否存在服务 +/// @param url 路由路径 ++ (BOOL)hasServiceWithURL:(NSString *)url; + + +/// 自动拼接路由参数 +/// @param url 路由路径,例如tds://service/:user/:age +/// @param params 数组顺序要与路由参数顺序对应 +/// @return 生成URL 字符串 ++ (NSString *)generateWithURL:(NSString *)url params:(NSArray *)params; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRouter.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRouter.h.meta new file mode 100644 index 0000000..dd60ec9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSRouter.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b821e2004d5b34c80a69607e7f077bc7 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSThrottle.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSThrottle.h new file mode 100644 index 0000000..7ccfc06 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSThrottle.h @@ -0,0 +1,107 @@ +// +// TDSThrottle.h +// TDSCommon +// +// Created by JiangJiahao on 2021/3/22. +// + +#import + +/** 自定管理执行与释放时,标记调用来源: 对象/类地址_方法名_调用行数 */ +#define TDSThrottleKey [NSString stringWithFormat:@"%p_%s_%d",self,__func__,__LINE__] +#define TDSThrottleKeyAppendCustom(customKey) [NSString stringWithFormat:@"%p_%s_%d%@",self,__func__,__LINE__,customKey] + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^TDSThrottleTaskBlock)(void); +extern double const THROTTLE_INTERVAL; // 默认频率间隔, 0.5s + +/** + 相邻调用必须间隔超时时间以上才会触发 + */ +@interface TDSThrottle : NSObject +#pragma mark - 自动管理 ++ (TDSThrottle *)throttleWithThrottleKey:(NSString *)throttleKey taskBlock:(TDSThrottleTaskBlock)taskBlock; + ++ (TDSThrottle *)throttleWithInterval:(NSTimeInterval)interval + throttleKey:(NSString *)throttleKey + taskBlock:(TDSThrottleTaskBlock)taskBlock; + +/// 自动执行一个Throttle(节流)任务。 +/// 注意:适用调用不是异常频繁的任务,如用户按钮频繁点击限制 +/// @param interval 防抖间隔,默认0.5s +/// @param queue 任务执行队列,默认主队列 +/// @param throttleKey 任务来源标识,可使用默认宏 TDSThrottleKey 或 TDSThrottleKeyAppendCustom +/// @param taskBlock 需要执行的任务 ++ (TDSThrottle *)throttleWithInterval:(NSTimeInterval)interval + onQueue:(dispatch_queue_t)queue + throttleKey:(NSString *)throttleKey + taskBlock:(TDSThrottleTaskBlock)taskBlock; +#pragma mark - 手动管理 ++ (TDSThrottle *)manualThrottleWithTaskBlock:(TDSThrottleTaskBlock)taskBlock; + ++ (TDSThrottle *)manualThrottleWithInterval:(NSTimeInterval)interval + taskBlock:(TDSThrottleTaskBlock)taskBlock; + +/// 手动获取一个Throttle(节流)任务,需要在不再使用时手动调用 dispose 释放 +/// 注意:适合在任务会异常频繁执行时进行限制,如滑动列表时在频繁系统回调中处理的任务 +/// @param interval 抖间隔,默认0.5s +/// @param queue 任务执行队列,默认主队列 +/// @param taskBlock 需要执行的任务 ++ (TDSThrottle *)manualThrottleWithInterval:(NSTimeInterval)interval + onQueue:(dispatch_queue_t)queue + taskBlock:(TDSThrottleTaskBlock)taskBlock; + +#pragma mark - 执行与销毁 +/// 触发任务执行,手动管理时调用 +- (void)invoke; + +/// 销毁任务,手动管理时调用 +- (void)dispose; + +@end + +#pragma mark - private classes +/** + 调用后立即触发,间隔时间未超时无法再次触发,每次调用不会重新计时 + */ +@interface TDSThrottleLeading : TDSThrottle + +@end + +/** + 调用后等待间隔时间超时以后触发,每次调用不会重新计时 + */ +@interface TDSThrottleTrailing : TDSThrottle + +@end + +/** + 使用方法: + 1.自动管理(自动执行/释放) + // 按钮事件或需要执行的函数,任务使用 Throttle 包裹 + - (void)testThrottle { + [TDSThrottleLeading throttleWithInterval:0.8 throttleKey:TDSThrottleKey taskBlock:^{ + // TODO 想要执行的任务 + }]; + } + + 2.手动管理 (创建时调用 manual 开头函数) + + @property (nonatomic, strong) TDSThrottle *testThrottler; + + // 按钮事件或需要执行的函数,任务使用 Throttle 包裹 + - (void)testThrottle { + if (!self.testThrottler) { + self.testThrottler = [TDSThrottleLeading manualThrottleWithTaskBlock:^{ + // TODO 想要执行的任务 + }]; + } + [self.testThrottler invoke]; + } + + // 在适当时机,如退出页面时释放 + [self.testThrottler dispose]; + */ +NS_ASSUME_NONNULL_END + diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSThrottle.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSThrottle.h.meta new file mode 100644 index 0000000..55f22f5 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSThrottle.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c2b6966fb6a1447b98e0d864541c0746 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerConfig.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerConfig.h new file mode 100644 index 0000000..e235242 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerConfig.h @@ -0,0 +1,29 @@ +// +// TDSTrackerConfig.h +// TDSCommon +// +// Created by TapTap-David on 2021/1/15. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +typedef enum : NSUInteger { + TDSTrackerForTapsdk = 1, + TDSTrackerForFriends, + TDSTrackerForNetwork, + TDSTrackerForTapSDKNetwork +} TDSTrackerType; + +@interface TDSTrackerConfig : NSObject +@property (nonatomic, copy) NSString *accessKeyId; +@property (nonatomic, copy) NSString *accessKeySecret; +@property (nonatomic, copy) NSString *project; +@property (nonatomic, copy) NSString *endPoint; +@property (nonatomic, copy) NSString *logStore; +@property (nonatomic, copy) NSString *sdkVersionName; +@property (nonatomic, assign) TDSTrackerType trackerType; +@property (nonatomic, assign) NSInteger groupSize; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerConfig.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerConfig.h.meta new file mode 100644 index 0000000..580829d --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerConfig.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bc019e2c537d34cf3a9cf72d8080159f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerEvent.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerEvent.h new file mode 100644 index 0000000..920d964 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerEvent.h @@ -0,0 +1,38 @@ +// +// TDSTrackerEvent.h +// TapCommonSDK +// +// Created by Bottle K on 2021/6/21. +// + +#import +#import +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSTrackerEvent : NSObject +//事件类型 +@property (nonatomic, assign) TDSTrackerType trackerType; + +//用户模型 +@property (nonatomic, strong, nullable) UserModel *userModel; + +//页面模型 +@property (nonatomic, strong, nullable) PageModel *pageModel; + +//行为模型 +@property (nonatomic, strong, nullable) ActionModel *actionModel; + +//网络模型 +@property (nonatomic, strong, nullable) NetworkStateModel *networkModel; + +//登录模型 +@property (nonatomic, strong, nullable) LoginModel *loginModel; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerEvent.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerEvent.h.meta new file mode 100644 index 0000000..c33b9d5 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerEvent.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 90f5a35b3c6844686b60f9d4c8e3e5b6 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerManager.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerManager.h new file mode 100644 index 0000000..6673bbb --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerManager.h @@ -0,0 +1,28 @@ +// +// TDSTrackerManager.h +// TDSCommon +// +// Created by TapTap-David on 2021/1/19. +// + +#import +#import +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSTrackerManager : NSObject + ++ (instancetype)sharedInstance; + ++ (void)registerTracker:(TDSTrackerConfig *)trackerConfig; + +- (void)trackWithEvent:(TDSTrackerEvent *)event; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerManager.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerManager.h.meta new file mode 100644 index 0000000..611b1f7 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSTrackerManager.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bfb51d49fb4964c4f8168f187a774268 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKCookieWebview.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKCookieWebview.h new file mode 100644 index 0000000..0efc47b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKCookieWebview.h @@ -0,0 +1,19 @@ +// +// WKCookieWebview.h +// NativeApp +// +// Created by JiangJiahao on 2019/4/3. +// Copyright © 2019 JiangJiahao. All rights reserved. +// 处理wkwebview的cookie问题 + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSWKCookieWebview : WKWebView +- (id)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration useRedirectCookie:(BOOL)useRedirectCookie; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKCookieWebview.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKCookieWebview.h.meta new file mode 100644 index 0000000..8343d14 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKCookieWebview.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6fb5877b56e164873912c98bd6f779a5 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKWebViewJavascriptBridge.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKWebViewJavascriptBridge.h new file mode 100755 index 0000000..dd3506f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKWebViewJavascriptBridge.h @@ -0,0 +1,35 @@ +// +// WKWebViewJavascriptBridge.h +// +// Created by @LokiMeyburg on 10/15/14. +// Copyright (c) 2014 @LokiMeyburg. All rights reserved. +// + +#if (__MAC_OS_X_VERSION_MAX_ALLOWED > __MAC_10_9 || __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_1) +#define supportsWKWebView +#endif + +#if defined supportsWKWebView + +#import +#import +#import + +@interface TDSWKWebViewJavascriptBridge : NSObject + ++ (instancetype)bridgeForWebView:(WKWebView*)webView; ++ (void)enableLogging; + +- (void)registerHandler:(NSString*)handlerName handler:(TDSWVJBHandler)handler; +- (void)removeHandler:(NSString*)handlerName; +- (void)callHandler:(NSString*)handlerName; +- (void)callHandler:(NSString*)handlerName data:(id)data; +- (void)callHandler:(NSString*)handlerName data:(id)data responseCallback:(TDSWVJBResponseCallback)responseCallback; +- (void)reset; +- (void)setWebViewDelegate:(id)webViewDelegate; +- (void)disableJavscriptAlertBoxSafetyTimeout; +- (NSArray *)getSupportHandlerNameArray; + +@end + +#endif diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKWebViewJavascriptBridge.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKWebViewJavascriptBridge.h.meta new file mode 100644 index 0000000..a2d88ad --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKWebViewJavascriptBridge.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 94f6cdf7cda144eca8d451479c7ee71f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSSecurity.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSSecurity.h new file mode 100644 index 0000000..e81edaa --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSSecurity.h @@ -0,0 +1,82 @@ +////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TDSWSSecurity.h +// +// Created by Austin and Dalton Cherry on on 9/3/15. +// Copyright (c) 2014-2017 Austin Cherry. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +////////////////////////////////////////////////////////////////////////////////////////////////// + +#import +#import + +@interface TDSWSSSLCert : NSObject + +/** + Designated init for certificates + + :param: data is the binary data of the certificate + + :returns: a representation security object to be used with + */ +- (instancetype)initWithData:(NSData *)data; + + +/** + Designated init for public keys + + :param: key is the public key to be used + + :returns: a representation security object to be used with + */ +- (instancetype)initWithKey:(SecKeyRef)key; + +@end + +@interface TDSWSSecurity : NSObject + +/** + Use certs from main app bundle + + :param usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation + + :returns: a representation security object to be used with + */ +- (instancetype)initWithCerts:(NSArray*)certs publicKeys:(BOOL)publicKeys; + +/** + Designated init + + :param keys: is the certificates or public keys to use + :param usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation + + :returns: a representation security object to be used with + */ +- (instancetype)initUsingPublicKeys:(BOOL)publicKeys; + +/** + Should the domain name be validated? Default is YES. + */ +@property(nonatomic)BOOL validatedDN; + +/** + Validate if the cert is legit or not. + :param: trust is the trust to validate + :param: domain to validate along with the trust (can be nil) + :return: YES or NO if valid. + */ +- (BOOL)isValid:(SecTrustRef)trust domain:(NSString*)domain; + +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSSecurity.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSSecurity.h.meta new file mode 100644 index 0000000..021b4a8 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSSecurity.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ae85c9539a41b465090eadd6543f4dfa +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSWebSocket.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSWebSocket.h new file mode 100644 index 0000000..e840aa0 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSWebSocket.h @@ -0,0 +1,189 @@ +////////////////////////////////////////////////////////////////////////////////////////////////// +// +// TDSWSWebSocket.h +// +// Created by Austin and Dalton Cherry on on 5/13/14. +// Copyright (c) 2014-2017 Austin Cherry. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +////////////////////////////////////////////////////////////////////////////////////////////////// + +#import +#import + +@class TDSWSWebSocket; + +/** + It is important to note that all the delegate methods are put back on the main thread. + This means if you want to do some major process of the data, you need to create a background thread. + */ +@protocol TDSWSWebSocketDelegate + +@optional +/** + The websocket connected to its host. + @param socket is the current socket object. + */ +-(void)websocketDidConnect:(nonnull TDSWSWebSocket*)socket; + +/** + The websocket was disconnected from its host. + @param socket is the current socket object. + @param error is return an error occured to trigger the disconnect. + */ +-(void)websocketDidDisconnect:(nonnull TDSWSWebSocket*)socket error:(nullable NSError*)error; + +/** + The websocket got a text based message. + @param socket is the current socket object. + @param string is the text based data that has been returned. + */ +-(void)websocket:(nonnull TDSWSWebSocket*)socket didReceiveMessage:(nonnull NSString*)string; + +/** + The websocket got a binary based message. + @param socket is the current socket object. + @param data is the binary based data that has been returned. + */ +-(void)websocket:(nonnull TDSWSWebSocket*)socket didReceiveData:(nullable NSData*)data; + +/** + The websocket got a pong. + @param socket is the current socket object. + @param data is the binary based data that has been returned. + */ +-(void)websocket:(nonnull TDSWSWebSocket*)socket didReceivePong:(nullable NSData*)data; + +@end + +@interface TDSWSWebSocket : NSObject + +@property(nonatomic,weak, nullable)iddelegate; +@property(nonatomic, readonly, nonnull) NSURL *url; + +/** + constructor to create a new websocket with QOS_CLASS_UTILITY dispatch queue + @param url the host you want to connect to. + @param protocols the websocket protocols you want to use (e.g. chat,superchat). + @return a newly initalized websocket. + */ +- (nonnull instancetype)initWithURL:(nonnull NSURL *)url protocols:(nullable NSArray*)protocols; + +/** + constructor to create a new websocket + @param url the host you want to connect to. + @param protocols the websocket protocols you want to use (e.g. chat,superchat). + @param callbackQueue the dispatch queue for handling callbacks + @return a newly initalized websocket. + */ +- (nonnull instancetype)initWithURL:(nonnull NSURL *)url protocols:(nullable NSArray*)protocols callbackQueue:(nonnull dispatch_queue_t)callbackQueue; + +/** + constructor to create a new websocket + @param url the host you want to connect to. + @param protocols the websocket protocols you want to use (e.g. chat,superchat). + @param callbackQueue the dispatch queue for handling callbacks + @param connectTimeout timeout for blocking connect + @return a newly initalized websocket. + */ +- (nonnull instancetype)initWithURL:(nonnull NSURL *)url protocols:(nullable NSArray*)protocols callbackQueue:(nonnull dispatch_queue_t)callbackQueue connectTimeout:(NSTimeInterval)connectTimeout; + +/** + connect to the host + */ +- (void)connect; + +/** + disconnect to the host. This sends the close Connection opcode to terminate cleanly. + */ +- (void)disconnect; + +/** + write binary based data to the socket. + @param data the binary data to write. + */ +- (void)writeData:(nonnull NSData*)data; + +/** + write text based data to the socket. + @param string the string to write. + */ +- (void)writeString:(nonnull NSString*)string; + +/** + write ping to the socket. + @param data the binary data to write (if desired). + */ +- (void)writePing:(nonnull NSData*)data; + +/** + Add a header to send along on the the HTTP connect. + @param value the string to send + @param key the HTTP key name to send + */ +- (void)addHeader:(nonnull NSString*)value forKey:(nonnull NSString*)key; + +/** + returns if the socket is conneted or not. + */ +@property(nonatomic, assign, readonly)BOOL isConnected; + +/** + Enable VOIP support on the socket, so it can be used in the background for VOIP calls. + Default setting is No. + */ +@property(nonatomic, assign)BOOL voipEnabled; + +/** + Allows connection to self signed or untrusted WebSocket connection. Useful for development. + Default setting is No. + */ +@property(nonatomic, assign)BOOL selfSignedSSL; + +/** + Use for SSL pinning. + */ +@property(nonatomic, strong, nullable)TDSWSSecurity *security; + +/** + Set your own custom queue. + Default setting is dispatch_get_main_queue. + */ +@property(nonatomic, strong, nullable)dispatch_queue_t queue; + +/** + Block property to use on connect. + */ +@property(nonatomic, strong, nullable)void (^onConnect)(void); + +/** + Block property to use on disconnect. + */ +@property(nonatomic, strong, nullable)void (^onDisconnect)(NSError*_Nullable); + +/** + Block property to use on receiving data. + */ +@property(nonatomic, strong, nullable)void (^onData)(NSData*_Nullable); + +/** + Block property to use on receiving text. + */ +@property(nonatomic, strong, nullable)void (^onText)(NSString*_Nullable); + +/** + Block property to use on receiving pong. + */ +@property(nonatomic, strong, nullable)void (^onPong)(NSData*_Nullable); +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSWebSocket.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSWebSocket.h.meta new file mode 100644 index 0000000..8891a5a --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWSWebSocket.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4d52f0f7b84a34f85b6428300aaebd86 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebImageView.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebImageView.h new file mode 100644 index 0000000..d0f58ee --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebImageView.h @@ -0,0 +1,21 @@ +// +// XDWebImageView.h +// NativeApp +// +// Created by JiangJiahao on 2018/10/16. +// Copyright © 2018 JiangJiahao. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSWebImageView : UIImageView + +- (void)setImageWithUrl:(NSString *)imageUrl; + +- (void)setImageWithUrl:(nullable NSString *)imageUrl placeholderImage:(nullable UIImage *)placeholder; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebImageView.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebImageView.h.meta new file mode 100644 index 0000000..7f6f0cc --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebImageView.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 81cc9a59f75854fa9a85b4e820bc5e5c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebViewJavascriptBridgeBase.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebViewJavascriptBridgeBase.h new file mode 100755 index 0000000..be4c2a4 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebViewJavascriptBridgeBase.h @@ -0,0 +1,46 @@ +// +// TapTapForumWebViewJavascriptBridgeBase.h +// +// Created by @LokiMeyburg on 10/15/14. +// Copyright (c) 2014 @LokiMeyburg. All rights reserved. +// + +#import + +#define kOldProtocolScheme @"wvjbscheme" +#define kNewProtocolScheme @"https" +#define kQueueHasMessage @"__wvjb_queue_message__" +#define kBridgeLoaded @"__bridge_loaded__" + +typedef void (^TDSWVJBResponseCallback)(id responseData); +typedef void (^TDSWVJBHandler)(id data, TDSWVJBResponseCallback responseCallback); +typedef NSDictionary ForumWVJBMessage; + +@protocol TDSWebViewJavascriptBridgeBaseDelegate +- (NSString*) _evaluateJavascript:(NSString*)javascriptCommand; +@end + +@interface TDSWebViewJavascriptBridgeBase : NSObject + + +@property (weak, nonatomic) id delegate; +@property (strong, nonatomic) NSMutableArray* startupMessageQueue; +@property (strong, nonatomic) NSMutableDictionary* responseCallbacks; +@property (strong, nonatomic) NSMutableDictionary* messageHandlers; +@property (strong, nonatomic) TDSWVJBHandler messageHandler; + ++ (void)enableLogging; ++ (void)setLogMaxLength:(int)length; +- (void)reset; +- (void)sendData:(id)data responseCallback:(TDSWVJBResponseCallback)responseCallback handlerName:(NSString*)handlerName; +- (void)flushMessageQueue:(NSString *)messageQueueString; +- (void)injectJavascriptFile; +- (BOOL)isWebViewJavascriptBridgeURL:(NSURL*)url; +- (BOOL)isQueueMessageURL:(NSURL*)urll; +- (BOOL)isBridgeLoadedURL:(NSURL*)urll; +- (void)logUnkownMessage:(NSURL*)url; +- (NSString *)webViewJavascriptCheckCommand; +- (NSString *)webViewJavascriptFetchQueyCommand; +- (void)disableJavscriptAlertBoxSafetyTimeout; + +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebViewJavascriptBridgeBase.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebViewJavascriptBridgeBase.h.meta new file mode 100644 index 0000000..d0a0d2b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWebViewJavascriptBridgeBase.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f934fcf6e66864517aee26f107884b4b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TDSmetamacro.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSmetamacro.h new file mode 100644 index 0000000..61f651b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSmetamacro.h @@ -0,0 +1,662 @@ +/** + * 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/Plugins/iOS/TapCommonSDK.framework/Headers/TDSmetamacro.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSmetamacro.h.meta new file mode 100644 index 0000000..7d4ade7 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TDSmetamacro.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2e817a3a3be9b468a92f27cf82713a00 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapCommonSDK.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TapCommonSDK.h new file mode 100644 index 0000000..ffb8ffe --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapCommonSDK.h @@ -0,0 +1,116 @@ +// +// TapCommonSDK.h +// TapCommonSDK +// +// Created by Bottle K on 2021/3/25. +// + +#import + +//! Project version number for TapCommonSDK. +FOUNDATION_EXPORT double TapCommonSDKVersionNumber; + +//! Project version string for TapCommonSDK. +FOUNDATION_EXPORT const unsigned char TapCommonSDKVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import + +#import +#import +#import + +#import + +#import + +#import + +#import +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#import +#import diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapCommonSDK.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TapCommonSDK.h.meta new file mode 100644 index 0000000..4548e65 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapCommonSDK.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9640354f900fc47d8bc1e7dc6e74854c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapConfig.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TapConfig.h new file mode 100644 index 0000000..8aabd1b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapConfig.h @@ -0,0 +1,26 @@ +// +// TapConfig.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/24. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM (NSInteger, TapSDKRegionType) { + TapSDKRegionTypeCN, + TapSDKRegionTypeIO +}; + +@interface TapConfig : NSObject +@property (nonatomic, copy) NSString *clientId; +@property (nonatomic, copy) NSString *clientToken; +@property (nonatomic, copy) NSString *serverURL; +@property (nonatomic, assign) TapSDKRegionType region; +@property (nonatomic, strong) TapDBConfig * dbConfig; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapConfig.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TapConfig.h.meta new file mode 100644 index 0000000..b05e14f --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapConfig.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: df0d75454d00e4865a6ffb4bfebccb47 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapDBConfig.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TapDBConfig.h new file mode 100644 index 0000000..cee914a --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapDBConfig.h @@ -0,0 +1,20 @@ +// +// TapDBConfig.h +// TapCommonSDK +// +// Created by Bottle K on 2021/4/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TapDBConfig : NSObject +@property (nonatomic, assign) BOOL enable; +@property (nonatomic, copy) NSString *channel; +@property (nonatomic, copy) NSString *gameVersion; +@property (nonatomic, assign, getter=isAdvertiserIDCollectionEnabled) BOOL advertiserIDCollectionEnabled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapDBConfig.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TapDBConfig.h.meta new file mode 100644 index 0000000..d86ecb2 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapDBConfig.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7e066208203cb469b94c1497644a5be9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapGameUtil.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TapGameUtil.h new file mode 100644 index 0000000..decc4c9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapGameUtil.h @@ -0,0 +1,20 @@ +// +// TapGameUtil.h +// TDSCommon +// +// Created by Bottle K on 2021/2/2. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TapGameUtil : NSObject + ++ (BOOL)isTapTapInstalled; + ++ (BOOL)isTapGlobalInstalled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapGameUtil.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TapGameUtil.h.meta new file mode 100644 index 0000000..3926818 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapGameUtil.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0ec27cd1f9b0f42f39a7f2402b811dda +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapLoginLogManager.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TapLoginLogManager.h new file mode 100644 index 0000000..3e0ce4c --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapLoginLogManager.h @@ -0,0 +1,40 @@ +// +// TapLoginLogManager.h +// TapLoginSDK +// +// Created by Bottle K on 2021/6/22. +// + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TapLoginLogManager : NSObject + ++ (instancetype)sharedInstance; + +- (TDSTrackerEvent *)generateNewEvent; + +- (TDSTrackerEvent *)event; + ++ (void)logStart; + ++ (void)logTapOpenWithType:(NSString *)type; + ++ (void)logTapBack; + ++ (void)logTapToken; + ++ (void)logTapProfileWithOpenId:(NSString *_Nullable)openId; + ++ (void)logTapSuccess; + ++ (void)logTapFailWithError:(NSError *)error; + ++ (void)logTapCancel; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapLoginLogManager.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TapLoginLogManager.h.meta new file mode 100644 index 0000000..ea2d77b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapLoginLogManager.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 376038bec53644f73b48fe5273e027e3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesDelegateProxy.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesDelegateProxy.h new file mode 100644 index 0000000..3cdde81 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesDelegateProxy.h @@ -0,0 +1,22 @@ +// +// TapDBDynamicPropertiesDelegate.h +// TapDB +// +// Created by xe on 2021/4/13. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef const char* _Nullable (*TapPropertiesDelegate)(const char*); + +@interface TapPropertiesDelegateProxy : NSObject + +- (instancetype)initWithDelegate: (TapPropertiesDelegate)delegate key:(NSString*)key; + +- (NSString*) getProperties; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesDelegateProxy.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesDelegateProxy.h.meta new file mode 100644 index 0000000..e9579d2 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesDelegateProxy.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e08e018270afe41678366fc6e797f2e5 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesHolder.h b/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesHolder.h new file mode 100644 index 0000000..74e7733 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesHolder.h @@ -0,0 +1,23 @@ +// +// TapDBDynamicPropertiesProxy.h +// TapDB +// +// Created by xe on 2021/4/13. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TapPropertiesHolder : NSObject + +@property NSMutableDictionary *dic; + ++ (TapPropertiesHolder*)shareInstance; + +- (NSString*)getProperty:(NSString*)key; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesHolder.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesHolder.h.meta new file mode 100644 index 0000000..59943cb --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/TapPropertiesHolder.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 19c8e3e7ae0e94aad85e86f8ab7f5bad +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/UIButton+TDSThrottle.h b/Plugins/iOS/TapCommonSDK.framework/Headers/UIButton+TDSThrottle.h new file mode 100644 index 0000000..f726464 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/UIButton+TDSThrottle.h @@ -0,0 +1,35 @@ +// +// UIButton+TDSThrottle.h +// TDSCommon +// +// Created by JiangJiahao on 2021/3/22. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger,TDSButtonThrottleType) { + TDSButtonThrottleTypeNone = 0, // 正常调用 + TDSButtonThrottleTypeThrottleLeading, // 节流,指定时间间隔内只能调用一次,首次调用时立即触发 + TDSButtonThrottleTypeThrottleTrailing, // 节流,指定时间间隔内只能调用一次,首次调用超时后触发 + TDSButtonThrottleTypeDebunceLeading, // 防抖,相邻调用间隔若小于指定时间间隔,则合并成一次调用,首次调用时立即触发 + TDSButtonThrottleTypeDebunceTrailing, // 防抖,相邻调用间隔若小于指定时间间隔,则合并成一次调用,首次超时后触发 +}; + +@interface UIButton (TDSThrottle) + +@property (nonatomic,assign) TDSButtonThrottleType throttleType; + +@end + +/** + 使用方法: + #import "UIButton+TDSThrottle.h" + + UIButton *testButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [testButton setThrottleType:TDSButtonThrottleTypeDebunceTrailing]; + + */ + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/UIButton+TDSThrottle.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/UIButton+TDSThrottle.h.meta new file mode 100644 index 0000000..56bf05b --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/UIButton+TDSThrottle.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fd2e9e5699d394774b870b1b895a3497 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/UIView+Toast.h b/Plugins/iOS/TapCommonSDK.framework/Headers/UIView+Toast.h new file mode 100755 index 0000000..9cf9a59 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/UIView+Toast.h @@ -0,0 +1,433 @@ +// +// UIView+Toast.h +// Toast +// +// Copyright (c) 2011-2016 Charles Scalesse. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import + +extern const NSString * CSToastPositionTop; +extern const NSString * CSToastPositionCenter; +extern const NSString * CSToastPositionBottom; + +@class CSToastStyle; + +/** + Toast is an Objective-C category that adds toast notifications to the UIView + object class. It is intended to be simple, lightweight, and easy to use. Most + toast notifications can be triggered with a single line of code. + + The `makeToast:` methods create a new view and then display it as toast. + + The `showToast:` methods display any view as toast. + + */ +@interface UIView (Toast) + +/** + Creates and presents a new toast view with a message and displays it with the + default duration and position. Styled using the shared style. + + @param message The message to be displayed + */ +- (void)makeToast:(NSString *)message; + +/** + Creates and presents a new toast view with a message. Duration and position + can be set explicitly. Styled using the shared style. + + @param message The message to be displayed + @param duration The toast duration + @param position The toast's center point. Can be one of the predefined CSToastPosition + constants or a `CGPoint` wrapped in an `NSValue` object. + */ +- (void)makeToast:(NSString *)message + duration:(NSTimeInterval)duration + position:(id)position; + + +- (void)makeDebugToast:(NSString *)message duration:(NSTimeInterval)duration position:(id)position; + + +/** + Creates and presents a new toast view with a message. Duration, position, and + style can be set explicitly. + + @param message The message to be displayed + @param duration The toast duration + @param position The toast's center point. Can be one of the predefined CSToastPosition + constants or a `CGPoint` wrapped in an `NSValue` object. + @param style The style. The shared style will be used when nil + */ +- (void)makeToast:(NSString *)message + duration:(NSTimeInterval)duration + position:(id)position + style:(CSToastStyle *)style; + +/** + Creates and presents a new toast view with a message, title, and image. Duration, + position, and style can be set explicitly. The completion block executes when the + toast view completes. `didTap` will be `YES` if the toast view was dismissed from + a tap. + + @param message The message to be displayed + @param duration The toast duration + @param position The toast's center point. Can be one of the predefined CSToastPosition + constants or a `CGPoint` wrapped in an `NSValue` object. + @param title The title + @param image The image + @param style The style. The shared style will be used when nil + @param completion The completion block, executed after the toast view disappears. + didTap will be `YES` if the toast view was dismissed from a tap. + */ +- (void)makeToast:(NSString *)message + duration:(NSTimeInterval)duration + position:(id)position + title:(NSString *)title + image:(UIImage *)image + style:(CSToastStyle *)style + completion:(void(^)(BOOL didTap))completion; + +/** + Creates a new toast view with any combination of message, title, and image. + The look and feel is configured via the style. Unlike the `makeToast:` methods, + this method does not present the toast view automatically. One of the showToast: + methods must be used to present the resulting view. + + @warning if message, title, and image are all nil, this method will return nil. + + @param message The message to be displayed + @param title The title + @param image The image + @param style The style. The shared style will be used when nil + @return The newly created toast view + */ +- (UIView *)toastViewForMessage:(NSString *)message + title:(NSString *)title + image:(UIImage *)image + style:(CSToastStyle *)style; + +/** + Dismisses all active toast views. Any toast that is currently being displayed on the + screen is considered active. + + @warning this does not clear toast views that are currently waiting in the queue. The next queued + toast will appear immediately after `hideToasts` completes the dismissal animation. + + */ +- (void)hideToasts; + +/** + Dismisses an active toast view. + + @param toast The active toast view to dismiss. Any toast that is currently being displayed + on the screen is considered active. + + @warning this does not clear a toast view that is currently waiting in the queue. + + */ +- (void)hideToast:(UIView *)toast; + +/** + Creates and displays a new toast activity indicator view at a specified position. + + @warning Only one toast activity indicator view can be presented per superview. Subsequent + calls to `makeToastActivity:` will be ignored until hideToastActivity is called. + + @warning `makeToastActivity:` works independently of the showToast: methods. Toast activity + views can be presented and dismissed while toast views are being displayed. `makeToastActivity:` + has no effect on the queueing behavior of the showToast: methods. + + @param position The toast's center point. Can be one of the predefined CSToastPosition + constants or a `CGPoint` wrapped in an `NSValue` object. + */ +- (void)makeToastActivity:(id)position; + +/** + Dismisses the active toast activity indicator view. + */ +- (void)hideToastActivity; + +/** + Displays any view as toast using the default duration and position. + + @param toast The view to be displayed as toast + */ +- (void)showToast:(UIView *)toast; + +/** + Displays any view as toast at a provided position and duration. The completion block + executes when the toast view completes. `didTap` will be `YES` if the toast view was + dismissed from a tap. + + @param toast The view to be displayed as toast + @param duration The notification duration + @param position The toast's center point. Can be one of the predefined CSToastPosition + constants or a `CGPoint` wrapped in an `NSValue` object. + @param completion The completion block, executed after the toast view disappears. + didTap will be `YES` if the toast view was dismissed from a tap. + */ +- (void)showToast:(UIView *)toast + duration:(NSTimeInterval)duration + position:(id)position + completion:(void(^)(BOOL didTap))completion; + +- (UIImageView *)addImageToastAnimationWithFrame:(CGRect)frame withImageName:(NSString *)imageName; + +@end + +/** + `CSToastStyle` instances define the look and feel for toast views created via the + `makeToast:` methods as well for toast views created directly with + `toastViewForMessage:title:image:style:`. + + @warning `CSToastStyle` offers relatively simple styling options for the default + toast view. If you require a toast view with more complex UI, it probably makes more + sense to create your own custom UIView subclass and present it with the `showToast:` + methods. + */ +@interface CSToastStyle : NSObject + +/** + The background color. Default is `[UIColor blackColor]` at 80% opacity. + */ +@property (strong, nonatomic) UIColor *backgroundColor; + +/** + The title color. Default is `[UIColor whiteColor]`. + */ +@property (strong, nonatomic) UIColor *titleColor; + +/** + The message color. Default is `[UIColor whiteColor]`. + */ +@property (strong, nonatomic) UIColor *messageColor; + +/** + A percentage value from 0.0 to 1.0, representing the maximum width of the toast + view relative to it's superview. Default is 0.8 (80% of the superview's width). + */ +@property (assign, nonatomic) CGFloat maxWidthPercentage; + +/** + A percentage value from 0.0 to 1.0, representing the maximum height of the toast + view relative to it's superview. Default is 0.8 (80% of the superview's height). + */ +@property (assign, nonatomic) CGFloat maxHeightPercentage; + +/** + The spacing from the horizontal edge of the toast view to the content. When an image + is present, this is also used as the padding between the image and the text. + Default is 10.0. + */ +@property (assign, nonatomic) CGFloat horizontalPadding; + +/** + The spacing from the vertical edge of the toast view to the content. When a title + is present, this is also used as the padding between the title and the message. + Default is 10.0. + */ +@property (assign, nonatomic) CGFloat verticalPadding; + +/** + The corner radius. Default is 10.0. + */ +@property (assign, nonatomic) CGFloat cornerRadius; + +/** + The title font. Default is `[UIFont boldSystemFontOfSize:16.0]`. + */ +@property (strong, nonatomic) UIFont *titleFont; + +/** + The message font. Default is `[UIFont systemFontOfSize:16.0]`. + */ +@property (strong, nonatomic) UIFont *messageFont; + +/** + The title text alignment. Default is `NSTextAlignmentLeft`. + */ +@property (assign, nonatomic) NSTextAlignment titleAlignment; + +/** + The message text alignment. Default is `NSTextAlignmentLeft`. + */ +@property (assign, nonatomic) NSTextAlignment messageAlignment; + +/** + The maximum number of lines for the title. The default is 0 (no limit). + */ +@property (assign, nonatomic) NSInteger titleNumberOfLines; + +/** + The maximum number of lines for the message. The default is 0 (no limit). + */ +@property (assign, nonatomic) NSInteger messageNumberOfLines; + +/** + Enable or disable a shadow on the toast view. Default is `NO`. + */ +@property (assign, nonatomic) BOOL displayShadow; + +/** + The shadow color. Default is `[UIColor blackColor]`. + */ +@property (strong, nonatomic) UIColor *shadowColor; + +/** + A value from 0.0 to 1.0, representing the opacity of the shadow. + Default is 0.8 (80% opacity). + */ +@property (assign, nonatomic) CGFloat shadowOpacity; + +/** + The shadow radius. Default is 6.0. + */ +@property (assign, nonatomic) CGFloat shadowRadius; + +/** + The shadow offset. The default is `CGSizeMake(4.0, 4.0)`. + */ +@property (assign, nonatomic) CGSize shadowOffset; + +/** + The image size. The default is `CGSizeMake(80.0, 80.0)`. + */ +@property (assign, nonatomic) CGSize imageSize; + +/** + The size of the toast activity view when `makeToastActivity:` is called. + Default is `CGSizeMake(100.0, 100.0)`. + */ +@property (assign, nonatomic) CGSize activitySize; + +/** + The fade in/out animation duration. Default is 0.2. + */ +@property (assign, nonatomic) NSTimeInterval fadeDuration; + +/** + Creates a new instance of `CSToastStyle` with all the default values set. + */ +- (instancetype)initWithDefaultStyle NS_DESIGNATED_INITIALIZER; + +/** + @warning Only the designated initializer should be used to create + an instance of `CSToastStyle`. + */ +- (instancetype)init NS_UNAVAILABLE; + +@end + +/** + `CSToastManager` provides general configuration options for all toast + notifications. Backed by a singleton instance. + */ +@interface CSToastManager : NSObject + +/** + Sets the shared style on the singleton. The shared style is used whenever + a `makeToast:` method (or `toastViewForMessage:title:image:style:`) is called + with with a nil style. By default, this is set to `CSToastStyle`'s default + style. + + @param sharedStyle the shared style + */ ++ (void)setSharedStyle:(CSToastStyle *)sharedStyle; + +/** + Gets the shared style from the singlton. By default, this is + `CSToastStyle`'s default style. + + @return the shared style + */ ++ (CSToastStyle *)sharedStyle; + +/** + Enables or disables tap to dismiss on toast views. Default is `YES`. + + @param tapToDismissEnabled YES or NO + */ ++ (void)setTapToDismissEnabled:(BOOL)tapToDismissEnabled; + +/** + Returns `YES` if tap to dismiss is enabled, otherwise `NO`. + Default is `YES`. + + @return BOOL YES or NO + */ ++ (BOOL)isTapToDismissEnabled; + +/** + Enables or disables queueing behavior for toast views. When `YES`, + toast views will appear one after the other. When `NO`, multiple Toast + views will appear at the same time (potentially overlapping depending + on their positions). This has no effect on the toast activity view, + which operates independently of normal toast views. Default is `YES`. + + @param queueEnabled YES or NO + */ ++ (void)setQueueEnabled:(BOOL)queueEnabled; + +/** + Returns `YES` if the queue is enabled, otherwise `NO`. + Default is `YES`. + + @return BOOL + */ ++ (BOOL)isQueueEnabled; + +/** + Sets the default duration. Used for the `makeToast:` and + `showToast:` methods that don't require an explicit duration. + Default is 3.0. + + @param duration The toast duration + */ ++ (void)setDefaultDuration:(NSTimeInterval)duration; + +/** + Returns the default duration. Default is 3.0. + + @return duration The toast duration +*/ ++ (NSTimeInterval)defaultDuration; + +/** + Sets the default position. Used for the `makeToast:` and + `showToast:` methods that don't require an explicit position. + Default is `CSToastPositionBottom`. + + @param position The default center point. Can be one of the predefined + CSToastPosition constants or a `CGPoint` wrapped in an `NSValue` object. + */ ++ (void)setDefaultPosition:(id)position; + +/** + Returns the default toast position. Default is `CSToastPositionBottom`. + + @return position The default center point. Will be one of the predefined + CSToastPosition constants or a `CGPoint` wrapped in an `NSValue` object. + */ ++ (id)defaultPosition; + +@end diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/UIView+Toast.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/UIView+Toast.h.meta new file mode 100644 index 0000000..88b161a --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/UIView+Toast.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 30c27d067912e4b5086051f2d1cd44c9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/UserModel.h b/Plugins/iOS/TapCommonSDK.framework/Headers/UserModel.h new file mode 100644 index 0000000..9ef6fa9 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/UserModel.h @@ -0,0 +1,22 @@ +// +// UserModel.h +// TDSCommon +// +// Created by TapTap-David on 2021/1/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface UserModel : NSObject +//用户id +@property (nonatomic, copy) NSString *user_id; +//用户名 +@property (nonatomic, copy) NSString *user_name; +//taptap 授权的open_id +@property (nonatomic, copy) NSString *taptap_open_id; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/UserModel.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/UserModel.h.meta new file mode 100644 index 0000000..1006338 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/UserModel.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4c7534e1a615e44389b94b454cb6bbf9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/WKCookieWebview+CookiesHandle.h b/Plugins/iOS/TapCommonSDK.framework/Headers/WKCookieWebview+CookiesHandle.h new file mode 100644 index 0000000..d6bc294 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/WKCookieWebview+CookiesHandle.h @@ -0,0 +1,21 @@ +// +// WKCookieWebview+CookiesHandle.h +// NativeApp +// +// Created by JiangJiahao on 2019/4/3. +// Copyright © 2019 JiangJiahao. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSWKCookieWebview (CookiesHandle) + +- (void)syncCookies:(NSURLRequest *)request task:(nullable NSURLSessionTask *)task complitionHandle:(void(^)(NSURLRequest *newRequest))complitionHandle; + +- (void)syncCookiesInJS:(nullable NSURLRequest *)request; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapCommonSDK.framework/Headers/WKCookieWebview+CookiesHandle.h.meta b/Plugins/iOS/TapCommonSDK.framework/Headers/WKCookieWebview+CookiesHandle.h.meta new file mode 100644 index 0000000..3f4ac88 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Headers/WKCookieWebview+CookiesHandle.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 36918d3b87edc49aea55a60c7ec62a84 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Info.plist b/Plugins/iOS/TapCommonSDK.framework/Info.plist new file mode 100644 index 0000000..bcbabb7 Binary files /dev/null and b/Plugins/iOS/TapCommonSDK.framework/Info.plist differ diff --git a/Plugins/iOS/TapCommonSDK.framework/Info.plist.meta b/Plugins/iOS/TapCommonSDK.framework/Info.plist.meta new file mode 100644 index 0000000..7bf7199 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Info.plist.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 60032c118d0ef491692fec1b9a81ca89 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Modules.meta b/Plugins/iOS/TapCommonSDK.framework/Modules.meta new file mode 100644 index 0000000..be865c5 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Modules.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f59aba8bf38294c9cbe2cfd88489ef41 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/Modules/module.modulemap b/Plugins/iOS/TapCommonSDK.framework/Modules/module.modulemap new file mode 100644 index 0000000..c250605 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module TapCommonSDK { + umbrella header "TapCommonSDK.h" + + export * + module * { export * } +} diff --git a/Plugins/iOS/TapCommonSDK.framework/Modules/module.modulemap.meta b/Plugins/iOS/TapCommonSDK.framework/Modules/module.modulemap.meta new file mode 100644 index 0000000..a063fb0 --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/Modules/module.modulemap.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9d1852caa2b8a4bf78107b50f99656ff +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapCommonSDK.framework/TapCommonSDK b/Plugins/iOS/TapCommonSDK.framework/TapCommonSDK new file mode 100644 index 0000000..7fb6052 Binary files /dev/null and b/Plugins/iOS/TapCommonSDK.framework/TapCommonSDK differ diff --git a/Plugins/iOS/TapCommonSDK.framework/TapCommonSDK.meta b/Plugins/iOS/TapCommonSDK.framework/TapCommonSDK.meta new file mode 100644 index 0000000..faf86eb --- /dev/null +++ b/Plugins/iOS/TapCommonSDK.framework/TapCommonSDK.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dbe8c2d74eca8448aa841700b7197754 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapTap.Common.deps.json b/Plugins/iOS/TapTap.Common.deps.json new file mode 100644 index 0000000..5091e20 --- /dev/null +++ b/Plugins/iOS/TapTap.Common.deps.json @@ -0,0 +1,75 @@ +{ + "runtimeTarget": { + "name": ".NETStandard,Version=v2.0/", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETStandard,Version=v2.0": {}, + ".NETStandard,Version=v2.0/": { + "TapTap.Common/1.0.0": { + "dependencies": { + "NETStandard.Library": "2.0.3", + "UnityEditor": "0.0.0.0", + "UnityEngine": "0.0.0.0" + }, + "runtime": { + "TapTap.Common.dll": {} + } + }, + "Microsoft.NETCore.Platforms/1.1.0": {}, + "NETStandard.Library/2.0.3": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0" + } + }, + "UnityEditor/0.0.0.0": { + "runtime": { + "UnityEditor.dll": { + "assemblyVersion": "0.0.0.0", + "fileVersion": "0.0.0.0" + } + } + }, + "UnityEngine/0.0.0.0": { + "runtime": { + "UnityEngine.dll": { + "assemblyVersion": "0.0.0.0", + "fileVersion": "0.0.0.0" + } + } + } + } + }, + "libraries": { + "TapTap.Common/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "path": "microsoft.netcore.platforms/1.1.0", + "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" + }, + "NETStandard.Library/2.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", + "path": "netstandard.library/2.0.3", + "hashPath": "netstandard.library.2.0.3.nupkg.sha512" + }, + "UnityEditor/0.0.0.0": { + "type": "reference", + "serviceable": false, + "sha512": "" + }, + "UnityEngine/0.0.0.0": { + "type": "reference", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/Plugins/iOS/TapTap.Common.deps.json.meta b/Plugins/iOS/TapTap.Common.deps.json.meta new file mode 100644 index 0000000..73b4749 --- /dev/null +++ b/Plugins/iOS/TapTap.Common.deps.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: aea2d56a4a4ee4ae4a50936ba813b553 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapTap.Common.dll b/Plugins/iOS/TapTap.Common.dll new file mode 100644 index 0000000..4858dca Binary files /dev/null and b/Plugins/iOS/TapTap.Common.dll differ diff --git a/Plugins/iOS/TapTap.Common.dll.meta b/Plugins/iOS/TapTap.Common.dll.meta new file mode 100644 index 0000000..b86dfd4 --- /dev/null +++ b/Plugins/iOS/TapTap.Common.dll.meta @@ -0,0 +1,86 @@ +fileFormatVersion: 2 +guid: fda5d2bc4d10048cd9ab996be55fcc04 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 0 + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 1 + settings: + AddToEmbeddedBinaries: false + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapTap.Common.pdb b/Plugins/iOS/TapTap.Common.pdb new file mode 100644 index 0000000..7c5e62f Binary files /dev/null and b/Plugins/iOS/TapTap.Common.pdb differ diff --git a/Plugins/iOS/TapTap.Common.pdb.meta b/Plugins/iOS/TapTap.Common.pdb.meta new file mode 100644 index 0000000..dfa5736 --- /dev/null +++ b/Plugins/iOS/TapTap.Common.pdb.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7bb35410472d24678a797fca487c5356 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/README.md b/README.md new file mode 100644 index 0000000..eb2dfb0 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +## [TapTap.Common](./Documentation/README.md) \ No newline at end of file diff --git a/README.md.meta b/README.md.meta new file mode 100644 index 0000000..1efb54d --- /dev/null +++ b/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 89f5ee69b81f54617b295e119ceb2f32 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VERSIONNOTE.md b/VERSIONNOTE.md new file mode 100644 index 0000000..2bba235 --- /dev/null +++ b/VERSIONNOTE.md @@ -0,0 +1,2 @@ +### Optimization and fixed bugs +- 支持性更新 \ No newline at end of file diff --git a/VERSIONNOTE.md.meta b/VERSIONNOTE.md.meta new file mode 100644 index 0000000..c0e111d --- /dev/null +++ b/VERSIONNOTE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8f641ea9398ec4290be0e2a577551514 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/package.json b/package.json new file mode 100644 index 0000000..275f334 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "com.taptap.tds.common", + "displayName": "TapTap Common", + "description": "TapTap Develop Service", + "version": "3.5.0", + "unity": "2018.3", + "license": "MIT" +} \ No newline at end of file diff --git a/package.json.meta b/package.json.meta new file mode 100644 index 0000000..6a84ce1 --- /dev/null +++ b/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 863b7a574870c4ea29a8c63b01b1b63b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: