diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..2e9f11d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,133 @@ +# ChangeLog + +## 3.6.0 + +### Dependencies + +- TapTap.Common v3.6.0 + +## 3.5.0 + +### Dependencies + +- TapTap.Common v3.5.0 + +## 3.4.0 + +### Dependencies + +- TapTap.Common v3.4.0 + +## 3.3.0 + +### Optimization and fixed bugs + +- iOS 统一关闭逻辑,避免出现内存泄漏和音视频频不关闭的 bug +- iOS 在调用 TapDB 相关接口前确认可用性,避免因版本不一致导致无响应崩溃 + +### Dependencies + +- TapTap.Common v3.3.0 + +## 3.2.0 + +### Optimization and fixed bugs +- 修复动态内登录后没有回调的问题 +- iOS 优化动态多次打开后的内存占用 + +### Dependencies + +- TapTap.Common v3.2.0 + +## 3.1.0 + +### Optimization and fixed bugs +- 修复在 Android 11 的设备上没有特定权限时打开动态会崩溃的问题 + +### Dependencies + +- TapTap.Common v3.1.0 + +## 3.0.0 + +### Dependencies + +- TapTap.Common v3.0.0 + +## 2.1.7 + +### Dependencies + +- TapTap.Common v2.1.7 + +## 2.1.6 + +### Optimization and fixed bugs + +- 修复调用 [TapMoment close] 不生效的 bug + +### Dependencies + +- TapTap.Common v2.1.6 + +## 2.1.5 + +### New Feature + +- 新增场景化回调接口 + + ``` + //场景化回调是在动态回调的统一接口中返回,Code = 70000,内容为 JSON 格式的字符串 + { + sceneId: "taprl0071417002", + eventType: "READY", + eventPayload: "{}", + timestamp: 1622791814130, // ms + } + ``` + +## 2.1.4 + +### Dependencies + +- TapTap.Common v2.1.4 + +## 2.1.3 + +### BugFixs + +- Android 在部分刘海屏设备上判断失败导致UI可能被遮挡的问题 + +### Dependencies + +- TapTap.Common v2.1.3 + +## 2.1.2 + +### Dependencies + +- TapTap.Common v2.1.2 + +## 2.1.1 + +### Feature + +* 新增 DirectlyOpen 接口 + * 场景化入口 + ```c# + var sceneDic = new Dictionary(){{TapMomentConstants.TapMomentPageShortCutKey,sceneId}}; + + TapMoment.DirectlyOpen(orientation,TapMomentConstants.TapMomentPageShortCut,sceneDic); + ``` + +### Dependencies + +* TapTap.Bootstrap v2.1.1 +* TapTap.Common v2.1.1 + +## 2.0.0 + +### Dependencies + +* TapTap.Bootstrap v2.0.0 +* TapTap.Common v2.0.0 diff --git a/CHANGELOG.md.meta b/CHANGELOG.md.meta new file mode 100644 index 0000000..d23273c --- /dev/null +++ b/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0bb9d668200924ece935b2a15e589534 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Documentation.meta b/Documentation.meta new file mode 100644 index 0000000..e98e687 --- /dev/null +++ b/Documentation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dc91cfe46d1ba44048dc7075a20accfd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Documentation/README.md b/Documentation/README.md new file mode 100644 index 0000000..4a31967 --- /dev/null +++ b/Documentation/README.md @@ -0,0 +1,53 @@ +## TapTap.Moment + +## 使用前提 + +使用 TapTap.Moment 前提是必须依赖以下库: +* [TapTap.Bootstrap](https://github.com/TapTap/TapBootstrap-Unity.git) +* [TapTap.Common](https://github.com/TapTap/TapCommon-Unity.git) + +## 命名空间 + +```c# +using TapTap.Moment; +``` + +## 接口描述 + +### 设置回调 + +```c# +TapMoment.SetCallback(Action action); +``` + +### 打开动态 + +```c# +TapMoment.Open(Orientation orientation); +``` + +### 发布动态 + +```c# +TapMoment.Publish(Orientation orientation, string[] imagePaths, string content); +``` + +### 关闭动态 + +```c# +TapMoment.Close(); +``` + +### 获取更新消息 +```c# +TapMoment.FetchNotification(); +``` + +### 打开特定页面 + +#### 场景化入口 +```c# +var sceneDic = new Dictionary(){{TapMomentConstants.TapMomentPageShortCutKey,sceneId}}; + +TapMoment.DirectlyOpen(orientation,TapMomentConstants.TapMomentPageShortCut,sceneDic); +``` \ No newline at end of file diff --git a/Documentation/README.md.meta b/Documentation/README.md.meta new file mode 100644 index 0000000..6c27318 --- /dev/null +++ b/Documentation/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6c89abf0f11724b748ee36fd26362ccc +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor.meta b/Editor.meta new file mode 100644 index 0000000..fe82508 --- /dev/null +++ b/Editor.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8d0f31c5d9164ae4a7f5305c9d6dd5a9 +timeCreated: 1617120910 \ No newline at end of file diff --git a/Editor/TapMomentIOSProcessor.cs b/Editor/TapMomentIOSProcessor.cs new file mode 100644 index 0000000..f3dea80 --- /dev/null +++ b/Editor/TapMomentIOSProcessor.cs @@ -0,0 +1,49 @@ +using TapTap.Common.Editor; +using UnityEditor; +using UnityEditor.Callbacks; +using UnityEngine; + +namespace TapTap.Moment.Editor +{ +#if UNITY_IOS + public static class TapMomentIOSProcessor + { + [PostProcessBuild(101)] + 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.AddFrameworkToProject(unityFrameworkTarget, "AVFoundation.framework", false); + proj.AddFrameworkToProject(unityFrameworkTarget, "CoreTelephony.framework", false); + proj.AddFrameworkToProject(unityFrameworkTarget, "MobileCoreServices.framework", false); + proj.AddFrameworkToProject(unityFrameworkTarget, "Photos.framework", false); + proj.AddFrameworkToProject(unityFrameworkTarget, "SystemConfiguration.framework", false); + proj.AddFrameworkToProject(unityFrameworkTarget, "WebKit.framework", false); + + if (TapCommonCompile.HandlerIOSSetting(path, + Application.dataPath, + "TapMomentResource", + "com.taptap.tds.moment", + "Moment", + new[] {"TapMomentResource.bundle"}, + target, projPath, proj)) + { + Debug.Log("TapMoment add Bundle Success!"); + return; + } + + Debug.LogError("TapMoment add Bundle Failed!"); + } + } +#endif +} \ No newline at end of file diff --git a/Editor/TapMomentIOSProcessor.cs.meta b/Editor/TapMomentIOSProcessor.cs.meta new file mode 100644 index 0000000..7cde841 --- /dev/null +++ b/Editor/TapMomentIOSProcessor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5be15bb2565646c8807af4744e13dee7 +timeCreated: 1617120911 \ No newline at end of file diff --git a/Editor/TapTap.Moment.Editor.asmdef b/Editor/TapTap.Moment.Editor.asmdef new file mode 100644 index 0000000..f947ad1 --- /dev/null +++ b/Editor/TapTap.Moment.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "TapTap.Moment.Editor", + "references": [ + "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.Moment.Editor.asmdef.meta b/Editor/TapTap.Moment.Editor.asmdef.meta new file mode 100644 index 0000000..bb3e8f8 --- /dev/null +++ b/Editor/TapTap.Moment.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5c705d9a5f6474adb9717a2bee94a30b +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins.meta b/Plugins.meta new file mode 100644 index 0000000..936adda --- /dev/null +++ b/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 072bb12a464cc47a6823ed125dd633f3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Android.meta b/Plugins/Android.meta new file mode 100644 index 0000000..71db1d3 --- /dev/null +++ b/Plugins/Android.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 61dbcf2f493ab4a2595b122d03740271 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Android/libs.meta b/Plugins/Android/libs.meta new file mode 100644 index 0000000..bf0b94e --- /dev/null +++ b/Plugins/Android/libs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c11b59c16b2e49ab98a2bb81fa25517 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Android/libs/TapMoment_3.6.0.aar b/Plugins/Android/libs/TapMoment_3.6.0.aar new file mode 100644 index 0000000..0d54ac3 Binary files /dev/null and b/Plugins/Android/libs/TapMoment_3.6.0.aar differ diff --git a/Plugins/Android/libs/TapMoment_3.6.0.aar.meta b/Plugins/Android/libs/TapMoment_3.6.0.aar.meta new file mode 100644 index 0000000..257f30b --- /dev/null +++ b/Plugins/Android/libs/TapMoment_3.6.0.aar.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: f807316db61524d69b910a3af7cf8528 +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.Moment.dll b/Plugins/TapTap.Moment.dll new file mode 100644 index 0000000..d6bad0e Binary files /dev/null and b/Plugins/TapTap.Moment.dll differ diff --git a/Plugins/TapTap.Moment.dll.meta b/Plugins/TapTap.Moment.dll.meta new file mode 100644 index 0000000..835d606 --- /dev/null +++ b/Plugins/TapTap.Moment.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: dfeaefe66e5454e1f8109db3f4a92394 +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 + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/TapTap.Moment.pdb b/Plugins/TapTap.Moment.pdb new file mode 100644 index 0000000..1ec3461 Binary files /dev/null and b/Plugins/TapTap.Moment.pdb differ diff --git a/Plugins/TapTap.Moment.pdb.meta b/Plugins/TapTap.Moment.pdb.meta new file mode 100644 index 0000000..c75598b --- /dev/null +++ b/Plugins/TapTap.Moment.pdb.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b66af1c63003448e68576104682aa002 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS.meta b/Plugins/iOS.meta new file mode 100644 index 0000000..3565f44 --- /dev/null +++ b/Plugins/iOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4c5ef2d6a4f3041758dd76978171fd20 +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..3c3e727 --- /dev/null +++ b/Plugins/iOS/Resource.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7d9818b5ab7ff406e9a84bc779a0f5e0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle.meta b/Plugins/iOS/Resource/TapMomentResource.bundle.meta new file mode 100644 index 0000000..3cba0ae --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 5899d07a154a24f77be7e775b6fbb7c7 +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/TapMomentResource.bundle/TapMomentLanguage.json b/Plugins/iOS/Resource/TapMomentResource.bundle/TapMomentLanguage.json new file mode 100644 index 0000000..2380222 --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/TapMomentLanguage.json @@ -0,0 +1,40 @@ +{ + "zh_hans":{ + "save_image":"保存图片", + "access_file_permission":"访问文件请求", + "save_image_hint":"开启后才能保存图片", + "dialog_title":"提示", + "dialog_content":"匹配成功,进入游戏", + "dialog_confirm":"确认", + "dialog_cancel":"取消", + "cancel_bind":"取消绑定", + "save_success":"保存成功", + "save_fail":"保存失败", + "login_cancel":"取消登录", + "access_album_permission":"访问相册请求", + "upload_hit":"开启后才能上传图片视频", + "to_open":"去开启", + "need_camera_permission":"开启相机权限", + "camera_hint":"需要开启相机权限,是否开启?", + "load_fail_hint":"数据加载失败,点击重试" + }, + "en":{ + "save_image":"Save Image", + "access_file_permission":"Access to Files", + "save_image_hint":"Allow access to save images.", + "dialog_title":"Tips", + "dialog_content":"Entering game.", + "dialog_confirm":"Confirm", + "dialog_cancel":"Cancel", + "cancel_bind":"Cancel Linking", + "save_success":"Saved", + "save_fail":"Saving Failed", + "login_cancel":"Cancel Login", + "access_album_permission":"Access to Album", + "upload_hit":"Allow access to save images.", + "to_open":"Go to Allow", + "need_camera_permission":"Access to Camera", + "camera_hint":"Allow access to the camera?", + "load_fail_hint":"Loading failed. Try again." + } +} diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/TapMomentLanguage.json.meta b/Plugins/iOS/Resource/TapMomentResource.bundle/TapMomentLanguage.json.meta new file mode 100644 index 0000000..5c467c0 --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/TapMomentLanguage.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5e1d23792698244089b9d062f8d96f5e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images.meta b/Plugins/iOS/Resource/TapMomentResource.bundle/images.meta new file mode 100644 index 0000000..963490d --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/images.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9fd1edc8a03a44b1e86a7a922161557a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_alert_close@3x.png b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_alert_close@3x.png new file mode 100644 index 0000000..bf7dad5 Binary files /dev/null and b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_alert_close@3x.png differ diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_alert_close@3x.png.meta b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_alert_close@3x.png.meta new file mode 100644 index 0000000..62f592b --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_alert_close@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1b06d06bcadca43938abdaec1ee1e377 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_button@3x.png b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_button@3x.png new file mode 100644 index 0000000..7ff6c03 Binary files /dev/null and b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_button@3x.png differ diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_button@3x.png.meta b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_button@3x.png.meta new file mode 100644 index 0000000..326cbba --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_button@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 76e4b1114b8e04d42be9c3c26781e9eb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_download@3x.png b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_download@3x.png new file mode 100644 index 0000000..622f855 Binary files /dev/null and b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_download@3x.png differ diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_download@3x.png.meta b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_download@3x.png.meta new file mode 100644 index 0000000..e499c57 --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_download@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d9df25c03a54a4c20b927a36342756a7 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_airplan@3x.png b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_airplan@3x.png new file mode 100644 index 0000000..3fc6104 Binary files /dev/null and b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_airplan@3x.png differ diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_airplan@3x.png.meta b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_airplan@3x.png.meta new file mode 100644 index 0000000..ea8e3a6 --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_airplan@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 03edea809efa743f895dc89777622d21 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_bg@3x.png b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_bg@3x.png new file mode 100644 index 0000000..2e9cf7b Binary files /dev/null and b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_bg@3x.png differ diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_bg@3x.png.meta b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_bg@3x.png.meta new file mode 100644 index 0000000..13c3025 --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_bg@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a76525ec71a9d4fd7beba8769aedb1b0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_reload@3x.png b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_reload@3x.png new file mode 100644 index 0000000..13fa7ac Binary files /dev/null and b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_reload@3x.png differ diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_reload@3x.png.meta b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_reload@3x.png.meta new file mode 100644 index 0000000..e45c0b2 --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_reload@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 45083438064054c1996ac62d25ceef50 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_wifi@3x.png b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_wifi@3x.png new file mode 100644 index 0000000..c516486 Binary files /dev/null and b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_wifi@3x.png differ diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_wifi@3x.png.meta b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_wifi@3x.png.meta new file mode 100644 index 0000000..22bbde6 --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_net_error_wifi@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 84d20dbddc2434e5081bdd8180b9f5be +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_poptip_close@3x.png b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_poptip_close@3x.png new file mode 100644 index 0000000..439588b Binary files /dev/null and b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_poptip_close@3x.png differ diff --git a/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_poptip_close@3x.png.meta b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_poptip_close@3x.png.meta new file mode 100644 index 0000000..a55ca08 --- /dev/null +++ b/Plugins/iOS/Resource/TapMomentResource.bundle/images/tap_moment_poptip_close@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 009614d8b8e3f46a58ef75358d466415 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework.meta b/Plugins/iOS/TapMomentSDK.framework.meta new file mode 100644 index 0000000..77f6f42 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework.meta @@ -0,0 +1,28 @@ +fileFormatVersion: 2 +guid: 8c2da91c17a0d48e386cc8bf94ac7677 +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/TapMomentSDK.framework/Headers.meta b/Plugins/iOS/TapMomentSDK.framework/Headers.meta new file mode 100644 index 0000000..d766917 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d758a35551454341bf3388aab8d9521 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMoment.h b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMoment.h new file mode 100755 index 0000000..6dfbd67 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMoment.h @@ -0,0 +1,92 @@ +// +// TapTapForum.h +// TapTapSDK +// +// Created by JiangJiahao on 2019/11/21. +// Copyright © 2019 taptap. All rights reserved. +// + +#import +#import +#import +#import +#import + +#define TapMomentSDK @"TapMoment" +#define TapMomentSDK_VERSION_NUMBER @"30600001" +#define TapMomentSDK_VERSION @"3.6.0" + +NS_ASSUME_NONNULL_BEGIN + +/** + v1.2.0 + */ + +FOUNDATION_EXPORT NSString *const TapMomentPageShortcut; +FOUNDATION_EXPORT NSString *const TapMomentPageShortcutKey; + +FOUNDATION_EXPORT NSString *const TapMomentPageUser; +FOUNDATION_EXPORT NSString *const TapMomentPageUserKey; +# pragma mark SDK 公开方法 +@interface TapMoment : NSObject + ++ (instancetype)new NS_UNAVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; + +/// 初始化 +/// @param clientId clienId +/// 默认国内 ++ (void)initWithClientId:(NSString *)clientId; + +/// 初始化 +/// @param clientId clientId +/// @param isCN 是否国内 ++ (void)initWithClientId:(NSString *)clientId isCN:(BOOL)isCN; + +/// 设置代理 +/// @param delegate 代理 ++ (void)setDelegate:(id )delegate; + +/// 打开动态 +/// @param config TapMomentConfig ++ (void)open:(TapMomentConfig *)config; + +/// 打开特定页面 +/// @param config TapMomentConfig +/// @param page page link +/// @param extras extra parameters ++ (void)directlyOpen:(TapMomentConfig *)config page:(NSString *)page extras:(NSDictionary *)extras; + +/// 发布动态 +/// @param content 发布的动态内容 +/// @param config 配置 +/// @warning `moment`参数:动态内容为视频请选择`TapMomentVideoData`, 动态内容为图片时请选择 `TapMomentImageData`。 ++ (void)publish:(TapMomentConfig *_Nonnull)config + content:(TapMomentPostData *_Nonnull)content; + +/// 关闭所有内嵌窗口 +/// @param title 弹窗标题 +/// @param content 弹窗内容 +/// @param showConfirm 是否显示确认弹窗 +/// @warning 传空或者空串不弹框 ++ (void)closeWithTitle:(NSString *)title + content:(NSString *)content + showConfirm:(BOOL)showConfirm; + +/// 直接关闭所有内嵌窗口 +/// @warning 该方法不弹二次确认窗口 ++ (void)close; + +/// 获取新动态数量 +/// @warning 结果在 `Delegate` 下的 `onMomentCallbackWithCode:msg:`, code == TM_RESULT_CODE_NEW_MSG_SUCCEED时,`msg` 即为消息数量 ++ (void)fetchNotification; + +/// 获取SDK版本名 ++ (NSString *)getSdkVersion; + +/// 获取SDK版本号 ++ (NSString *)getSdkVersionCode; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMoment.h.meta b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMoment.h.meta new file mode 100644 index 0000000..c922a2a --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMoment.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9eae93cf8fcfa460ea649066a176f89b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentConfig.h b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentConfig.h new file mode 100644 index 0000000..e2c9d75 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentConfig.h @@ -0,0 +1,23 @@ +// +// TapMomentConfig.h +// TapMomentSDK +// +// Created by Bottle K on 2021/3/26. +// + +#import + +typedef NS_ENUM (NSInteger, TapMomentOrientation) { + TapMomentOrientationDefault = -1, + TapMomentOrientationLandscape = 0, + TapMomentOrientationPortrait = 1, +}; +NS_ASSUME_NONNULL_BEGIN + +@interface TapMomentConfig : NSObject +@property (nonatomic, assign) TapMomentOrientation orientation; + ++ (TapMomentConfig *)createWithOrientation:(TapMomentOrientation)orientation; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentConfig.h.meta b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentConfig.h.meta new file mode 100644 index 0000000..c8c7794 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentConfig.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eaf9e60cabe244f51864444c4e323683 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentDelegate.h b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentDelegate.h new file mode 100644 index 0000000..d963222 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentDelegate.h @@ -0,0 +1,17 @@ +// +// TapMomentDelegate.h +// TapMomentSDK +// +// Created by Bottle K on 2021/3/26. +// +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol TapMomentDelegate + +- (void)onMomentCallbackWithCode:(NSInteger)code msg:(NSString *)msg; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentDelegate.h.meta b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentDelegate.h.meta new file mode 100644 index 0000000..e342cdb --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentDelegate.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b396e336e2d194089943c453a6299c1e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentPostData.h b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentPostData.h new file mode 100644 index 0000000..1370ccf --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentPostData.h @@ -0,0 +1,71 @@ +// +// PostMomentData.h +// TapMoment +// +// Created by ritchie on 2020/7/21. +// Copyright © 2020 TapTap. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** +@brief 发布动态数据基类 +@warning 使用子类进行初始化!!!!!!! +*/ +@interface TapMomentPostData : NSObject +@end + + +/** +视频 Moment 结构 +*/ +@interface TapMomentVideoData : TapMomentPostData + +/** + @brief 图片本地路径(可选) + @warning 数组最多可存一个,超出部分截选第一个 + */ +@property (nonatomic, copy, nullable) NSArray *images; + +/** +@brief 视频本地路径(可选) +@warning 数组最多可存一个,超出部分截选第一个 +*/ +@property (nonatomic, copy, nullable) NSArray *videos; + +/** +@brief 标题(可选) +@warning 文字长度限制为40,超过40取前40 +*/ +@property (nonatomic, copy, nullable) NSString *title; + +/** +@brief 文字内容(可选) +@warning 文字长度限制为40,超过40取前40 +*/ +@property (nonatomic, copy, nullable) NSString *content; +@end + + + +/** + 普通 Moment 结构 + */ +@interface TapMomentImageData : TapMomentPostData + +/** +@brief 图片本地路径(可选) +@warning 数组最多可存一个,超出部分截选第一个 +*/ +@property (nonatomic, copy, nullable) NSArray *images; + +/** +@brief 文字内容(可选) +@warning 文字长度限制为1200,超过1200取前1200 +*/ +@property (nonatomic, copy, nullable) NSString *content; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentPostData.h.meta b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentPostData.h.meta new file mode 100644 index 0000000..55c785c --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentPostData.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 894704d96594449dfb65b3f11dff240f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentResultCode.h b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentResultCode.h new file mode 100644 index 0000000..df14fe6 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentResultCode.h @@ -0,0 +1,44 @@ +// +// TapMomentResultCode.h +// TapMoment +// +// Created by ritchie on 2020/7/27. +// Copyright © 2020 JiangJiahao. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +/// 动态发布成功 +FOUNDATION_EXTERN int const TM_RESULT_CODE_POST_SUCCEED; +/// 动态发布失败 +FOUNDATION_EXTERN int const TM_RESULT_CODE_POST_FAILED; +/// 关闭动态发布页面 +FOUNDATION_EXTERN int const TM_RESULT_CODE_POST_CLOSED; + + +/// 获取新消息成功 +FOUNDATION_EXTERN int const TM_RESULT_CODE_NEW_MSG_SUCCEED; +/// 获取新消息失败 +FOUNDATION_EXTERN int const TM_RESULT_CODE_NEW_MSG_FAILED; + +/// 好友动态页面打开 +FOUNDATION_EXTERN int const TM_RESULT_CODE_MOMENT_PAGE_OPEBED; +/// 好友动态页面关闭 +FOUNDATION_EXTERN int const TM_RESULT_CODE_MOMENT_PAGE_CLOSED; + +/// 取消关闭所有动态界面(弹框点击取消按钮) +FOUNDATION_EXTERN int const TM_RESULT_CODE_MOMENT_CLOSE_CANCELLED; +/// 确认关闭所有动态界面(弹框点击确认按钮) +FOUNDATION_EXTERN int const TM_RESULT_CODE_MOMENT_CLOSE_CONFIRMED; + +/// 内嵌登录成功 +FOUNDATION_EXTERN int const TM_RESULT_CODE_MOMENT_LOGIN_SUCCEED; + +/// 内嵌动态场景化事件 +FOUNDATION_EXTERN int const TM_RESULT_CODE_MOMENT_SCENE_EVENT; + + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentResultCode.h.meta b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentResultCode.h.meta new file mode 100644 index 0000000..19c4c46 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentResultCode.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 950fb73ed034c4cb0a0cf4e6ccb4e309 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentSDK.h b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentSDK.h new file mode 100644 index 0000000..8a58f36 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentSDK.h @@ -0,0 +1,22 @@ +// +// TapMomentSDK.h +// TapMomentSDK +// +// Created by Bottle K on 2021/3/25. +// + +#import + +//! Project version number for TapMomentSDK. +FOUNDATION_EXPORT double TapMomentSDKVersionNumber; + +//! Project version string for TapMomentSDK. +FOUNDATION_EXPORT const unsigned char TapMomentSDKVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import +#import +#import diff --git a/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentSDK.h.meta b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentSDK.h.meta new file mode 100644 index 0000000..086b234 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Headers/TapMomentSDK.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 276e8a6932499486fae950fb8da98b84 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework/Info.plist b/Plugins/iOS/TapMomentSDK.framework/Info.plist new file mode 100644 index 0000000..afbb64e Binary files /dev/null and b/Plugins/iOS/TapMomentSDK.framework/Info.plist differ diff --git a/Plugins/iOS/TapMomentSDK.framework/Info.plist.meta b/Plugins/iOS/TapMomentSDK.framework/Info.plist.meta new file mode 100644 index 0000000..5e7dec7 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Info.plist.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: baba14684f3234a42afee838bcab627e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework/Modules.meta b/Plugins/iOS/TapMomentSDK.framework/Modules.meta new file mode 100644 index 0000000..d20f127 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Modules.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 74bb76efc3cb045ca94d7100496ca38d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework/Modules/module.modulemap b/Plugins/iOS/TapMomentSDK.framework/Modules/module.modulemap new file mode 100644 index 0000000..ce8d137 --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module TapMomentSDK { + umbrella header "TapMomentSDK.h" + + export * + module * { export * } +} diff --git a/Plugins/iOS/TapMomentSDK.framework/Modules/module.modulemap.meta b/Plugins/iOS/TapMomentSDK.framework/Modules/module.modulemap.meta new file mode 100644 index 0000000..fc0682d --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/Modules/module.modulemap.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3c80293b104b64eaa97ba0f56b452dd2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapMomentSDK.framework/TapMomentSDK b/Plugins/iOS/TapMomentSDK.framework/TapMomentSDK new file mode 100644 index 0000000..8b8a4fa Binary files /dev/null and b/Plugins/iOS/TapMomentSDK.framework/TapMomentSDK differ diff --git a/Plugins/iOS/TapMomentSDK.framework/TapMomentSDK.meta b/Plugins/iOS/TapMomentSDK.framework/TapMomentSDK.meta new file mode 100644 index 0000000..876575f --- /dev/null +++ b/Plugins/iOS/TapMomentSDK.framework/TapMomentSDK.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 52bed35fe24454088b988760934cd86a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/README.md b/README.md new file mode 100644 index 0000000..9c447d0 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +## [TapTap.Moment](./Documentation/README.md) + +## 使用前提 + +使用 TapTap.Moment 前提是必须依赖以下库: +* [TapTap.Bootstrap](https://github.com/TapTap/TapBootstrap-Unity.git) +* [TapTap.Common](https://github.com/TapTap/TapCommon-Unity.git) + +## 命名空间 + +```c# +using TapTap.Moment; +``` + +## 接口描述 + +### 设置回调 + +```c# +TapMoment.SetCallback(Action action); +``` + +### 打开动态 + +```c# +TapMoment.Open(Orientation orientation); +``` + +### 发布动态 + +```c# +TapMoment.Publish(Orientation orientation, string[] imagePaths, string content); +``` + +### 关闭动态 + +```c# +TapMoment.Close(); +``` + +### 获取更新消息 +```c# +TapMoment.FetchNotification(); +``` + +### 打开特定页面 + +#### 场景化入口 +```c# +var sceneDic = new Dictionary(){{TapMomentConstants.TapMomentPageShortCutKey,sceneId}}; + +TapMoment.DirectlyOpen(orientation,TapMomentConstants.TapMomentPageShortCut,sceneDic); +``` \ No newline at end of file diff --git a/README.md.meta b/README.md.meta new file mode 100644 index 0000000..cc2ffc3 --- /dev/null +++ b/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ff261ddbfe8564243bef390d79f6a950 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VERSIONNOTE.md b/VERSIONNOTE.md new file mode 100644 index 0000000..93d666c --- /dev/null +++ b/VERSIONNOTE.md @@ -0,0 +1,3 @@ +### Dependencies + +- TapTap.Common v3.6.0 \ No newline at end of file diff --git a/VERSIONNOTE.md.meta b/VERSIONNOTE.md.meta new file mode 100644 index 0000000..91cf01a --- /dev/null +++ b/VERSIONNOTE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: afcfb461c4d02435a8fd7c26c4c0b4ea +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/package.json b/package.json new file mode 100644 index 0000000..7cc1a09 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "com.taptap.tds.moment", + "displayName": "TapTap Moment", + "description": "TapTap Develop Service", + "version": "3.6.0", + "unity": "2018.3", + "license": "MIT", + "dependencies": { + "com.taptap.tds.common": "https://github.com/TapTap/TapCommon-Unity.git#3.6.0" + } +} \ No newline at end of file diff --git a/package.json.meta b/package.json.meta new file mode 100644 index 0000000..f15d836 --- /dev/null +++ b/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 83c9287f297b648248e2528e9a783dd5 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: