When my colleague changes code and commits it to the repository I can see the code, but xCode compiles as if his contributions weren't there

StackOverflow https://stackoverflow.com/questions/1132956

Question

Have any other iPhone developers experienced this phenomenon? I can see his contributions in xCode - I see for example my colleague has wrapped a navigation controller around one of my view controllers and added it to my tab bar. Great! That view really did call for a navigation controller and this is a welcome addition to the project.

So, I up my code and compile - no navigation controller. I do build -> clean all targets, thinking maybe some pre-compiled code is mucking me up and compile again. Same result. I was eventually able to get his changes to compile by deleting the whole directory and checking it out from the repository, but I really don't want to do that every time my colleague checks in code.

Is there some kind of box I need to check or something? What could be causing this behavior?

Thanks in advance.

Was it helpful?

Solution

Here are a number of possible fixes:

1) Delete the current version of your app off the simulator and/or device. This especially becomes necessary when using Default.png or app icons. There are a lot of shortcuts that the compiler takes for apps that are already "installed".

2) Make sure that there are NEVER any build folders or user specific files (pbuser.USERNAME I think). These files wrecked havoc on a few projects and we basically had to delete and start over.

3) Make sure that all files are svn added to the project before each commit (although this wouldn't matter for your current problem.

4) Find the changed code and set breakpoints for the debugger to catch. I believe that breakpoints that turn YELLOW while running signify that there is a difference between run and code.

I would tend to believe that it would be a problem with the .proj file also, but it sounds like that's not it.

OTHER TIPS

Some things to check (but maybe you already did it):

  • is the new code added to the correct target? You will still see it in the project tree, but it won't be compiled
  • if you are using a SVN (or CVS) client that is not XCode, you have to remember to commit (and update) the .xcodeproject file too.

Your question isn't entirely clear to me, so forgive these follow-up questions:

  • Where in Xcode did you see the changes? In the repository browser, or in the file browser part of Xcode?
  • What do you mean by "up your code"? (I'm assuming you mean that you chose the "Update source from repository" option or whatever it is called - I'm away from my mac right now - but I thought I'd check.)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top