开发者

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

开发者 https://www.devze.com 2022-12-25 17:31 出处:网络
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, somet

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 developmen开发者_如何学Pythont? 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.


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


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.


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


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.


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.


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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号