I mainly do Java development using Eclipse with SVN but recently I've been playing around with a bit of iphone development using XCode.
I've included some below some Gotchas about using XCode with SVN in the hope that it might save someone else making the same mistakes as me...
- The left hand navigator pane in xcode labelled files and groups does not show a filesystem view of the folder containing the project files.
- XCode projects need files adding in manually - the project structures does not have to match file system directory structures at all.
- You will probably want to exclude the build directory - XCode will not do this for you.
- Be aware that's it's easy to accidentily create links to files in the projects rather than putting the files into the project folder itself. Make sure when you drop a file into the project that you are copying it into the actual project and not just linking to an external file.
- Committing the files to version control. When you are committing you will probably also want to commit the project file itself, you may this file if you aren't looking for it but it should show up in the SCM section. This file contains the list of all the files that are actually in the project, so if you don't commit this then the files will all be under version control but when you checkout the project on a fresh machine the files won't be included in the project, probably leaving the project with breakages.
- New files that are placed in the project will not be added to version control even if the parent folder is already under version control and the entire project was checked out from an SCM such as SVN originally.
- When using XCode to check out from a repository - you probably then want to tell XCode that the project is from that repository.
- There is no way to get a graphical project level diff within Xcode, such as the syncronization view in Eclipse which helps you to merge and rollback changes prior to doing a commit. File level diffs can be done and to get an idea what files in the project have changes you can right-click the groups and files header on the left hand navigation panel and select SCM, this put a letter next to files depending on their state.
- You may want to exclude your user files inside foo.xcodeproj/blah.pbxuser as this has user specific settings