tags:

views:

258

answers:

2

I have a project in Xcode that contains multiple targets. One of these builds a sync schema bundle, and another one builds a Foundation command-line tool that initiates a sync session using the schema defined in the bundle.

The schema bundle template creates Schema-strings.h and Schema-strings.m files, which contain constants for data class names, entity names, and attribute names, and I'd like to use these constants in my command-line tool's code.

How do I configure the targets to make this possible?

A: 

After stepping away from the computer for a while, I realized that one solution to this problem was to add Schema-strings.m to the "Compile Sources" phase of the command-line tool's target. But I'd still be interested in hearing about any other ways to get a similar result.

Evan DiBiase
A: 

Add the target that creates the synch schema bundle to the command-line target as a dependency. You can do this by dragging and dropping the target synch schema bundle target to the command line target or by adding it to the dependencies list on the general inspector window for the command line target.

Jason Coco