tags:

views:

285

answers:

2

I've got a mysterious problem with images and caching. In my project I've got 20 photos that elegantly fade in and out with a random function that changes up the order a bit.

I found that I didn't like one image in particular, image_1.png and wanted to push it back in the rotation (each time the app starts the images start with image_1.png). So, I swapped the name of image_1.png with that of image_16.png. When I look at image in the project folder and in Resources indeed the images are as they should be but when I run the app its the same old image that starts things out.

I have reset the sim, deleted the app from my iPhone, removed the images from the project and reimported them and still the same image.

Even odder.. I have an image_0.png that is no longer in the project file at all ... its not even on my hard drive.... but it shows up as well.

Do I have a ghost in my Mac or is this just seriously persistent cache?

A: 

Sounds like a persistent cache.

Let me guess: you have your images in a directory that you add to your project as a reference?

Yeah, that stuff's weird and buggy. Even in the latest xcode. I find it helps to recreate the folder with the new contents in a different place, then remove the old one from the project and add the new one. Perhaps even closing the project before re-adding.

XCode sucks.

Rhythmic Fistman
RF... that seems to have done it. I removed the folder of images... dragged the folder out of the project to the desktop.. renamed it... dragged it back into the project and had XCode copy it to the project folder.XCode sucks? I don't know about that... if it weren't for XCode there wouldn't be half the crappy apps in the app store crowding out good apps... and that's got to be a good thing ;)
Michael
When you change these things the diffs in your project file are strange. The refs don't *appear* to encode the folder contents, and just look like super long folderID. Anyway, If you accept my answer I'll consider changing my opinion of XCode.
Rhythmic Fistman
A: 

Clean All Targets

Corey Floyd
did nothing whatsoever.
Michael