mogenerator icon indicating copy to clipboard operation
mogenerator copied to clipboard

Merge Swift42 branch changes

Open atomicbird opened this issue 5 years ago • 4 comments

Summary of Changes

This incorporates a variety of updates to generated Swift code. Objective-C generated code is not affected by this PR. Changes are listed in the updated README and below.

This does not include Codable support for NSManagedObject subclasses, which has been shelved for now.

Addresses

  • [NEW] Update Swift templates for better Swift style (Aleksandar Vacić)

  • [FIX] Fixed invalid call of NSManagedObject.fetchRequest() (Vincent Esche)

  • [NEW] Add support for URI and UUID attribute types (Trevor Squires)

  • [NEW] Expose information when custom type is set through userInfo (Aleksandar Vacić)

  • [NEW] Add Codable property support via a new attributeCodableTypeName user info key (Tom Harrington)

  • [CHANGE] Nullability annotations for generated primitive accessors (Michael Babin)

  • [FIX] Support for “Uses Scalar Type” (Rok Gregorič)

  • [FIX] Swift 3 NSData to Data (Christopher Rogers)

  • [FIX] Add specialized fetchRequest() func to Swift's machine generated files (0xpablo)

  • [FIX] Correct Swift machine template for singleton (fetchOne…) fetch request results (Warren Burton)

  • [FIX] Expose allAttributes and allRelationships (Trevor Squires)

atomicbird avatar Apr 20 '19 21:04 atomicbird

👋🏻 Hi, what's the status on this PR? I'm building it locally and the generated code is working well though it has warnings with Swift 5.

If you're still planning on doing merges I can take a stab at updating the templates for Swift 5 and submitting a PR.

dginsburg avatar May 21 '19 11:05 dginsburg

Hi @dginsburg! This PR is more or less ready to merge, I've just been needing someone to test it. If it seems good to you, that's probably all we need. I'll get things moving this week.

atomicbird avatar May 22 '19 03:05 atomicbird

I'm happy you feel it's good enough to merge, but you may not want to base that on my experience. I mean it's been fine but this is for a new project and my usage has been basic.

dginsburg avatar May 22 '19 16:05 dginsburg

Is there a status update for this? Getting started on a new project and would love to use all the Swift features :)

maxwoodhams avatar Sep 23 '19 17:09 maxwoodhams