com.taptap.sdk.login 4.6.3 → 4.7.0-ci.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.
@@ -1,16 +1,16 @@
1
- <?xml version="1.0" ?>
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
2
  <dependencies>
3
3
  <androidPackages>
4
4
  <repositories>
5
5
  <repository>https://repo.maven.apache.org/maven2</repository>
6
6
  </repositories>
7
- <androidPackage spec="com.taptap.sdk:tap-login-unity:4.6.3"/>
7
+ <androidPackage spec="com.taptap.sdk:tap-login-unity:4.7.0"/>
8
8
  </androidPackages>
9
9
  <iosPods>
10
10
  <sources>
11
11
  <source>https://github.com/CocoaPods/Specs.git</source>
12
12
  </sources>
13
- <iosPod name="TapTapLoginSDK" version="~> 4.6.3" bitcodeEnabled="false" addToAllTargets="false"/>
14
- <iosPod name="TapTapGidSDK" version="~> 4.6.3" bitcodeEnabled="false" addToAllTargets="false"/>
13
+ <iosPod addToAllTargets="false" bitcodeEnabled="false" name="TapTapLoginSDK" version="~> 4.7.0"/>
14
+ <iosPod addToAllTargets="false" bitcodeEnabled="false" name="TapTapGidSDK" version="~> 4.7.0"/>
15
15
  </iosPods>
16
16
  </dependencies>
@@ -7,7 +7,7 @@ namespace TapSDK.Login
7
7
  public class TapTapLogin
8
8
  {
9
9
 
10
- public static readonly string Version = "4.6.3";
10
+ public static readonly string Version = "4.7.0-ci.1";
11
11
 
12
12
  public const string TAP_LOGIN_SCOPE_BASIC_INFO = "basic_info";
13
13
  public const string TAP_LOGIN_SCOPE_PUBLIC_PROFILE = "public_profile";
@@ -1,4 +1,6 @@
1
+ using System;
1
2
  using System.Collections.Generic;
3
+ using System.Diagnostics;
2
4
  using JetBrains.Annotations;
3
5
  using Newtonsoft.Json;
4
6
  using TapSDK.Core;
@@ -62,24 +64,41 @@ namespace TapSDK.Login.Internal
62
64
  var accountStr = DataStorage.LoadString(_account);
63
65
  if (!string.IsNullOrEmpty(accountStr))
64
66
  {
65
- Account = new TapTapAccount(Json.Deserialize(accountStr) as Dictionary<string, object>);
67
+ try
68
+ {
69
+ Account = new TapTapAccount(Json.Deserialize(accountStr) as Dictionary<string, object>);
70
+ }
71
+ catch (Exception e)
72
+ {
73
+ UnityEngine.Debug.Log("TapSDK Login find account cache but parse failed" + e.Message);
74
+ DataStorage.RemoveCacheKey(_account);
75
+ }
66
76
  }
67
77
  else
68
78
  {
69
- var accessTokenStr = DataStorage.LoadString(_accessToken);
70
- if (string.IsNullOrEmpty(accessTokenStr))
79
+ try
71
80
  {
72
- return;
73
- }
81
+ var accessTokenStr = DataStorage.LoadString(_accessToken);
82
+ if (string.IsNullOrEmpty(accessTokenStr))
83
+ {
84
+ return;
85
+ }
74
86
 
75
- var profileStr = DataStorage.LoadString(_profile);
76
- if (string.IsNullOrEmpty(profileStr))
87
+ var profileStr = DataStorage.LoadString(_profile);
88
+ if (string.IsNullOrEmpty(profileStr))
89
+ {
90
+ return;
91
+ }
92
+ var accessToken = JsonConvert.DeserializeObject<AccessToken>(accessTokenStr);
93
+ var profile = JsonConvert.DeserializeObject<Profile>(profileStr);
94
+ Account = new TapTapAccount(accessToken, profile.openid, profile.unionid, profile.name, profile.avatar, profile.email);
95
+ }
96
+ catch (Exception e)
77
97
  {
78
- return;
98
+ UnityEngine.Debug.Log("TapSDK Login find old account cache but parse failed" + e.Message);
99
+ DataStorage.RemoveCacheKey(_accessToken);
100
+ DataStorage.RemoveCacheKey(_profile);
79
101
  }
80
- var accessToken = JsonConvert.DeserializeObject<AccessToken>(accessTokenStr);
81
- var profile = JsonConvert.DeserializeObject<Profile>(profileStr);
82
- Account = new TapTapAccount(accessToken, profile.openid, profile.unionid, profile.name, profile.avatar, profile.email);
83
102
  }
84
103
  }
85
104
 
package/link.xml.meta CHANGED
@@ -1,9 +1,5 @@
1
1
  fileFormatVersion: 2
2
- <<<<<<< HEAD
3
- guid: 05f61605551bf4b3a91af7f8e21dea83
4
- =======
5
- guid: cafa5387310034a04bfd0ae65d3ab889
6
- >>>>>>> 7453f549f (feat: pipeline build TapSDK4 Unity Demo changed version #no-ticket)
2
+ guid: f0c8495254e0e400e8b1f01be6dfd882
7
3
  TextScriptImporter:
8
4
  externalObjects: {}
9
5
  userData:
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
- "name": "com.taptap.sdk.login",
3
- "displayName": "TapTapSDK Login",
4
- "description": "TapTapSDK Login",
5
- "version": "4.6.3",
6
- "unity": "2019.4",
7
- "license": "MIT",
8
- "dependencies": {
9
- "com.taptap.sdk.core": "4.6.3"
10
- }
2
+ "name": "com.taptap.sdk.login",
3
+ "displayName": "TapTapSDK Login",
4
+ "description": "TapTapSDK Login",
5
+ "version": "4.7.0-ci.1",
6
+ "unity": "2019.4",
7
+ "license": "MIT",
8
+ "dependencies": {
9
+ "com.taptap.sdk.core": "4.7.0-ci.1"
10
+ }
11
11
  }