All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fixed realtime SSE reconnection when the stream ends gracefully, such as after PocketBase idle timeout closes the connection without a transport error.
- Fixed
RealtimeService.Connect()failing before the firstPB_CONNECTon reconnectable SSE interruptions, allowing the client to keep retrying until the realtime connection is established. - Fixed retry logging in
SseClient.Reconnect()to display the actual delay applied after fallback timeouts are resolved.
- Added a
DisconnectFromCollectionSSEsample action inPocketBaseExamplesto simplify manual realtime connect/disconnect testing.
- Fixed UTF-8 multibyte character handling in
DownloadHandlerSseBase.ReceiveDatamethod. The SSE client now properly handles UTF-8 multibyte sequences that are split across data chunks by using a stateful UTF-8 decoder instead of naive byte-to-char casting. This prevents character corruption when receiving SSE events containing non-ASCII characters. (Thanks @xavier-ateo!) - Fixed serialization exception in
RecordModel.Dataproperty when the underlying dictionary containsKeyValuePairentries. The property now manually constructs theJObjectby iterating through the dictionary entries instead of using theJObjectconstructor directly.
- Cleaned up
RecordModeldefault values initialization and removed redundant generic type specifications for improved code clarity.
- Fixed stack overflow risk in
BaseCrudService.GetFullListandSyncQueue.Dequeuemethods. Converted recursive implementations to iterative approach to eliminate potential stack overflow exceptions. - Fixed null reference exception in
PocketBase.NormalizeQueryParametersmethod. Added null-conditional operator to safely handle null parameter values when converting to string. - Fixed null reference exception in
AuthStore.IsValidmethod during JWT token parsing. Added proper null checking and safe dictionary access for the "exp" key to prevent exceptions during token validation. - Fixed exception handling in
AuthStore.IsValidmethod during Base64 conversion and JSON parsing. Added try-catch block to handle potential exceptions during token validation. - Fixed null reference exception in
Caster.Extractmethod. Added null check before calling ToObject to prevent exceptions when extracting null values. - Fixed null validation in
RecordModel.Setmethod. Added proper null handling to safely set null values using JValue.CreateNull instead of JToken.FromObject. - Fixed unsafe dictionary access in
RealtimeService.UnsubscribeByTopicAndListenermethod. Improved subscription reference handling to prevent potential null reference exceptions during concurrent access. - Fixed exception handling in
RecordService.ConfirmEmailChangemethod. Added try-catch block to handle potential exceptions during token validation. - Fixed exception handling in
RecordService.ConfirmVerificationmethod. Added try-catch block to handle potential exceptions during token validation. - Fixed unsafe access in
SseClient.Closemethod. Added null check before disposing UnityWebRequest to prevent exceptions when closing the client before a connection is established. - Fixed small performance issue in
ExtensionMethods.GetAwaitermethod. Added null check before creating new task to prevent unnecessary task creation when the operation is already completed. - Fixed inverted logic in
RecordService.Unsubscribe()method. The method now properly unsubscribes from all topics whentopicis null or empty. - Fixed incomplete error logging in
AsyncAuthStore.LoadInitialmethod. - Fixed wrong path in
FileService.GetTokenmethod. - Fixed wrong path in
LogService.GetListmethod. - Fixed condition in
RecordService.ConfirmVerificationmethod.
- CRITICAL: Fixed stack overflow exception in
RecordModel.Dataproperty caused by infinite recursion betweenDataproperty andToString()method. TheDataproperty now directly constructs aJObjectfrom the underlying_datafield instead of parsing the serialized string representation.
- Fixed
RealtimeService.Unsubscribenot working properly because of wrong topic matching logic inGetSubscriptionsByTopicmethod.
- Task extension methods
ContinueWithOnMainThreadare no longer part of the SDK.
- Fixed task continuation not running on WebGL.
- Await all tasks instead of using
ContinueWith(), as this is not supported in Unity WebGL.
RecordModel.CreatedandRecordModel.Updatedare now deprecated in favor ofRecordModel.Get<string>("created")andRecordModel.Get<string>("updated")to be more consistent with the Dart SDK.
RecordModel.Get<T>(string, T)method to extract a single value from theRecordModelby a dot-notation path and try to cast it to the specified generic type.RecordModel.GetListValue<T>(string, List<T>)alias forGet<List<T>>(string, List<T>).RecordModel.GetStringValue(string, string)alias forGet<string>(string, string).RecordModel.GetBoolValue(string, bool)alias forGet<bool>(string, bool).RecordModel.GetIntValue(string, int)alias forGet<int>(string, int).RecordModel.GetFloatValue(string, float)alias forGet<float>(string, float).
RecordModeldesign to be more consistent with the Dart SDK.RecordModel.Datais now aJObjectinstead of aDictionary<string, JToken>.
RecordAuth.Recordis now of typeRecordModelinstead ofBaseAuthModel. You can still access the user data via theRecordModel[string]indexer:auth.Record["name"].
- Removed
BaseAuthModel.
- Replaced incorrect using directives (Unity.Plastic.Newtonsoft.Json and Codice.Utils) with the correct ones.
-
The SDK is now compatible with Pocket Base 0.23+.
-
Feature parity with the Dart SDK.
- Fixed OAuth2 "all-in-one" flow.
- Changed the signature of the method
RealtimeService.Subscribeto not require a generic argument anymore. Now it simply returns aRecordModelinstance.
- Add
RecordService.AuthWithOAuth2method.
- Helpers to work with the
RecordServiceandRecordModelDTO.
- The majority of the SDK methods now returns an instance of
RecordModel.
- Initial version of the package.