app still contains and uses removed files

Discussion in 'iOS Programming' started by beige matchbox, Mar 3, 2011.

  1. beige matchbox macrumors 6502a

    beige matchbox

    Joined:
    Mar 16, 2005
    Location:
    Oxfordshire, UK
    #1
    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?
     

    Attached Files:

    • err.jpg
      err.jpg
      File size:
      76.6 KB
      Views:
      91
  2. ClutchThese macrumors 65816

    ClutchThese

    Joined:
    Jun 25, 2010
    Location:
    Alexandria, VA
    #2
    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.
     
  3. beige matchbox thread starter macrumors 6502a

    beige matchbox

    Joined:
    Mar 16, 2005
    Location:
    Oxfordshire, UK
    #3
    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:
     
  4. ClutchThese macrumors 65816

    ClutchThese

    Joined:
    Jun 25, 2010
    Location:
    Alexandria, VA
    #4
    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?
     
  5. beige matchbox thread starter macrumors 6502a

    beige matchbox

    Joined:
    Mar 16, 2005
    Location:
    Oxfordshire, UK
    #5
    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:
     
  6. ClutchThese macrumors 65816

    ClutchThese

    Joined:
    Jun 25, 2010
    Location:
    Alexandria, VA
    #6
    lol, i hear ya!! i can get frusterated pretty quickly over something like that too. anyway, happy coding!
     

Share This Page