Search code examples
core-datarestkitxcdatamodel

Can I still use xcdatamodel core data model relationships with Restkit?


As I understand it RestKit provides integration with Apple’s Core Data framework, making and populating Core Data associations for you, allowing natural property based traversal of your data model.

However, I am unsure if I can still use xcdatamodel with RestKit, and cannot find any references, tutorials on whether RestKit can use xcdatamodel (Core data modelling tool) or not.

My prototype app is a company structure app; ie:

Company -< Departments -< Employees
Company -< Suppliers
..etc

In addition, I have set up some simple Fetched Properties/Templates to gather specific data; however I am unsure if I start using RestKit whether I can still use these tools/techniques via xcdatamodel, or rather I will have to code them manually.

My question therefore is, can I still model my complex app/data using xcdatamodel, complete with the fetched properties, etc and then make RestKit talk to it; and if so, can someone help point to a tutorial site about this?

Thanks.


Solution

  • Yes, you can use xcdatamodel. Look at RKCatalog example app - RKCoreDataExample uses it without any problems.