Skip to content

Commit

Permalink
Merge branch 'release/2.5.2' into 'develop'
Browse files Browse the repository at this point in the history
Release/2.5.2

See merge request sdk_group/store-unity-sdk!365
  • Loading branch information
DenisRakhimovXsolla committed Jan 16, 2025
2 parents fdb3367 + 180c092 commit fe6a9c1
Show file tree
Hide file tree
Showing 495 changed files with 53 additions and 1,583 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
!xsolla-unity-sdk-latest.unitypackage

[Ll]ibrary/
[Tt]emp/
[Oo]bj/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public override void TryAuth(object[] _, Action onSuccess, Action<Error> onError
{
XsollaAuth.AuthBySavedToken(
() => onSuccess?.Invoke(),
_ => onError?.Invoke(null));
error => onError?.Invoke(null));
}
}
}
6 changes: 3 additions & 3 deletions Assets/Xsolla/Auth/XsollaAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public static void AuthWithSocialNetworkAccessToken(string accessToken, string a
}

/// <summary>
/// Authenticates the user by saved token. Returns `true` if the token is loaded successfully and the user is authenticated
/// [Obsolete. Use AuthBySavedToken instead.] Authenticates the user by saved token. Returns `true` if the token is loaded successfully and the user is authenticated
/// </summary>
[Obsolete("Use AuthBySavedToken instead")]
public static bool AuthViaSavedToken()
Expand Down Expand Up @@ -402,7 +402,7 @@ public static bool AuthViaSavedToken()
}

/// <summary>
/// Authenticates the user by saved token
/// Authenticates user with the saved token.
/// <param name="onSuccess">Called after successful authentication.</param>
/// <param name="onError">Called after the request resulted with an error.</param>
/// </summary>
Expand Down Expand Up @@ -837,4 +837,4 @@ private static string GetScope()
return "offline";
}
}
}
}
16 changes: 15 additions & 1 deletion Assets/Xsolla/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [2.5.2] - 2025-01-14
### Added
- `XsollaAuth.AuthBySavedToken` SDK method for user authentication with a saved token
- `XsollaToken.ExpirationTime` property for getting the token expiration time in seconds since the Unix epoch

### Changed
- `XsollaAuth.AuthViaSavedToken` SDK method marked as obsolete. Use `XsollaAuth.AuthBySavedToken` instead
- `XsollaCatalog.GetCatalog` SDK method marked as obsolete. Use `GetItems` instead
- The Android build process no longer affects SDK source files (proxy activities, etc.)
- Default built-in browser resolution for desktop platforms is now 1024 x 800 px

### Fixed
- `Different serialization layout when loading` error

## [2.5.1] - 2024-12-12
### Changed
- Minimum supported Unity version updated to 2021.3.45f1
Expand Down Expand Up @@ -59,7 +73,7 @@
- Added `google_pay_quick_payment_button` parameter, that brings the Google Pay button to the top of the payment methods list

### Fixed:
- Malformed URL error when requesting a catalog on some iOS devices
- `Malformed URL` error when requesting a catalog on some iOS devices

## [2.4.0] - 2024-04-17
### Added
Expand Down
2 changes: 1 addition & 1 deletion Assets/Xsolla/Catalog/XsollaCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ public static void PurchaseFreeItem(string itemSku, Action<OrderStatus> onSucces
}

/// <summary>
/// [Obsolete. Use GetItems instead] Returns a list of virtual items according to pagination settings. //TEXTREVIEW
/// [Obsolete. Use GetItems instead.] Returns a list of virtual items according to pagination settings.
/// The list includes items for which display in the store is enabled in the settings. For each virtual item, complete data is returned.
/// If used after user authentication, the method returns items that match the personalization rules for the current user.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static string GetOriginPrefabPath()

private static string GetTempPrefabPath()
{
return Path.Join("Assets", "XsollaWebBrowser.prefab");
return Path.Combine("Assets", "XsollaWebBrowser.prefab");
}
}
}
2 changes: 1 addition & 1 deletion Assets/Xsolla/Core/Internal/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Xsolla.Core
{
public static class Constants
{
public const string SDK_VERSION = "2.5.1";
public const string SDK_VERSION = "2.5.2";

public const string DEFAULT_PROJECT_ID = "77640";
public const string DEFAULT_LOGIN_ID = "026201e3-7e40-11ea-a85b-42010aa80004";
Expand Down
11 changes: 10 additions & 1 deletion Assets/Xsolla/Core/Token/XsollaToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@ public static class XsollaToken
{
private const string SaveKey = "XsollaSuperToken";

/// <summary>
/// Access token. Required for most API requests.
/// </summary>
public static string AccessToken => Instance?.accessToken;

/// <summary>
/// Refresh token. Required to get a new access token.
/// </summary>
public static string RefreshToken => Instance?.refreshToken;

/// <summary>
/// Access token expiration time. Seconds since the Unix epoch.
/// </summary>
public static int ExpirationTime => Instance?.expirationTime ?? 0;

public static bool Exists => Instance != null;
Expand Down Expand Up @@ -115,4 +124,4 @@ public static void DeleteSavedInstance()
PlayerPrefs.DeleteKey(SaveKey);
}
}
}
}
22 changes: 18 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Changelog

## [2.5.2] - 2025-01-14
### Added
- `XsollaAuth.AuthBySavedToken` SDK method for user authentication with a saved token
- `XsollaToken.ExpirationTime` property for getting the token expiration time in seconds since the Unix epoch

### Changed
- `XsollaAuth.AuthViaSavedToken` SDK method marked as obsolete. Use `XsollaAuth.AuthBySavedToken` instead
- `XsollaCatalog.GetCatalog` SDK method marked as obsolete. Use `GetItems` instead
- The Android build process no longer affects SDK source files (proxy activities, etc.)
- Default built-in browser resolution for desktop platforms is now 1024 x 800 px

### Fixed
- `Different serialization layout when loading` error

## [2.5.1] - 2024-12-12
### Changed
- Minimum supported Unity version updated to 2021.3.45f1.
- Removed the `limit` and `offset` parameters from the following SDK methods:
- `XsollaCatalog.GetItems`
- `XsollaCatalog.GetGroupItems`
- `XsollaCatalog.GetItems`
- `XsollaCatalog.GetGroupItems`
- `XsollaCatalog.GetItemGroups`
- `XsollaCatalog.GetVirtualCurrencyList`
- `XsollaCatalog.GetVirtualCurrencyPackagesList`
Expand Down Expand Up @@ -59,7 +73,7 @@
- Added `google_pay_quick_payment_button` parameter, that brings the Google Pay button to the top of the payment methods list

### Fixed:
- Malformed URL error when requesting a catalog on some iOS devices
- `Malformed URL` error when requesting a catalog on some iOS devices

## [2.4.0] - 2024-04-17
### Added
Expand All @@ -85,7 +99,7 @@

## [2.3.0] - 2024-02-01
### Changed
- `AuthWithXsollaWidget` SDK method. Added the locale parameter
- `AuthWithXsollaWidget` SDK method. Added the `locale` parameter

## [2.2.0] - 2023-11-29
### Added
Expand Down
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 2.5.1
bundleVersion: 2.5.2
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down
Loading

0 comments on commit fe6a9c1

Please sign in to comment.