I am having a consistent problem with multiple different apps that the build on the device does not update when I make code changes. Here's my set up:
- OSX Lion
- Xcode 4.1
- iOS 4.3.5
I build, and then run, the app launches on the device but it still runs the last installed version. In order to get the build to update, I have to do the following...
- Remove the app from the device (press and hold on the icon, and click the x)
- Clean and开发者_StackOverflow中文版 then build in Xcode
- At this point if I try and run the app does not run. Xcode log says the app has started and stopped. If I restart Xcode and run, then the app runs successfully and is the updated version
If I make a single line of code change I have to go through all the steps above to get the app to update. The project is very large so a clean build takes 2-3 minutes.
Any ideas?
Update
I found the solution, this is related to the use of static libraries. The following article helped me solve this:
Changing the source of a static library needs clean and build in xcode 4
and for general background this was very helpful too:
http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/
Double check your provisioning files and targets. Be extra sure to check the App ID in your targets, and Bundle ID in info.plist. Did you change any of that info before you saw this problem? I've noticed strange behavior like what you mentioned when updating those specific pieces of data.
Command+Shift+K -- Clean. I have found that you have to do a manual clean every time now to ensure that the build updates correctly.
In the event that xCode does not run at all, you just have to restart xCode.
精彩评论