Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fergusjk

macrumors member
Original poster
Aug 23, 2010
44
0
Ayrshire Coast, Scotland
I was using two png files for the Icon and Default images but I've decided to change them.

Initially I dragged the original files from the Desktop into the Resources folder in xcode and everything worked well.

Today I deleted the old ones and added some new ones, again called Icon and Default, but it is the old ones that keep appearing when I run the Simulator.

Anyone any ideas what is causing this?
 
Have you tried doing a clean then a build? Also when you dragged them to Resources did you copy the files? Or create aliases?
 
hmmm, I tried clean but to no avail.

When I copied them over I didn't do anything else so I must just have made aliases. But I changed the file names on the desktop - the new files are now called Icon.png and Default.png. Whats more when I click on the files in the resources folder the new piccys are displayed - it is just when being run in the simulator or device that it seems to revert back to the old ones.

I've tried deleting the app from sim/device but again to no avail. These old pictures just keep showing up :mad:
 
And the next time you add external files to your project use File->Add to Project(Or something like that). Then you choose the files and be sure to check the "Copy files" checkbox so it is included with your project. The last thing you want is missing files.
 
It Worked!!!

Try cleaning the project, deleting the build folder, and removing the app from the Sim/device.

Thanks Phoney!! I had to do all three together to get the ghost files to disappear.
To be clear in case someone else has this issue...
1. Delete the app from the simulator/device.
2. Delete the app's 'Build' folder - simply found using finder and moving it to trash.
3. Cleaning the project from the Build Menu in xcode.

Jman - I'll certainly use File->Add to Project from now on as I think that is what caused the issue in the first place.
 
And the next time you add external files to your project use File->Add to Project(Or something like that). Then you choose the files and be sure to check the "Copy files" checkbox so it is included with your project. The last thing you want is missing files.

Jman - I'll certainly use File->Add to Project from now on as I think that is what caused the issue in the first place.
Dragging-and-dropping a file into a project is no different than using Project > Add to Project... (the proper action). You just need to make sure you have your options set properly, including, almost always, turning on "Copy items into destination group's folder (if needed)".
 
Don't need to erase device's app.

Thanks Phoney!! I had to do all three together to get the ghost files to disappear.
To be clear in case someone else has this issue...
1. Delete the app from the simulator/device.
2. Delete the app's 'Build' folder - simply found using finder and moving it to trash.
3. Cleaning the project from the Build Menu in xcode.

Jman - I'll certainly use File->Add to Project from now on as I think that is what caused the issue in the first place.


I got a similar problem, but mine was:
only Device's default image not deleting.
Simluator works fine.

So I deleted the build folder, then I got the devices's working well also.
Maybe Xcode uses the cached image.

Hison Kahng
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.