Failed to load the image associated with the tip in the kit running on the device

SplitView [1290: 307] Failed to load image "canary04.png" referenced by the pen with the identifier "xx.co.mycompany.ipad.SplitView"

I get only an error when starting on the device. there are no problems in the simulator.

I use the image directly in the interface constructor with UIImageView.

UPDATE: I added another new image to another pen, and it works without problems.

Does anyone have any idea?

+63
objective-c iphone xcode
Jan 31 '11 at 17:11
source share
34 answers
  • one
  • 2

The file system on iOS devices is case sensitive, so it’s quite possible. (Mac OS X is usually case sensitive, so you have not seen this problem in the simulator.)

Thus, make sure that you use the same code in the code as the file name.

+28
Feb 01 '11 at 11:26
source share

It cannot be added to your target, and in Xcode 4 you can do it like this:

  • In the Project view, click the name of your project.
  • Select your goal and select the "Generate Phases" tab.
  • Drag the image file into the Bundle Copy Resources section.

This fixed it for me.

+130
Apr 30 2018-11-11T00:
source share

Do you have an image in a folder with links in Xcode (blue folder)? If so, you should specify the name of the folder in the image path, something like "Images / canary04.png"

+20
Jan 31 '11 at 18:06
source share

Easy way

1 Just run grep in the shell to find the link image line:

grep -R 'canary04.png' YourMainDirectoryFolder/* 



2 This will give you (for example) output similar to this:

 YourProject/en.lproj/YourViewController.xib: <textField borderStyle="roundedRect" background="canary04.png" id="19"> 

3 Now you know which nib file and which element it is. Just go to the file and delete the link.

+14
Oct 17 '13 at 3:01
source share
  • Delete the blue folder where the image is located.
  • Import again and select "Copy items if necessary."
  • Select Create Groups Folders NOT
+8
Apr 18 '15 at 0:56
source share

Save image as PNG-24. It works for me

+5
Aug 29 '13 at 15:58
source share

You can do this to check it out on your storyboard, or nib. Open it as source code:

enter image description here

Then "Find" the name of the image in it, see if it exists, but is already invalid in your project, you may have deleted or changed its name, and now it does not seem correct.

enter image description here

+5
Jan 14 '14 at 4:03
source share

Have you included the file in the target? Right-click on your goal in Xcode, select "Get Information" and select the "Goals" group at the top. Make sure your chosen target is verified.

Good luck.

EDIT: The text above should be read. Right-click the file (canary04.png) in Xcocde and select Get Info ...

Sorry for the typo.

+4
Jan 31 '11 at 18:14
source share

I had this problem when I upgraded to Xcode 4.4.1. I found that although I deleted the images (and the corresponding buttons, etc.) in the storyboards, they were still mentioned in my storyboard files (in the tabBarItems field). I manually commented on them (), Product -> Clean, and I no longer got errors.

I knew that there should be dummy links in the storyboard, as I previously deleted my TabBar, and the current application worked without problems, just with annoying messages in the console.

+4
Sep 06 '12 at 20:18
source share

I had the same problem. try

  • clean
  • create and run

he worked with me

+3
Nov 07 '12 at 8:40
source share

In my case, this was because Photoshop did not save my files correctly. In the save file dialog box, I clicked on the file myfile.png to overwrite this file, and it saved the file with the extension png, but in photoshop format.

I had to change the file format to PNG before clicking on the file that I would like to overwrite, thereby saving it to a real png file, thus readable by iOS. Interestingly, the build interface showed my psd-as-png files just fine.

In general, make sure that your file, in fact, is in the format that you think so, and therefore, it is expected that iOS expects.

+3
Mar 08
source share

Solution 1:

In my case, I copied the folder containing the images, and even checked "Purpose: copy items if necessary." However, it was not added to Copy Package Resources in Build Phases.

You can add images as follows:

  • Choose goals
  • Select the "Generate Phases" tab.
  • Select Copy Bundle Resources
  • Click the "+" (Plus) button just below it.
  • Find images and add them

Screenshot for solution 1

Solution 2:

Delete images by selecting Move to trash. Add the images to your project again with the mark "Purpose: copy elements if necessary."

 Note : Make sure that you add images in Assets.xcassets folder and not outside it. 
+3
May 21 '15 at 6:56
source share

I also got this error. I will describe my scenario:

I have a subdirectory "img" in which there are several png. One of these png is "ic_timeprogress_000.png"

In the storyboard (visual designer), I had an ImageView, and the image was set to "ic_timeprogress_000.png" (not programmatically). The designer correctly displayed the View image:

imageView in subdirectory

Although the error was reset when starting the application.

So, in the storyboard, I changed (I insist: not programmatically) from "ic_timeprogress_000.png" to "img / ic_timeprogress_000.png", which leads to incorrect display of the image in the designer, but displayed correctly at startup (without errors)

imageView in subdirectory

Although I modify imageView.image programmatically, this "initial image" is never used.

+2
Jun 04 '15 at 16:38
source share

Make sure canary04.png exists in your project and that it has not been deleted.

+1
Jan 31 '11 at 17:18
source share

My problem was that I saved the image as .jpg and changed the name to .png (still in jpg format). He worked with a simulator

+1
Aug 2018-12-12T00:
source share

Check the image name. If it contains some spaces, then the image will be displayed while working in the simulator, but not in the device. During startup, it checks the case-sensitive name, etc.

+1
Jan 10 '13 at 13:44
source share

I had another problem in iOS 8. In my case, the problem was that I selected Device Specific for the image set and then chose the iPad. Changing this setting to Universal fixed the problem.

This parameter can be found in the images.xcassets file, the third column shows the attribute inspector for a set of images.

In this case, the images will not be displayed in the storyboard or NIB file, even if you added them to images.xcassets. They will also not be displayed in the simulator or device.

+1
Nov 10 '14 at
source share

I ran into this problem when I tried to install an imageView image file in an Interface Builder (.xib) file.

(I used Image Assets)

I had 2 images with theImage.jpeg and theImage@2x.jpg The Builder interface can display true images at compile time with these jpg / jpeg formats. But I have this runtime error:

 Could not load the "theImage" image referenced from a nib in the bundle with identifier "org.etc.etc" 

Then I changed my image file formats to .png and it will work!

Try this solution if you have different formats for the images you are trying to install.

+1
Dec 24 '15 at 2:02
source share

I also ran into the problem that jpeg files could not be downloaded successfully, however I solved it without changing them in png format: for example, if you have an image named "bg.jpg" , don’t use "bg" in storyboard (this name is listed in the drop-down list), you should instead explicitly write "bg.jpg" in the name field.

For image-based programming, I assume that using the .jpg extension, for example [UIImage imageNamed:@"xx.jpg"] , should also work (I have not tested).

+1
Dec 25 '15 at 8:10
source share

Try to clean the project and make sure info.plist matches xx.co.mycompany.ipad.SplitView

0
Jan 31 '11 at 17:19
source share

Check the image name. Then check if you can open the image yourself in paint or in Photoshop. If the image was created in Photoshop and there were layers, sometimes there is a conflict with .png

0
Jan 31 '11 at 18:01
source share

I had the same problem, if your images are inside subfolders, you need to select the option "Create groups for subfolders" when copying resources.

0
Sep 07 '11 at 3:30
source share

I have this problem with Xcode 5, and it seems that "Combine High Resolution Images" is the culprit. I opened the application package and all the images were * .tiff, which caused the image to not be found: S

Fix

Open your project’s settings and search at the top for “combine”. Change this parameter to NO.

enter image description here

For some reason, everyone is missing this significant fix.

0
Dec 06 '13 at 18:37
source share

In my case, all images where fines are displayed on s> iOS 7 devices, but not with iOS 6.1. The solution was that iOS7 is case sensitive, but iOS 6.1 is not for me. I had images with the name "myImageName" and also "myimagename", because my old iPhone 3 could not display these images.
Therefore, renaming them solved.

0
May 13 '14 at 7:45
source share

Tried every answer here and nothing, therefore there is a different glitch, your icon name cannot have periods (.), Because if it is (and Xcode allows you to do this!), While the icons display well in the storyboard, they won Do not download either the simulator or the device.

0
08 Sep '14 at
source share

Perhaps after you set the button image, you changed the image name.

0
Mar 10 '15 at 8:05
source share

2015 - Still a problem. I referred to an image that no longer existed on one of the tabbed buttons.

Solution: Just check all your buttons, UIImage, etc. And make sure that the image you are linking to does exist in your project.

0
Mar 30 '15 at 8:35
source share

I had this problem when I accidentally added another image installed in the object directory file. I renamed it after I realized the error, but it doesn't seem to work.

Deleting the file and adding it again solves the problem.

0
Apr 02 '15 at 17:12
source share

what worked for me, make sure the file owner in the interface builder has a "view".

From IB, select the file owner from "Placeholders", then in "Insints Connections" make sure that the viewing socket is connected to the main view of the current XIB.

This happened because I deleted the main view at some point and forgot to reconnect the new view.

Hope this helps someone else.

0
Apr 13 '15 at 12:26
source share

In my case, the problem was in the image format. They were "jpg" files, and Xcode was expecting "png" files. Changing the file format fixed the problem.

0
Apr 29 '15 at 20:20
source share
  • one
  • 2



All Articles