Comments (3)
Hey man, how are you? First of all, your question is really good.
Do to things without coupling the framework with the coredata objects I let you customize how objects are created using blocks.
Try to look at this class: https://github.com/dchohfi/KeyValueObjectMapping/blob/master/KeyValueObjectMapping/DCCustomInitialize.h
and see if you understand how to use the blocks to create your objects, then inside that block you create using the normal NSEntityDescription from coredata.
If your question persist, please let me know and I try to write some code to you.
Cya man
from keyvalueobjectmapping.
Hi dchohfi
I am having same issue as kex's.. Could please give small snippet of example for using block and initialising object as NSManagedObject.?
Thanks, Xrnd
from keyvalueobjectmapping.
For me this worked:
DCCustomInitialize _selfInitializer = [[DCCustomInitialize alloc] initWithBlockInitialize:^id(__weak Class classOfObjectToGenerate, NSDictionary *__weak values, __weak id parentObject) {
// init your core data object and return it
NSManagedObject temporaryObject = [[NSManagedObject alloc] initWithEntity:description insertIntoManagedObjectContext:nil];
return temporaryObject;
}
forClass:_class of your core data object];
from keyvalueobjectmapping.
Related Issues (20)
- NSDate from unixtime in milliseconds does not work
- Use KeyValueObjectMapping in .mm file
- Nice to have: addMapper in DCParserConfiguration HOT 1
- Newbie with the pod
- NSArray with split string key name
- Cannot comple
- How about json with property "id". For example google calendarList API HOT 2
- Potential memory leak in DCObjectMapping HOT 1
- Enable BitCode
- Integrating KVOMapping with Realm...
- Whats the cocoapods dependency key here?
- Reverse mapping from Object to json? HOT 2
- I'm getting value for chatTextModel.message.origin but getting nil for chatTextModel.message.flight_legs. Details are in the description. HOT 1
- how to parse a json with array at root and no root key defined HOT 1
- Any Dome
- My app crash If I use enum in property
- Typo in code example of Cocoapods documentation
- Issue with multiple array mappers with same key/attribute name
- Please add carthage support to the project, if possible.
- Mapping of simple JSON arrays (e.g. array of strings)
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 keyvalueobjectmapping.