Skip to content

v1.5.0 - Caching and Swift 6 Improvements

Latest

Choose a tag to compare

@sdfsdhgjkbmnmxc sdfsdhgjkbmnmxc released this 20 Sep 21:43
· 1 commit to main since this release

What's New

🚀 Features

  • Automatic caching - All resource loading methods now use NSCache for automatic caching
  • Swift 6 support - Full compatibility with Swift 6 strict concurrency checking
  • Shared cache - Property wrappers and direct methods share the same cache

📚 Documentation

  • New recommended pattern: computed properties for static resources
  • Examples for Swift 6 compatibility
  • Comprehensive caching behavior documentation

🐛 Bug Fixes

  • Fixed property wrappers to use cached loading methods
  • Removed redundant code paths

🧹 Code Quality

  • Zero compiler warnings
  • Zero SwiftLint violations
  • Removed all dead code
  • Added comprehensive tests for caching behavior

Usage

For Swift 6 compatibility, use computed properties:

struct AppConfig {
    static var config: Config {
        Embedded.getJSON(Bundle.main, path: "config.json")
    }
}

Installation

dependencies: [
    .package(url: "https://github.com/botforge-pro/swift-embed.git", from: "1.5.0")
]