Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use TFS for iPhone development?

I was struggling with how to use TFS as a source code repository for iPhone development.

My boss will never let me use Subversion (or God forbid Perforce), so I was stuck with TFS source control.

The solution is to go and buy tools to bridge Mac to TFS, and I am not trying to advertise here, but the Teamprise Client Suite for Mac OS X is the bridge between Mac OS X and TFS.

For standard check-ins and developer workflow, there is no integration between Xcode and TFS. You have to do it all manually through the Teamprise Explorer client.

For builds, it turns out that Automator and the Teamprise Command Line client do the trick.

Is there some Xcode to TFS bridge out there? What source code control system are you using for iPhone development?

The key for me is the following bash script embedded in an Automator workflow.

%1 = Local folder to do a code pull to. %2 = Project Name to do the pull from.

This script assumes the Teamprise Command Line Client is installed to ~/Teamprise

PATH="$PATH:~/Teamprise:~/Teamprise/lib"

cd "$1"
mkdir "$1/logs"

tf workspace -delete BuildScript -server:http://TFSServer -login:uname@domain,password >> $1/logs/wsdelete1.log

tf workspace -new BuildScript -server:http://TFSServer -login:uname@domain,password >> $1/logs/wscreate.log

tf workfold -map "$/TFSRoot" . -workspace:BuildScript -server:http://TFSServer -login:uname@domain,password >> $1/logs/workfold.log

tf get "$/TFSRoot/$2" -all -recursive -server:http://TFSServer -login:uname@domain,password >> $1/logs/get.log

tf workspace -delete BuildScript -server:http://TFSServer -login:uname@domain,password >> $1/logs/wsdelete2.log

#pump the tfs landing folder to the next step in the Automator script.
echo $1/Projects/$2
like image 908
Batgar Avatar asked Aug 26 '09 12:08

Batgar


1 Answers

As Louis states, XCode doesn't currently provide a publicly accessible plug-in model for us (Teamprise) to provide a TFS integration with - it is something that we would love to do.

We've experimented with a couple of hacks - such as pretending to be the Perforce command line and talking to TFS instead, however these internal proof of concepts have so far not worked out very well - especially as we would want to ideally have Work Item Tracking linked in somehow as well so that you can associate check-ins with bugs etc.

Today, the majority of our customers that are using Teamprise to talk to TFS from XCode are doing so either using the standalone UI tool (Teamprise Explorer) or are doing Automator actions like you suggest to hook into the tf command line.

Apologies that this isn't a great experience. All I can suggest is that you file a bug with Apple to provide a plug-in model for SCM systems to hook into XCode. Hopefully if there is significant developer demand then we might have more luck than just us requesting it.

like image 114
Martin Woodward Avatar answered Sep 28 '22 19:09

Martin Woodward