-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge Swift42 branch changes #385
base: master
Are you sure you want to change the base?
Conversation
…ator into radianttap-swift-templates
* Don’t import C style headers in Swift code * Add a space between “public” and “private(set)” to avoid “publicprivate” in code. * Don’t declare “open” items in public extension * Use “entityName” instead of “entityName()”
…w types. Intended to fix issue #376
…info key, as described in #375.
Additional fix for #376
👋🏻 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. |
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. |
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. |
Is there a status update for this? Getting started on a new project and would love to use all the Swift features :) |
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
toData
(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)