pointfreeco / swift-composable-architecture

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
https://www.pointfree.co/collections/composable-architecture
MIT License
12.07k stars 1.41k forks source link

Fix exception when using AppStorageKey with URL Value #3098

Closed pwszebor closed 3 months ago

pwszebor commented 3 months ago

When using AppStorageKey persistence strategy with the Value associated type URL or URL?, saving values to UserDefaults causes a NSInvalidArgumentException exception to be thrown. To avoid it, dedicated APIs for saving and retrieving URLs to/from UserDefaults need to be used.