Thursday, December 16, 2010

sharing common source files in other projects

Say you're writing some reusable code in one project and would like to share it with another project. You can do this by using a defined Source Tree among your colleagues.

1. Go to XCode -> Preferences
2. Select Source Trees
3. Add the Setting Name, Display Name and Path.
The Setting Name is the actual variable used by XCode
The Display Name is the name displayed in the info
The Path will actually vary per user.
4. So when sharing among other users, everyone should put the same Setting and Display Name and then their own Path to the common project.
5. Now that that's set up, you can go ahead and add your files from the common project. Before clicking Add, make sure to select your reference type as "Relative to {Setting Name}".

Now you should be sharing source files with everyone in a common location!

No comments:

Post a Comment