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.
- package/Mobile/Bridge/AccountMobile.cs +40 -0
- package/Mobile/Bridge/AccountMobile.cs.meta +3 -0
- package/Mobile/Bridge.meta +3 -0
- package/Mobile/Plugins/iOS/XDAccountBridge.m +5 -0
- package/Mobile/XDGAccountMobile.cs +7 -0
- package/Mobile/XDGAccountMobileImpl.cs +2 -0
- package/Plugins/Android/libs/XDGAccount_6.22.2.aar +0 -0
- package/Plugins/iOS/XDAccountSDK.framework/Headers/TDSGlobalThirdPartyLoginHelper.h +2 -1
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK.h +0 -1
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccount.h +8 -4
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountVersion.h +2 -2
- package/Plugins/iOS/XDAccountSDK.framework/Info.plist +0 -0
- package/Plugins/iOS/XDAccountSDK.framework/XDAccountSDK +0 -0
- package/Runtime/IXDGAccount.cs +2 -0
- package/Runtime/XDGAccount.cs +7 -0
- package/Runtime/XDGLoginType.cs +10 -21
- package/package.json +1 -1
- package/Plugins/Android/libs/XDGAccount_6.21.2.aar +0 -0
- /package/Plugins/Android/libs/{XDGAccount_6.21.2.aar.meta → XDGAccount_6.22.2.aar.meta} +0 -0
|
@@ -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
|
|
@@ -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
|
}
|
|
Binary file
|
|
@@ -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
|
-
///
|
|
51
|
+
/// 登出账号
|
|
52
52
|
+ (void)logout;
|
|
53
53
|
|
|
54
|
-
///
|
|
54
|
+
/// 获取当前 User
|
|
55
|
+
/// - Parameter handler: 回调
|
|
55
56
|
+ (void)getUser:(XDGLoginManagerRequestCallback)handler;
|
|
56
57
|
|
|
57
|
-
///
|
|
58
|
+
/// 打开用户中心
|
|
58
59
|
+ (void)openUserCenter;
|
|
59
60
|
|
|
60
|
-
///
|
|
61
|
+
/// 打开个人信息页
|
|
62
|
+
+ (void)openUserDashboard;
|
|
63
|
+
|
|
64
|
+
/// 打开注销页面
|
|
61
65
|
+ (void)accountCancellation;
|
|
62
66
|
|
|
63
67
|
+ (void)bindByType:(LoginEntryType)bindType bindHandler:(XDGBindManagerRequestCallback)handler;
|
|
Binary file
|
|
Binary file
|
package/Runtime/IXDGAccount.cs
CHANGED
package/Runtime/XDGAccount.cs
CHANGED
|
@@ -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
|
}
|
package/Runtime/XDGLoginType.cs
CHANGED
|
@@ -2,27 +2,16 @@ namespace XD.SDK.Account
|
|
|
2
2
|
{
|
|
3
3
|
public enum LoginType
|
|
4
4
|
{
|
|
5
|
-
Guest = 0,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
Binary file
|
|
File without changes
|