com.taptap.sdk.core 4.8.4-beta.0 → 4.8.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -95,7 +95,7 @@ namespace TapSDK.Core.Editor
95
95
 
96
96
  public static bool HandlerIOSSetting(string path, string appDataPath, string resourceName,
97
97
  string modulePackageName,
98
- string moduleName, string[] bundleNames, string target, string projPath, PBXProject proj, string podSpecName = "")
98
+ string moduleName, string[] bundleNames, string target, string projPath, PBXProject proj)
99
99
  {
100
100
 
101
101
  var resourcePath = Path.Combine(path, resourceName);
@@ -109,11 +109,11 @@ namespace TapSDK.Core.Editor
109
109
  Directory.Delete(resourcePath, true);
110
110
  }
111
111
 
112
- var podSpecPath = Path.Combine(path + "/Pods", podSpecName);
112
+ var podSpecPath = Path.Combine(path + "/Pods", "TapTapSDK");
113
113
  //使用 cocospod 远程依赖
114
- if (podSpecName != null && podSpecName.Length > 0 && Directory.Exists(podSpecPath))
114
+ if (Directory.Exists(podSpecPath))
115
115
  {
116
- resourcePath = Path.Combine(path + "/Pods", podSpecName + "/Frameworks");
116
+ resourcePath = Path.Combine(path + "/Pods", "TapTapSDK/Frameworks");
117
117
  UnityEngine.Debug.Log($"Find {moduleName} use pods resourcePath:{resourcePath}");
118
118
  }
119
119
  else
@@ -34,12 +34,12 @@ namespace TapSDK.Core.Editor
34
34
  // proj.AddBuildProperty(unityFrameworkTarget, "OTHER_LDFLAGS", "-ObjC");
35
35
 
36
36
  proj.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
37
- // proj.SetBuildProperty(target, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "YES");
37
+ proj.SetBuildProperty(target, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "YES");
38
38
  proj.SetBuildProperty(target, "SWIFT_VERSION", "5.0");
39
39
  proj.SetBuildProperty(target, "CLANG_ENABLE_MODULES", "YES");
40
40
 
41
41
  proj.SetBuildProperty(unityFrameworkTarget, "ENABLE_BITCODE", "NO");
42
- // proj.SetBuildProperty(unityFrameworkTarget, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "YES");
42
+ proj.SetBuildProperty(unityFrameworkTarget, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "YES");
43
43
  proj.SetBuildProperty(unityFrameworkTarget, "BUILD_LIBRARY_FOR_DISTRIBUTION", "YES");
44
44
 
45
45
  proj.SetBuildProperty(unityFrameworkTarget, "SWIFT_VERSION", "5.0");
@@ -50,7 +50,6 @@ namespace TapSDK.Core.Editor
50
50
  proj.AddFrameworkToProject(unityFrameworkTarget, "Security.framework", false);
51
51
  proj.AddFrameworkToProject(unityFrameworkTarget, "SystemConfiguration.framework", false);
52
52
  proj.AddFrameworkToProject(unityFrameworkTarget, "CoreTelephony.framework", false);
53
- proj.AddFrameworkToProject(unityFrameworkTarget, "SystemConfiguration.framework", false);
54
53
 
55
54
  proj.AddFileToBuild(unityFrameworkTarget,
56
55
  proj.AddFile("usr/lib/libc++.tbd", "libc++.tbd", PBXSourceTree.Sdk));
@@ -59,7 +58,6 @@ namespace TapSDK.Core.Editor
59
58
  proj.AddFile("usr/lib/libsqlite3.tbd", "libsqlite3.tbd", PBXSourceTree.Sdk));
60
59
 
61
60
  proj.WriteToFile(projPath);
62
- // PodFile 使用动态库
63
61
  string podfilePath = Path.Combine(path, "Podfile");
64
62
  if (!File.Exists(podfilePath))
65
63
  {
@@ -68,35 +66,10 @@ namespace TapSDK.Core.Editor
68
66
  }
69
67
 
70
68
  string podfileContent = File.ReadAllText(podfilePath);
71
-
72
- // // 替换 use_frameworks! 的设置(默认是 static)
73
- // if (podfileContent.Contains("use_frameworks! :linkage => :static"))
74
- // {
75
- // podfileContent = podfileContent.Replace("use_frameworks! :linkage => :static", "use_frameworks! :linkage => :dynamic");
76
- // }
77
- // else if (!podfileContent.Contains("use_frameworks!"))
78
- // {
79
- // // 插入 use_frameworks! 如果没有
80
- // podfileContent = podfileContent.Replace("platform :ios, '13.0'", "platform :ios, '13.0'\nuse_frameworks!");
81
- // }
82
69
  podfileContent += "\ninstall! 'cocoapods', :warn_for_unused_master_specs_repo => false";
83
70
 
84
71
  File.WriteAllText(podfilePath, podfileContent);
85
- Debug.Log("Podfile modified to use dynamic frameworks.");
86
- // if (TapSDKCoreCompile.HandlerIOSSetting(path,
87
- // Application.dataPath,
88
- // "TapCommonResource",
89
- // "com.taptap.sdk.core",
90
- // "TapSDKCore",
91
- // new[] {"TapCommonResource.bundle"},
92
- // target, projPath, proj))
93
- // {
94
- // Debug.Log("TapCommon add Bundle Success!");
95
- // return;
96
- // }
97
-
98
- // Debug.LogError("TapCommon add Bundle Failed!");
99
72
  }
100
73
  }
101
74
  #endif
102
- }
75
+ }
@@ -4,12 +4,12 @@
4
4
  <repositories>
5
5
  <repository>https://repo.maven.apache.org/maven2</repository>
6
6
  </repositories>
7
- <androidPackage spec="com.taptap.sdk:tap-core-unity:4.8.4-beta.0"/>
7
+ <androidPackage spec="com.taptap.sdk:tap-core-unity:4.8.4"/>
8
8
  </androidPackages>
9
9
  <iosPods>
10
10
  <sources>
11
11
  <source>https://github.com/CocoaPods/Specs.git</source>
12
12
  </sources>
13
- <iosPod addToAllTargets="false" bitcodeEnabled="false" name="TapTapCoreSDK" version="4.8.4-beta.0"/>
13
+ <iosPod addToAllTargets="false" bitcodeEnabled="false" name="TapTapSDK/Core" version="4.8.4"/>
14
14
  </iosPods>
15
15
  </dependencies>
@@ -38,7 +38,8 @@ namespace TapSDK.Core
38
38
 
39
39
  Action<Result> action = null;
40
40
 
41
- if (actionDic != null && actionDic.ContainsKey(result.callbackId))
41
+ // 修复:检查callbackId是否为null或空,防止ArgumentNullException
42
+ if (actionDic != null && !string.IsNullOrEmpty(result.callbackId) && actionDic.ContainsKey(result.callbackId))
42
43
  {
43
44
  action = actionDic[result.callbackId];
44
45
  }
@@ -46,12 +47,22 @@ namespace TapSDK.Core
46
47
  if (action != null)
47
48
  {
48
49
  action(result);
49
- if (result.onceTime && BridgeIOS.GetInstance().GetConcurrentDictionary()
50
+ if (result.onceTime && !string.IsNullOrEmpty(result.callbackId) && BridgeIOS.GetInstance().GetConcurrentDictionary()
50
51
  .TryRemove(result.callbackId, out Action<Result> outAction))
51
52
  {
52
53
  TapLog.Log($"TapSDK resolved current Action:{result.callbackId}");
53
54
  }
54
55
  }
56
+ else if (string.IsNullOrEmpty(result.callbackId))
57
+ {
58
+ // 记录调试信息:当callbackId为空时
59
+ TapLog.Log($"TapSDK received result without callbackId, result: {resultJson}");
60
+ }
61
+ else
62
+ {
63
+ // 记录调试信息:当找不到对应的action时
64
+ TapLog.Log($"TapSDK no action found for callbackId: {result.callbackId}");
65
+ }
55
66
  }
56
67
 
57
68
 
@@ -12,7 +12,7 @@ using System.ComponentModel;
12
12
 
13
13
  namespace TapSDK.Core {
14
14
  public class TapTapSDK {
15
- public static readonly string Version = "4.8.4-beta.0";
15
+ public static readonly string Version = "4.8.4-beta.1";
16
16
 
17
17
  public static string SDKPlatform = "TapSDK-Unity";
18
18
 
@@ -8,6 +8,7 @@ using System.Runtime.InteropServices;
8
8
  using TapSDK.Core.Standalone.Internal.Openlog;
9
9
  using System.Threading;
10
10
  using TapSDK.Core.Internal.Log;
11
+ using UnityEditor;
11
12
 
12
13
 
13
14
 
@@ -77,7 +78,15 @@ namespace TapSDK.Core.Standalone
77
78
  lastIsLaunchedFromTapTapPCResult = 0;
78
79
  TapCoreTracker.Instance.TrackSuccess(TapCoreTracker.METHOD_LAUNCHER, sessionId, TapCoreTracker.SUCCESS_TYPE_RESTART);
79
80
  TapLog.Log("IsLaunchedFromTapTapPC Quit game");
81
+ #if UNITY_EDITOR
82
+ TapLog.Log(
83
+ $"本地测试文件配置错误,请确保 taptap_client_id.txt 文件拷贝到 {EditorApplication.applicationPath} 同级目录下"
84
+ );
85
+ EditorApplication.ExitPlaymode();
86
+ #else
80
87
  Application.Quit();
88
+ #endif
89
+
81
90
  return false;
82
91
  }
83
92
  else
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "com.taptap.sdk.core",
3
3
  "displayName": "TapTapSDK Core",
4
4
  "description": "TapTapSDK Core",
5
- "version": "4.8.4-beta.0",
5
+ "version": "4.8.4-beta.1",
6
6
  "unity": "2019.4",
7
7
  "license": "MIT",
8
8
  "dependencies": {
package/link.xml DELETED
@@ -1,4 +0,0 @@
1
- <linker>
2
- <assembly fullname="TapSDK.Core.Runtime" preserve="all" />
3
- <assembly fullname="TapSDK.Core.Mobile.Runtime" preserve="all" />
4
- </linker>
package/link.xml.meta DELETED
@@ -1,7 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: cd547e3b8c029465aa1602c53876f69e
3
- TextScriptImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant: