Greg
Greg

Reputation: 1146

Xcode Project Code Changes Not Updating 100% After Save-Build-Run

When I make code changes to my iPhone game project in Xcode, and then do CMD-B + Enter, I expect the project to be saved, build and run on the simulator with the latest. What is happening though, sometimes, is that it doesn't pick up a small change I make unless I clean the project and then build.

I'm a long time Java person and newish to C-based languages and it's compiler. Can someone explain to me what is cached after each build that does this and how to change my project settings to avoid having to clean every time? Or tell me the bad news that this is part of C development? Not trying to bash it - I get compiled JSPs stuck in the working cache often in Java, too. :P

UPDATE: Does this have to do with the location of my builds at all? That's the only thing I can think of that's changed from a build config perspective.

Upvotes: 13

Views: 12283

Answers (6)

Naval Hasan
Naval Hasan

Reputation: 1520

I am not sure about this, But in case if you are using git, go to xcode preferences -> Source control -> General

  • Uncheck Refresh local status automatically
  • Uncheck Fetch and refresh server status automatically
  • Uncheck Add and remove files automatically
  • Uncheck Select files to commit automatically

Upvotes: 0

Yarmoshy
Yarmoshy

Reputation: 79

In case anyone still comes across this (as I was having this issue today on Xcode 5.1), all I had to do was open a new tab and close out the tab I was working in. Some sort of tab bug in Xcode.

Upvotes: 1

Nath
Nath

Reputation: 6864

Had a similar problem, I reset content and settings in the iPhone simulator

Upvotes: 5

karthik89
karthik89

Reputation: 73

Go to Product Menu and choose Clean and then choose Build. Thats it.

Upvotes: 2

TechZen
TechZen

Reputation: 64428

In the Xcode Build Preferences make sure that "Unsaved Files" is set to "Always Save". If not, Xcode will not autosave files before building and will use the last version saved to disk.

Upvotes: 1

Nick Moore
Nick Moore

Reputation: 15857

Seems odd to me, because I never get this problem in XCode. It's not a common issue with C or anything. The tools for C-based languages usually do this just as well as the Java ones.

Upvotes: 2

Related Questions