Linking Bundle target to command line target in Xcode

I have a project in Xcode that contains multiple targets. One of them creates a sync schema package, and the other builds a Foundation command line tool that initiates a sync session using the schema defined in the bundle.

The schema package template creates files Schema-strings.h

and Schema-strings.m

that contain constants for data class names, entity names, and attribute names, and I would like to use these constants in my command line tool code.

How do you set up goals to make this possible?

0


source to share


2 answers


After some step away from the computer, I realized that one solution to this problem was to add a Schema-strings.m

command line tool target to the Compile Sources phase. But I would still be interested to know about other ways to get a similar result.



0


source


Add a target that creates a set of synchronization schemes for the command line target as a dependency. You can do this by dragging and dropping the target target schema target into the target command line or adding it to the list of dependencies in the general inspector for the target command line task.



0


source







All Articles