I just got done with another major iOS development frustration. The iOS Simulator caches XIB files. When I am writing code I expect a Clean and Build to actually mean something. But it does not for iOS and it really pissed me off this morning.
I got sick of trying to get a layout to look correct using IB. IB sucks. IB does not help you with a portrait and landscape layout. IB gets in the way a lot. People on the web recommend throwing it out the window and just doing what you need in code. So I did that. I deleted the XIB file from the project and I did it all in code and it appeared to work like a champ. Today I added a background image to the view in question and I found I needed to change the label text color to show up. I change it and nothing happens. WTF? I do a search on Google and find out that the stupid simulator caches stuff and you have to gut it to make it stop.
This is MY code and I have to gut the simulator, which guts out all my test images and my whole database so I can see the code I wrote that I did a clean and build actually run - you have got to be kidding me! But you are not and this is acceptable behavior of an IDE and simulator? Not in my book. Damn Apple how many more times do you have to royally piss me off? I will be so happy to get this product done so I can work on the Android port.
I gut the simulator then the program does not run at all because of another deleted XIB file. I found no references to it, deleted it, ran fine, committed the delete action and thought the world was good. But this is an Apple world full of stupid crap. I had to recover the file from SVN today so I could get things to work again. At least the second area where I am doing code only and no XIB is working now too.
Give me one good reason why the code I just cleaned and built is not the code that actually runs in the simulator. Am I going to have to totally reset my iTouch back to factory settings every time I delete an XIB file?
I also found out I had to uninstall the app on both the iTouches to get it to stop using the XIB file. That is some extra stupid there.