05/15/2024 15:19:45

Problem description

How to judge whether the accessed MSDK is MSDKV5 or MSDKV3?

Solution

1. Client

Method 1: Judge this through the download portal of MSDK

If MSDK is downloaded via GCloud Official Website, it is the MSDKV5 version.

Image Description

If MSDK is downloaded via MSDKV3 WIKI or Apollo, it is the MSDKV3 version.

Image Description

Method 2: Judge this by checking the version number

  1. Check the version number of MSDKV5 View Details.

  2. Check the version number of MSDKV3. In Android, check it through the naming of the MSDK jar package.

Image Description

In iOS, check it through the MSDK_VERSION @ value in MSDKPublicDefine.h.

Image Description

Method 3: Judge this via the requested Client interface

If you call any interface in MSDKV5 WIKI, the accessed MSDK is the MSDKV5 version.

//An example for the call for V5 version's WeChat login interface
//C#
MSDKLogin.Login(MSDKChannel.WeChat);
//C++
MSDKLogin::Login("WeChat", permissionList);

If you call any interface in MSDKV3 WIKI, the accessed MSDK is the MSDKV3 version.

//An example for the call for V3 version's WeChat login interface
//Unity
WGPlatform.Instance.WGLogin (ePlatform.ePlatform_Weixin);
//Android
WGPlatform::GetInstance()->WGLogin((ePlatform)Platform);
//iOS
WGPlatform::GetInstance()->WGLogin(ePlatform_Weixin);

2. Server

Judge this by the requested domain name or interface

If MSDKV5 domain name and interface is requested, the accessed MSDK is the MSDKV5 version. For example, the V5 version's backend authentication interface is /v2/auth/verify_login.

Image Description

If MSDKV3 domain name and interface is requested, the accessed MSDK is the MSDKV3 version. For example, the V3 version's QQ and WeChat backend authentication interfaces are /auth/verify_login and /auth/check_token, respectively.

Image Description



Copyright © 2024 MSDK.
All rights reserved.

results matching ""

    No results matching ""