Home > Visual Studio > XCode and TFS 2010 Part 3 – XCode

XCode and TFS 2010 Part 3 – XCode

Now that you have TFS and the team project up and running, its time to start up XCode and get it to sync with TFS

In this example we are creating a new project and deploying it to TFS, if you have an existing project, you can follow the steps, then import your files into the new project and commit them to TFS

There are quite a number of steps to follow to get XCode to work with TFS. Do note that it may give some wierd errors during check in and check out, not sure why its happening, but the files are definitely processed

  1. Start up XCode
  2. Create a new project
  3. Create SCM (Source Control Management) Repository
    1. Click on SCM in the Menu
    2. Click on Configure SCM Repository
    3. Click on the [+] icon to create a new SCM Repository
    4. Enter a name for this SCM and click ok
  4. Configure SCM
    1. Scheme: http or https depending on what you configured
    2. Host: The FQN or IP address of the server you setup in part 1
    3. Path: The path to the folder where all the XCode files should be
    4. User: A valid username
    5. Password: the password associated with the username
    6. Click apply and you should get a green light along with the Authenticated word
  5. Delete project files from local disk
    1. Start finder and goto the folder where the project is located
    2. Delete the build folder
    3. Move the xcode project file out
  6. Import project to SCM
    1. Click on SCM in the Menu
    2. Click on Repositories
    3. Select the appropriate repository
    4. Click Import
    5. Browse to the folder where the project files are and click ok
    6. You may get the following error, but its ok
    7. Click on the Reload button to reload the SVN, you should see the folder with the files there
  7. Check out files from SCM
    1. Click on SCM in the Menu
    2. Click on Repositories
    3. Select the checked in folder
    4. Click check out
    5. Browse to the folder where the project used to be
    6. Click ok
    7. You will get a prompt indicating that the project has changed, do you want to reload, click yes
  8. Configure SCM for the project
    1. After reloading the project you will be looking at the new project
    2. Click on Configure SCM for this project
    3. Click on the [+] icon to create a new SCM Repository
    4. Click configure roots & SCM
    5. Click on the blank space beneath Repository and select the appropriate SCM
    6. Click ok
    7. Close the project info window

You have now successfully linked your xcode project to TFS. Try checking out a file, make changes and check in, you should see the changes reflected in TFS!

 

Note: You might get an error when checking in the file

Error: 20014 (Internal error) Description: Commit failed (details follow): Error: 20014 (Internal error) Description: A MERGE response for ‘/IPhone/XCODe/SampleProject/Classes/FirstViewController.m’ is not a child of the destination (‘/iPhone/XCODe/SampleProject/Classes’)

I’m not sure why this happens but your file is successfully checked in. what you need to do then is to discard your changes and click on update entire project under the SCM menu

Categories: Visual Studio
  1. edal136
    July 7, 2011 at 5:27 am

    when i try to import, i get the following error:
    svn: OPTIONS of ‘http://localhost:8080/tfs/myproject’: authorization failed: Could not authenticate to server: ignored NTLM challenge (http://localhost:8080)

    could you help me please.thanks

    PS:i m using xcode 4, tfs 2010, svnbridge v6.

    • July 10, 2011 at 9:47 pm

      You have to enable basic or digest authentication and disable windows authentication to have it working

  2. Serdar
    November 30, 2011 at 9:48 pm

    Check Out file get the following error

    I use TortoiseSVN 1.7.1

    Error: REPORT of ‘/!svn/vcc/default’: Could not read chunk size: An existing
    Error: connection was forcibly closed by the remote host.
    Error: (http://tfsserverip:8081)

  3. Kavit Patel
    September 5, 2012 at 4:47 pm

    Images are getting corrupted one we check-in the images in to the repository in to TFS Server 2010.
    We are using Smart SVN 6.6 to check in the code and images from MAC OS Lion in to TFS Server 2010. Code is getting check in properly only images seems to be issue images format which we are using is PNG.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: