com.xd.sdk.account 6.21.2 → 6.22.2

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.
@@ -0,0 +1,40 @@
1
+ #if UNITY_ANDROID || UNITY_IOS
2
+
3
+ using System.Runtime.InteropServices;
4
+ using UnityEngine;
5
+
6
+ namespace XD.SDK.Account.Mobile.Bridge
7
+ {
8
+ public class AccountMobile
9
+ {
10
+ #if UNITY_ANDROID
11
+ private static AndroidJavaClass _androidJavaClass;
12
+
13
+ private static AndroidJavaClass GetInstance()
14
+ {
15
+ if (_androidJavaClass == null)
16
+ {
17
+ _androidJavaClass = new AndroidJavaClass("com.xd.intl.account.XDGAccount");
18
+ }
19
+
20
+ return _androidJavaClass;
21
+ }
22
+ #endif
23
+
24
+ public static void OpenUserDashboard()
25
+ {
26
+ #if UNITY_ANDROID
27
+ GetInstance().CallStatic("openUserDashboard");
28
+ #else
29
+ XDAccountOpenUserDashboard();
30
+ #endif
31
+ }
32
+
33
+ #if UNITY_IOS
34
+ [DllImport("__Internal")]
35
+ private static extern void XDAccountOpenUserDashboard();
36
+ #endif
37
+ }
38
+ }
39
+
40
+ #endif
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: d77b9e2bf47e4fc79ce51ac1eaefc30b
3
+ timeCreated: 1725936736
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: f0035c338ae2437db6e07eb885f07429
3
+ timeCreated: 1725936726
@@ -9,6 +9,7 @@
9
9
  #import <XDCommonSDK/XDGHttpRequest.h>
10
10
  #import <XDCommonSDK/XDGUser.h>
11
11
  #import <XDAccountSDK/XDGLoginService.h>
12
+ #import <XDAccountSDK/XDGAccount.h>
12
13
  #import <XDCommonSDK/NSDictionary+TDSGlobalJson.h>
13
14
 
14
15
  const char* XDAccountBridgeGetAuthorization(const char* url, const char* method, long timestamp) {
@@ -24,3 +25,7 @@ const char*XDAccountBridgeGetUser() {
24
25
  NSDictionary *userDic = [XDGLoginService bridgeUserDic:user];
25
26
  return [userDic.tdsglobal_jsonString UTF8String];
26
27
  }
28
+
29
+ void XDAccountOpenUserDashboard() {
30
+ [XDGAccount openUserDashboard];
31
+ }
@@ -2,6 +2,7 @@
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using XD.SDK.Account;
5
+ using XD.SDK.Account.Mobile.Bridge;
5
6
  using XD.SDK.Common;
6
7
  using LoginType = XD.SDK.Account.LoginType;
7
8
 
@@ -126,6 +127,12 @@ namespace XD.SDK.Account{
126
127
  {
127
128
  XDGAccountMobileImpl.GetInstance().BindByType(loginType, (b, error)=> callback(b, error as XDGError));
128
129
  }
130
+
131
+ public void OpenUserDashboard()
132
+ {
133
+ AccountMobile.OpenUserDashboard();
134
+ }
135
+
129
136
  #endregion
130
137
  }
131
138
  }
@@ -95,6 +95,8 @@ namespace XD.SDK.Account{
95
95
  str += "PHONE,";
96
96
  // } else if (type == XD.SDK.Account.LoginType.QQ){
97
97
  // str += "QQ,";
98
+ } else if (type == XD.SDK.Account.LoginType.Email){
99
+ str += "EMAIL,";
98
100
  }
99
101
  }
100
102
 
@@ -37,7 +37,8 @@ typedef NS_ENUM(NSInteger,XDGLoginInfoType) {
37
37
  XDGLoginInfoTypeQQ,
38
38
  XDGLoginInfoTypeTwitch,
39
39
  XDGLoginInfoTypeSteam,
40
- XDGLoginInfoTypePhone
40
+ XDGLoginInfoTypePhone,
41
+ XDGLoginInfoTypeEmail,
41
42
  };
42
43
 
43
44
  @interface TDSGlobalThirdPartyLoginHelper : NSObject
@@ -17,7 +17,6 @@ FOUNDATION_EXPORT const unsigned char XDAccountSDKVersionString[];
17
17
 
18
18
  #import <XDAccountSDK/XDGAccount.h>
19
19
  #import <XDAccountSDK/TDSGlobalThirdPartyLoginHelper.h>
20
- #import <XDAccountSDK/TDSGlobalThirdPartyLoginManager.h>
21
20
  #import <XDAccountSDK/XDGLoginEntriesConfig.h>
22
21
  #import <XDAccountSDK/XDGLoginService.h>
23
22
  #import <XDAccountSDK/XDGAccountVersion.h>
@@ -48,16 +48,20 @@ typedef void (^XDGUserStatusChangeCallback)(XDGUserStateChangeCode userStateChan
48
48
  /// @param handler login result handler
49
49
  + (void)loginWithConfig:(XDGLoginEntriesConfig *)config handler:(XDGLoginManagerRequestCallback)handler;
50
50
 
51
- /// Logout current user
51
+ /// 登出账号
52
52
  + (void)logout;
53
53
 
54
- /// Get current user
54
+ /// 获取当前 User
55
+ /// - Parameter handler: 回调
55
56
  + (void)getUser:(XDGLoginManagerRequestCallback)handler;
56
57
 
57
- /// Open usercenter view
58
+ /// 打开用户中心
58
59
  + (void)openUserCenter;
59
60
 
60
- /// Open accountCancellation
61
+ /// 打开个人信息页
62
+ + (void)openUserDashboard;
63
+
64
+ /// 打开注销页面
61
65
  + (void)accountCancellation;
62
66
 
63
67
  + (void)bindByType:(LoginEntryType)bindType bindHandler:(XDGBindManagerRequestCallback)handler;
@@ -4,5 +4,5 @@
4
4
  //
5
5
  // Created by Fattycat on 2023/4/14.
6
6
  //
7
- #define XDGAccount_VERSION @"6.21.2"
8
- // HASH d3392de
7
+ #define XDGAccount_VERSION @"6.22.2"
8
+ // HASH cb5e085
@@ -38,5 +38,7 @@ namespace XD.SDK.Account{
38
38
  //除了 Default 和 Guest
39
39
  void BindByType(LoginType loginType, Action<bool, XDGError> callback);
40
40
 
41
+ void OpenUserDashboard();
42
+
41
43
  }
42
44
  }
@@ -89,6 +89,11 @@ namespace XD.SDK.Account{
89
89
  platformWrapper.BindByType(loginType, callback);
90
90
  }
91
91
 
92
+ public static void OpenUserDashboard()
93
+ {
94
+ platformWrapper.OpenUserDashboard();
95
+ }
96
+
92
97
  public static string GetLoginTypeString(LoginType loginType)
93
98
  {
94
99
  switch (loginType)
@@ -115,6 +120,8 @@ namespace XD.SDK.Account{
115
120
  return "Guest";
116
121
  case XD.SDK.Account.LoginType.Phone:
117
122
  return "Phone";
123
+ case XD.SDK.Account.LoginType.Email:
124
+ return "Email";
118
125
  default:
119
126
  return "Default";
120
127
  }
@@ -2,27 +2,16 @@ namespace XD.SDK.Account
2
2
  {
3
3
  public enum LoginType
4
4
  {
5
- Guest = 0, // 游客登录
6
- WeChat = 1, // PC 未实现
7
- Apple = 2, // 苹果登录
8
- Google = 3, // Google 登录
9
- Facebook = 4, // Facebook 登录
10
- TapTap = 5, // Tap 登录
11
- LINE = 6, // PC 未实现
12
- Twitter = 7, // PC 未实现
13
- // QQ = 8,
14
- // Twitch = 9,
15
- Steam = 10, // Steam 登录
16
- Phone = 11, // 手机号 登陆
5
+ Guest = 0, // 游客登录
6
+ Apple = 2, // 苹果登录
7
+ Google = 3, // Google 登录
8
+ Facebook = 4, // Facebook 登录
9
+ TapTap = 5, // Tap 登录
10
+ LINE = 6, // Line 登录,PC 暂未实现
11
+ Twitter = 7, // Twitter 登录,PC 暂未实现
12
+ Steam = 10, // Steam 登录
13
+ Phone = 11, // 手机号 登陆, 6.9.0 支持国内 6.22.0 支持海外
14
+ Email = 12, // 邮箱 登陆,6.22.0 支持海外
17
15
  Default = -1, // 自动登录,以上次登录成功的信息登录
18
16
  }
19
- // ios的,要与后台一致!
20
- // XDGLoginInfoTypeGuest = 0,
21
- // XDGLoginInfoTypeWeChat = 1,
22
- // XDGLoginInfoTypeApple = 2,
23
- // XDGLoginInfoTypeGoogle = 3,
24
- // XDGLoginInfoTypeFacebook = 4,
25
- // XDGLoginInfoTypeTapTap = 5,
26
- // XDGLoginInfoTypeLine = 6,
27
- // XDGLoginInfoTypeTwitter = 7
28
17
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "com.xd.sdk.account",
3
3
  "displayName": "XDSDK Account",
4
- "version": "6.21.2",
4
+ "version": "6.22.2",
5
5
  "description": "XDSDK",
6
6
  "unity": "2018.3",
7
7
  "license": "MIT",