Skip to content

Releases: davidscheutz/SwiftCopy

v1.2.3

29 Nov 00:18
Compare
Choose a tag to compare

Add support for struct's with custom init methods!

struct Example {
    let value: String
    let lastUpdated: Date

    init(value: String) {
        self.value = value
        lastUpdated = .now
    }
}

Previously this would've caused several compiler issues, because the code generation included the lastUpdated member, even though it is a read only value because it can't be assigned via the constructor.

SwiftCopy.stencil now has a iterate macro which can be used to dynamically generate code for each member of a given type.

Happy thanksgiving 🦃

v1.2.1

09 May 19:01
Compare
Choose a tag to compare

Fix an issue where the project's build folder was provided as input path to Sourcery, leading to a build failure:

'../Project/build' does not exist or is not readable.
Plug-in ended with non-zero exit code: 1)

v1.2.0

09 May 14:33
Compare
Choose a tag to compare

Changes include

  • Update and Builder now have an additional objectDidChange PassthroughSubject, which can be used to observe changes outside SwiftUI views
  • Builder of types that confirm to Equatable are equipped with a method hasChanges.
  • Support shared project directories using the XcodeProjectPlugin target inputFiles
  • Updated README

v1.1.0

16 Mar 19:03
Compare
Choose a tag to compare

Introduce Builder and Updater objects to simply create and update immutable structs.

Please take a look at the updated readme for more details.

Includes tests and also the latest Sourcery binary v2.1.7.

v1.0.1

27 Feb 21:08
Compare
Choose a tag to compare

Fix generic shadowing compiler warning for OptionalCopy:
Screenshot 2024-02-27 at 16 07 32

v1.0.0

18 Oct 13:07
96798dd
Compare
Choose a tag to compare

Lightweight Swift Package to code Kotlin-like copy functions for Swift types including support for optionals.

This version includes basic unit tests and proved itself in my private projects.