com.taptap.sdk.core 4.9.1 → 4.9.3

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.
@@ -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.9.1"/>
7
+ <androidPackage spec="com.taptap.sdk:tap-core-unity:4.9.3"/>
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="TapTapSDK/Core" version="4.9.1"/>
13
+ <iosPod addToAllTargets="false" bitcodeEnabled="false" name="TapTapSDK/Core" version="4.9.3"/>
14
14
  </iosPods>
15
15
  </dependencies>
@@ -20,6 +20,23 @@ namespace TapSDK.Core.Mobile
20
20
  TapLog.Log("TapCoreMobile constructor");
21
21
  TapLoom.Initialize();
22
22
  EngineBridgeInitializer.Initialize();
23
+ // 由于当通过 Application.Quit 退出时,iOS 端不会收到 applicationWillTerminate 的通知,
24
+ // 所以不会调用 C++ 的 OnAppStop 方法,导致小概率会因 C++ 资源未正确释放触发崩溃,所以添加监听
25
+ #if UNITY_IOS
26
+ EventManager.AddListener(
27
+ EventManager.OnApplicationQuit,
28
+ (quit) =>
29
+ {
30
+ TapLog.Log("TapSDK Unity OnApplicationQuit");
31
+ Bridge.CallHandler(
32
+ EngineBridgeInitializer
33
+ .GetBridgeServer()
34
+ .Method("handleEngineQuitEvent")
35
+ .CommandBuilder()
36
+ );
37
+ }
38
+ );
39
+ #endif
23
40
  }
24
41
 
25
42
  public void Init(TapTapSdkOptions coreOption, TapTapSdkBaseOptions[] otherOptions)
@@ -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.9.1";
15
+ public static readonly string Version = "4.9.3";
16
16
 
17
17
  public static string SDKPlatform = "TapSDK-Unity";
18
18
 
@@ -38,12 +38,11 @@ namespace TapSDK.Core {
38
38
  {
39
39
  if (coreOption == null)
40
40
  throw new ArgumentException("[TapSDK] options is null!");
41
-
42
41
  TapTapSDK.taptapSdkOptions = coreOption;
43
42
  TapLog.Enabled = coreOption.enableLog;
44
43
  platformWrapper?.Init(coreOption);
45
-
46
44
  // 初始化各个模块
45
+
47
46
  Type[] initTaskTypes = GetInitTypeList();
48
47
  if (initTaskTypes != null)
49
48
  {
@@ -60,6 +59,7 @@ namespace TapSDK.Core {
60
59
  }
61
60
  }
62
61
  TapTapEvent.Init(HandleEventOptions(coreOption));
62
+
63
63
  }
64
64
 
65
65
  public static void Init(TapTapSdkOptions coreOption, TapTapSdkBaseOptions[] otherOptions)
@@ -72,7 +72,6 @@ namespace TapSDK.Core {
72
72
  platformWrapper?.Init(coreOption, otherOptions);
73
73
 
74
74
 
75
-
76
75
  Type[] initTaskTypes = GetInitTypeList();
77
76
  if (initTaskTypes != null)
78
77
  {
@@ -112,7 +112,7 @@ namespace TapSDK.Core
112
112
  /// <summary>
113
113
  /// 屏幕方向:0-竖屏 1-横屏
114
114
  /// </summary>
115
- public int screenOrientation = 0;
115
+ public int screenOrientation = 1;
116
116
 
117
117
  [JsonProperty("moduleName")]
118
118
  private string _moduleName = "TapTapSDKCore";
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.9.1",
5
+ "version": "4.9.3",
6
6
  "unity": "2019.4",
7
7
  "license": "MIT",
8
8
  "dependencies": {