Skip to content

Releases: alexruperez/SecurePropertyStorage

v0.8.2

02 Sep 15:23
ae70526

Choose a tag to compare

Fixed

Commits

v0.8.1

06 Jun 11:30
f197322

Choose a tag to compare

🔒 Concurrency and Sendable

This library is designed with Swift's modern concurrency features in mind. Access to the underlying storage mechanisms (UserDefaults, Keychain, etc.) is serialized through a global actor (StorageActor), preventing data races during read and write operations performed by the library itself.

However, for your application to be fully concurrency-safe when using this library, it is crucial that the types you store and retrieve are Sendable.

  • Generic Types: When using generic property wrappers or methods like @Store var item: MyType?, storage.value(forKey: "key") as? MyType, or storage.decodable(forKey: "key") as? MyDecodableType, ensure that MyType and MyDecodableType conform to the Sendable protocol.
  • Object Archiving: If you use methods that rely on NSKeyedArchiver (such as storage.set(object: myNSObject, forKey: "key")), the class myNSObject should conform to NSSecureCoding for security and also be Sendable for concurrency safety.
  • Why is Sendable important?: While the library ensures that the act of storing or retrieving data is safe, if the data itself (e.g., a class instance) is not Sendable, then passing it across different concurrent tasks or actors after retrieval can lead to data races if the data is mutable. Conforming to Sendable helps Swift enforce that such types can be safely shared.

Enabling strict concurrency checking in your project's build settings (e.g., "Strict Concurrency Checking" set to "Complete" in Xcode) is highly recommended to help identify potential concurrency issues at compile time.

Commits

v0.8.0

24 Sep 11:12

Choose a tag to compare

Added

  • Configurable Symmetric Key Naming. #31 Thanks @nuomi1!

Fixed

Improvements

  • visionOS Compatible.
  • Swift Package Manager tools version update to 6.0
  • Xcode version update to 16.0
  • macOS Deployment Target update to 11.5

Commits

v0.7.1

04 May 11:05
c4dba43

Choose a tag to compare

Fixed

Commits

v0.7.0

27 Feb 14:06
c55f046

Choose a tag to compare

Added

  • Customizable kSecClass.
  • kSecReturnAttributes by default.

Commits

v0.6.0

26 Jan 09:04
addaa53

Choose a tag to compare

In memory of my friend Haldo Spontón. Rest in peace. 😢

Added

Improvements

  • Swift Package Manager tools version update to 5.5

Commits

v0.5.0

05 Aug 21:13
617b99a

Choose a tag to compare

Added

Commits

v0.4.2

10 May 07:42
f8e37f4

Choose a tag to compare

Fixed

Improvements

  • Swift Package Manager tools version update to 5.3

Commits

v0.4.1

19 Apr 10:34
cdc9836

Choose a tag to compare

Fixed

  • Unwrapped always return defaultValue after restart app. #15 Thanks @qchenqizhi!

Commits

v0.4.0 (SECURITY UPDATE!)

15 Apr 08:31
db8f1c9

Choose a tag to compare