TinyStorage 2.0 brings a bunch of awesome changes, improvements, and bug fixes, namely:
- Fixed re-entrancy deadlock bug
- Improved cross-process file modifications to be even more robust
- SwiftUI integration changed/improved slightly, now only updates if the relevant key(s) changed
- Added even more tests
- Better Swift 6 concurrency annotations
- Support for providing a custom logger
- Concurrent dispatch queue so faster concurrent reads
- No longer handles an unnecessary "file changed" event when the change occurred from the same process/instance
- Bunch of other little bug fixes
- Tests! (Thank you @donnywals)
Breaking changes:
- Dropped macOS support due to more testing needing to be done around file protection (https://support.apple.com/my-mm/guide/security/secb010e978a/web)
- If you were using
retrievein a SwiftUI view and relying on it to automatically update your view when the key's value changed, change toautoUpdatingRetrievewhich will now have the bonus of only updating the SwiftUI view if the specific key you're retrieving changed (previously a change to any key would trigger a view update). As TinyStorage was changed to be explicitly nonisolated I wanted to have a separate function that updated SwiftUI through the main actor when changes occurred, and you can now use autoUpdatingRetrieve for that, or skip that tiny bit of overhead withretrieveif you're using it in a non-SwiftUI environment