Couldn't load image...

Discussion in 'iOS Programming' started by ArtOfWarfare, Dec 13, 2011.

  1. ArtOfWarfare, Dec 13, 2011
    Last edited: Dec 13, 2011

    ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #1
    Everything looks fine for this image in the following places:
    - Finder
    - Preview
    - The Interface Builder portion of Xcode
    - iOS Simulator (both iPhone and Retina iPhone... they're running iOS 5.0)

    but when I run it on my iPhone 4S running iOS 5.1, I get this message:
    Code:
    2011-12-13 15:48:16.788 QuickClip[596:707] Could not load the "SnowKey.png" image referenced from a nib in the bundle with identifier "com.TaylorMarks.QuickClip"
    I've attempted the following things to fix it, none of them have made any difference:

    - I've cleaned targets.
    - I've removed the images from my project, and then dragged them back in again.
    - I've uninstalled and reinstalled the app from my iPhone.

    Every other image for my app loads just fine, only "SnowKey.png" (and presumably "SnowKey@2x.png", given it's a retina device where it's not working,) aren't loading.

    While I wait for suggestions I'm going to try seeing if the images load fine on my old iPhone 3GS... afterwards I might just try renaming the files and see what that does...

    Edit: Alright, I've now attempted loading it on my iPhone 3GS and found that the image also doesn't show up there... so... any suggestions?

    2X Edit: I looked at the .app bundles and was surprised to find that the .app in /Debug-iphonesimulator/ included SnowKey.png, but the .app inside of /Debug-iphoneos/ didn't include SnowKey.png. Any suggestions as to why that would be? I feel confident this is the issue that needs to be resolved...

    3X Edit: I deleted the build files completely... and it solved nothing. SnowKey is still not being copied into the .app in /Debug-iphoneos but is being copied into the .app in /Debug-iphonesimulator/... this is frustrating...
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Did you copy the files into your app bundle or just link them? That is, was your "Copy items into destination group's folder (if needed)" checkbox checked or unchecked?
     
  3. ArtOfWarfare thread starter macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    I would guess unchecked, given that seems to be the default. I didn't do anything different each time.

    In any event, I got it to work by renaming the image files "RainKey" instead of "SnowKey".

    Maybe using the name Snow is somehow reserved? Or maybe I did the wrong thing when importing them?

    Question: If I did the wrong thing (I linked when I should have copied or vice/versa,) how could I go back and change that without deleting them from my project and then adding them again?
     
  4. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    When it doesn't show up mostly it's just a simple typo..
    Or, it's not in your copy bundle resources.
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    Normally, you want to leave this checked.

    Without deleting them? You can't. Delete them and re-add them. That's the only way.
     

Share This Page