Comments (4)
Great idea! 👍
Don't hesitate to make a PR to create a DataModelParser
that could do that 😉
from swiftgen.
If you don't feel confortable creating the code, at least I'd be interested to see what you imagine the generated code be like (you could even for example propose a Stencil template):
- Will it be an
enum
perNSManagerObject
, with onecase
per attribute? - Or one
struct
perNSManagedObject
containing anenum attributes
with onecase
per attribute, and anenum relationships
with onecase
per relationship? - Will it be useful to generate an
enum
for other properties as well, like its nullability, its type, etc? - Will it be useful to generate some
static var myAttribute: String
(if themyAttribute
is of typeString
) for each attribute ?
Would be very interested in your feedback (especially since it has been some time I haven't used CoreData, as for my latest projects I'm more used to play with Realm instead, so I've probably lost my touch on that)
from swiftgen.
Consider use of following property when creating NSFetchRequest
where we have to pass attributes names as strings in array. So I think enum per NSManagedObject
with one case per attribute/relationship will be fine.
@property (nonatomic, copy) NSArray *propertiesToFetch NS_AVAILABLE(10_6, 3_0);
from swiftgen.
#455 has been merged, which implements this feature. I'd like to thank everyone who participated in this issue and the PRs leading up to this.
We'll probably do a release this weekend. In the meantime, people who'd like to try this feature can check out the develop branch,
from swiftgen.
Related Issues (20)
- The SwiftGen configuration automatically substitutes fileprivate in the initialization of ColorAsset HOT 1
- Adding Extra parameter when running SwiftGen through Xcode HOT 1
- Error: `swiftgen.yml` is not a config file HOT 4
- String template is not able to generate a function with a string parameter and a plural int HOT 2
- Make `SwiftUI` types the default and not `UIKit` types. HOT 1
- Color Generated with SwiftUI HOT 2
- disable Font typealias? HOT 1
- Addition of .string file changes all previous strings usage HOT 1
- Ability to change Locale HOT 6
- Feature Request: Public access to either the fallback string or the ability to specify locale HOT 2
- Add ability to refer file name of JSON HOT 3
- Support for visionOS HOT 2
- Is this repo deprecated? HOT 4
- Add an XcodeBuiltToolPlugin for swiftgen HOT 5
- [Homebrew] Error: swiftgen has been disabled because it does not build! HOT 10
- Apple privacy manifest support HOT 2
- SwiftGen Errors on Swift 6 HOT 5
- Subsequent builds after first build always fail
- Fatal error: Unable to initialize font
- 'InitialSceneType' requires that 'StoryboardScene.UILoadingViewController' inherit from 'UIViewController'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftgen.