views:

19

answers:

1

Is there any way (in xcode) to specify an external project to build and run directly while working in one of that project's dependent libraries? It is annoying to have to always switch back to the main project when I want to test my changes - something like this would be very helpful to know.

+1  A: 

Projects don't run, they build. (Technically, targets build.) What you want is a Custom Executable: http://developer.apple.com/mac/library/DOCUMENTATION/DeveloperTools/Conceptual/XcodeProjectManagement/230-Defining_Executable_Environments/executable_environments.html

If you are only making changes to the shared library or framework, and not to the interface (that is, the app doesn't need to be recompiled against the library headers or re-linked against the library binary), you can make the code changes in the library, build it, and launch the app as a custom executable in the library project.

If you make changes that require the app to be rebuilt, then you have to shift to the app project to rebuild it. I wouldn't recommend making the library dependent on the app; that's backwards.

cdespinosa
Thanks. Any tips on getting this to work with an iPhone app? Is it possible, since the executable would have to first install the app in the simulator?
MikeQ