ManagedModels icon indicating copy to clipboard operation
ManagedModels copied to clipboard

Auto generate property initialisers

Open helje5 opened this issue 2 years ago • 0 comments

If the dev didn't specify an own initialiser, the macro should generate one, similar to what Swift itself already does for structures.

E.g.:

@Model class Item: NSManagedObject {
  var date : Date
}

Should generate:

convenience init(date: Date) {
  self.init()
  self.date = date
}

The code for this is already prepared in the Model macro, needs to be finished.

helje5 avatar Sep 26 '23 12:09 helje5