I needed a way to properly add versioned data model documents and ended up implementing it myself as part of node-xcode. It adds the .xcdatamodeld as a Source file to build file section and sources build phase, adds all of the .xcdatamodel files (versions) it contains to file reference section and creates a XCVersionGroup section entry registering the versions and specifying current one by parsing .xccurrentversion plist file (works also for single version files). Covered all of this with tests.
I needed a way to properly add versioned data model documents and ended up implementing it myself as part of node-xcode. It adds the .xcdatamodeld as a Source file to build file section and sources build phase, adds all of the .xcdatamodel files (versions) it contains to file reference section and creates a XCVersionGroup section entry registering the versions and specifying current one by parsing .xccurrentversion plist file (works also for single version files). Covered all of this with tests.