I'm submitting a bug report on this today. Hopefully Xcode scripting will be greatly enhanced in the coming versions of Xcode 4.
I'll be using a run script build phase to generate and copy my momd, that seems to be the most straight forward solution.
On Mar 8, 2011, at 4:06 PM, Logan Cautrell wrote:
> I searched both the list archive and google to now avail. I'm trying to add an xcdatamodeld to the Compile Sources build phase through the scripting interface. I can successfully add code files (main.m) to the phase, but it will not allow me to add xcdatamodeld.
> There is something funny about how Xcode handles xcdatamodeld. If I drag and drop xcdatamodeld on the Compile Sources Phase it works great. The build output show the DataModelVersionCompile command being executed and the momd is copied into the bundle as expected. If I get info on the xcdatamodeld file it is not listed as belonging to my targets.
> If I remove the xcdatamodeld from the Compile Sources phase, get info on the xcdatamodeld, and select it for my targets; Xcode adds the xcdatamodel files individually. The compile output then shows multiple DataModelCompile commands and no momd is generated. Of course my app no longer runs because the right model version is not selected a run time.
> I'm thinking that I can add a run script phase to manually build the momd using the DataModelVersionCompile. Any shortcomings from manually doing this?
> I must say the Xcode's project scripting interface is not very friendly, and trying to do anything outside of the Xcode box is very difficult.
> -logan _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> This email sent to email@hidden
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden