Icon.png & Default.png not deleting

Discussion in 'iOS Programming' started by fergusjk, Oct 5, 2010.

  1. fergusjk macrumors member

    Joined:
    Aug 23, 2010
    Location:
    Ayrshire Coast, Scotland
    #1
    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?
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Have you tried doing a clean then a build? Also when you dragged them to Resources did you copy the files? Or create aliases?
     
  3. fergusjk thread starter macrumors member

    Joined:
    Aug 23, 2010
    Location:
    Ayrshire Coast, Scotland
    #3
    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:
     
  4. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    Try cleaning the project, deleting the build folder, and removing the app from the Sim/device.
     
  5. Jman012 macrumors newbie

    Joined:
    Oct 4, 2010
    #5
    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.
     
  6. fergusjk thread starter macrumors member

    Joined:
    Aug 23, 2010
    Location:
    Ayrshire Coast, Scotland
    #6
    It Worked!!!

    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.
     
  7. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #7
    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)".
     
  8. modiolus macrumors newbie

    Joined:
    Feb 25, 2011
    #8
    Don't need to erase device's app.


    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
     

Share This Page