Xcode not building app with changes incorporated

Did you clean the build folder by pressing command while the cursor is on the clean option? Are you sure you don't have two instances of the app installed? Try turning your iPhone off and on.. Sounds dumb but has worked for me in the past

Lion is known to have this issues with Xcode. I solved this by installing the newest beta available. If you don't have access to the newest beta try uninstalling and reinstalling. To uniinstall:

sudo /Developer/Library/uninstall-devtools --mode=all

After upgrading to Lion, Xcode 4.1 is no longer building my iOS apps with the latest changes incorporated (i.e code, bundle name, icon changes).

Before the upgrade, when I was using Snow Leopard, no matter what the change, or even if I replaced a file outside of Xcode with Finder or used an external text editor, Xcode would always build a fresh copy with all of the changes incorporated, without having to do any extra steps.

Now, Xcode seems to insist on using a previous version, and the only way I can be sure that it will build with all of the changes incorporated is do a Product > Clean from the main menu and then restart Xcode.

What's going on here? Is there a simple setting that I am missing? I never had to anything except click Run when I was on Snow Leopard, and all changes were always incorporated without a glitch. If I can't fix this I am going to revert to Snow Leopard.

share | improve this question
 
   
Try restarting Xcode. You could also write a macro that does a clean and a build operation at once. –  Aurum Aquila Sep 21 '11 at 0:34
   
I have this problem too sometimes, I've found it most often occurs when I change some sort of resource file (i.e. image, xib, etc). Usually Command-Shift-K followed by Command-B works just fine without the need to restart. Uninstalling the App on the device itself is another way I've been able to ensure I get the latest copy on the device. –  Thuggish Nuggets Sep 21 '11 at 0:47
add comment

5 Answers

Lion is known to have this issues with Xcode. I solved this by installing the newest beta available. If you don't have access to the newest beta try uninstalling and reinstalling. To uniinstall:

sudo /Developer/Library/uninstall-devtools --mode=all

share | improve this answer
 
   
Does uninstalling and reinstalling fix this? I don't think installing a beta is the answer since I thought you couldn't post an app to the App Store that was built with a beta version of Xcode or can you? –  Thuggish Nuggets Sep 21 '11 at 0:45
add comment

Delete the "Build" folder in your app's folder on your computer and try running the app again. That should fix it.

share | improve this answer
 
   
add comment

I've experienced plenty of issues with taking "old" projects into newer versions of Xcode. If it's not TOO painful, I'd make a new project and just add all your classes and resources to it to make sure it's fresh for Xcode. This isn't trivial in some cases, but it's more likely to fix your issue.

share | improve this answer
 
   
add comment

Had a similar effect where every change appeared to be ignored, Xcode said it compiled but the simulator showed a previous version. Even when I did a clean and rebuild. The problem was in the simulator, I noticed 2 icons of the same project. I uninstalled them both in the emulator and run it again, this time correctly with all my changes. Guess the problem appeared because of changes in the name of the project bundle, this must have confused the simulator. so deleting the apps in the simulator did the trick.

share | improve this answer
 
   
add comment

Go the folder

/Users/%yourusername%/Library/Developer/Xcode/DerivedData/%yourworkplacename%/Build/Intermediates/

delete the projects that you want them to rebuild.

It works for me to make the modified file take in effect after I run it.

你可能感兴趣的:(change)