Is there a way to import existing data or schema into the xcdatamodel in xcode?
开发者_Go百科If not, is it possible to programmically write the xcdatamodel?
I was thinking if it is possible to create the xcdatamodel programmically then I can write a utility that can generate the xcdatamodel from a give .sql file
There are lots of examples of this. Marcus's book on Core Data has a great example and there's probably no one outside of 1 Infinite Loop that knows more about Core Data than Marcus. There's also a bit in the Core Data programming guide about importing data here.
精彩评论