iOS app still contains and uses removed files

beige matchbox

macrumors 6502a
Original poster
Mar 16, 2005
521
0
Oxfordshire, UK
Having some trouble updating some images in an app. I started by simply replacing the images with the new ones keeping the file names, but when run on a device or sim it still loaded the old images.

General advice seems to be clean all targets, did that, no change. The other common suggestion is delete the build directory, did that, again no change. So I did both at the same time, and surprise surprise, no change...

So, next I renamed all the new files, and changed the code accordingly, only to have it still load the old images.

So I downloaded a little app that allows me to browse the contents of my iPod, and in the .app are all the old files and the new one which must mean despite updating the code to point at the new file names, the app is still using the old ones.

It's also including various other obsolete files, but the code is pointing at the replacements.

Using xcode 3.2.5 ios sdk 4.2


Any ideas guys?
 

Attachments


ClutchThese

macrumors 65816
Jun 25, 2010
1,249
61
Alexandria, VA
i had that happen to me a few times too.

Go to target and right click your app and do a "clean" there too.

You can also delete all the files on the Simulator and restart Xcode.
 

beige matchbox

macrumors 6502a
Original poster
Mar 16, 2005
521
0
Oxfordshire, UK
i had that happen to me a few times too.

Go to target and right click your app and do a "clean" there too.

You can also delete all the files on the Simulator and restart Xcode.
Tried that, same effect.


I've now reinstalled xcode, which fixed the old image problem, who knows why, hopefully xcode 4 will kill off that bug...

I also had some @x2's instead of @2x's here and there, no doubt due to the frustration :rolleyes:
 

ClutchThese

macrumors 65816
Jun 25, 2010
1,249
61
Alexandria, VA
now that you mention the @2x thing, mine did the same thing where it duplicated all my icon png files! i had a bunch of errors and had to delete everything and relink new image files. Was really weird.

So the reinstall of Xcode fixed it...pretty weak that it had to come to that. I'm sure it's something fairly simple that were missing. did you try switching the simulator? maybe see if the simulator was holding all the original filed?
 

beige matchbox

macrumors 6502a
Original poster
Mar 16, 2005
521
0
Oxfordshire, UK
I went through all the ios versions supported by the simulator, all acted the same, I deleted the simulators library folder, and I went through the simulator app find not trace of anything related.

I'm sure there was a button hidden away somewhere that would have fixed it, or some file manipulation that would have done the trick, but I was just going beyond the slightly miffed stage, so drastic action was needed before I did something silly :eek: