Launch image displaying after deleteing - iphone

I deleted launch image from launch image option.Still i am getting launch image?I do not know where it is from loading?

You should change the name of your image as would be defaultly saved as Default.png, As xcode changes the name of the image itself whether you add the name of the image yourself or not.
And as The Dude suggested clean your code and reset your simulator if you are working on it and build your project again , then run and see.

Related

Why image not shown in simulator when using XIB designable?

Currently i'm trying to change icon image from designables image
I have main project with bundle com.abc.def (firstbundle)
I put the image on another bundle com.abc.ghi (another framework connected to main project)
When i set the image on viewcontroller (in the first bundle), the image shown in the interface builder. (2nd image)
But when i run it on simulator, the image is not shown. And there is error in console
Could not load the "hide" image referenced from a nib in the bundle with identifier com.abc.def -> This error means, xcode try to find image from first bundle not from second bundle. How to make it also check image from second bundle ?
The problem is only if i using designable option from XIB. If i'm not using it, just define directly inside source code "remove #IBInspectable from the 1st image" (from another bundle). The image shown correctly

How to load image that fails with 'Unable to load asset:...'

My flutter app does not show the album art of my music files that I'm trying to load with AssetImage().
I debugged all the way down to asset_bundle.dart and asset is null as you can see in this debugging screenshot:
When I check out that image file on my phone and open it with any image displaying app it works.
Could the fact that the file ending is missing be the problem?
If so, how can I tell my app to try to interpret such files without a file ending as .png?
If you're curious about the exact code of the project: here

Launch Screen Localized Image not rendering

Problem: The Launch Screen Image is either not rendering (white space where UIImage should be), or not being localized.
My project is set up to load the LaunchScreen from Launch.storyboard via the target's General configuration.
Some facts:
XCode 7.3
Multiple Targets with unique Launch.storyboards.
Tried with two images one was a localized Image.png file (in resources, not in .xcassets), the other was 2 unique image sets in
.xcassets one named "image_en" the other "image_fr".
Some things I tried:
Cleaning the project, resetting the simulator, restarting xcode,
deleting the app's DerivedData.
Created a new Master-Detail project and localized the LaunchScreen.storyboard file. Then added
image_en in en.lproj/LaunchScreen.storyboard and replaced the image
in the fr.lproj/LaunchScreen.storyboard with image_fr .xcassets files
this solved the image not loading problem, but the image was still
not localized.
Created a new Master-Detail project and localized the LaunchScreen.storyboard file. Then I localized the Image.png and added it to the LaunchScreen. This image appeared, but wasn't localized.
Question: Why is a black void appearing in the Launch Screen localized Image.png in my original project? && is this an xcode bug or am I doing something wrong?

Could not load the "" image referenced from a nib

I have no images called "" (nothing). I've gone through the .xib file of the screen where this pops up and can't find anything that would cause this. Anybody who have had the same issue? Here is the full warning:
Could not load the "" image referenced from a nib in the bundle with
identifier "com.blah.Blah"
You can do this to check it from your storyboard, or nib.
Open it as Source Code:
Then "Find" the image name in it, see if it exists but already invalid in your project, probably you have deleted or changed its name, and now it doesn't seem valid.
I had the same issue and in my case there was an UIButton with an invalid image reference in the storyboard file. The reference wasn't empty so it was not trivial to spot by just searching for "" in the storyboard file. However, Xcode did show "Unknown image" for the button in the Background field instead of "Default Background Image". In the storyboard file it appeared as
<state key="normal" title="Use" backgroundImage="0E39AEA8-7F29-40B2-96B1-63B99047E8D5">
so perhaps grepping for backgroundImage and looking for non-familiar references will help find the cause.
I had this warning because of a UITabBarItem. In the attributes inspector for the field "Selected Image" I had a file listed that was also the value for the field "Image". Nevertheless, I received warnings until I made the "Selected Image" field blank.
Just for reference, this problem is also caused by using .jpg images and referencing them inside of storyboards/nibs. iOS 8 appears to be able to handle the proper type checking between jpg and png images at runtime. However, on iOS 7 and below you will need to manually set the image in the code and remove the image reference inside of the storyboard to get rid of the warning.
Remember you need to manually set the .jpg when referencing jpg images.
[self.imageView setImage:[UIImage imageNamed:#"yourImage.jpg"]];
I came looking for the answer. I searched my entire project and storyboard source code for "" and nowhere could I find it. The clue that the view that is displayed when the error appears is the one you need.
Open your xib or storyboard selecting the relevant viewController.
On the left click all grey arrows to expand the selection in your
view
look for the UIImageView icon (its the one with the palm tree)
select it and open the "Attributes inspector" on the right hand side.
In the ImageView section at the top in either or both Image and
Highlighted you will see greyed out "unknown image".
Use the drop down menu to change this from "unknown image" and build
run
voila
The nib (or ultimately the xib) that is the cause of the warning message is the one that is loaded when the message gets written. You then can look at the controls that use images in the inspector and find one where the image name is "Unknown image". You can then clear this value by setting it to some value and then clearing out the value. Note that with UIButton you'll need to try the four different values of "State Config" (Default, Highlighted, Selected & Disabled) to see where the invalid reference might be hiding.
In my case it was Unknown image in UIBarButtonItem in storyboard.
Very simple remove the image that is not displaying from you project and then clean the project by going to Product--> clean then once again put the image into your project and done. this worked for me.
In xcode 5.1 I had this same issue. The only way I could finally get it to work when using storyboard was to add the images as an image asset catalog. From what I read maybe they changed something in 5.1. I thought that storyboards don't have nibs - so it would make sense that asset catalog replaces the old method.
Project > General > App Icon Arrow > Import New Folder.
As soon as I did that the NIB references went away and my images showed up.
I'm using Asset Catalog on Xcode 6. Simply removing and re-adding the Asset Catalog fix the problem
in my situation, in my xib file,I had ever setup image name for some UIButton and UIImageView ,and delete these image name after sometime, but for unknown reason, these image still apear in the Interface Builder Editer, finally I reset these image name with any image name and delete them again,now problem resolved.
This worked for me:
1- Quit Xcode
2- Make a copy of your .storyboard for backup.
3- Open your .storyboard in a text editor and delete image nodes and image node attributes with empty references.
delete node like this --> <image name=" " .../>
delete image attributes like this --> <tabBarItem key="tabBarItem" title="untitled" image=" " id="6"/>
4- Save the file
5- Open your project again in Xcode.
6- Run Product->Clean
7- Run your project
Warning should be gone.
I had a very similiar problem which I eventually found. The line below was causing the problem using the open as source code method mentioned above.
<tabBarItem key="tabBarItem" title="Events"
image="319365D1-7058-46CD-8420-18E0EAFB2F29" id="a5a-IF-j9f"/>
I got this error from an undo action, simply dropping the image back onto the view controller solved the problem.
Atb
In my case it was because one of my button images was wrongly added to the Background Image container instead of the Image container (in the Inspector). I found it by going through the entire storyboard hierarchy and checking each image and button setting.
Please do a search for image= shows various results. Select results from nibs or storyboard open it, if there is some value like image="2342D4DF-1E6B-42B8-847A-F9F622921D02" delete it and enjoy.
i also faced same problem because i edited image in photoshop and saved as a psd format make sure you save your edited images in jpg or png format in my case that was the problem hope it helps!!!
I got this problem for all of my images after switching one of the label's text to 'attributed' and using one of the 'Fun' fonts. Even though I switch it back to 'plain' I still get the "Could not load..." error - until I re-load and re-reference all of my images again.
Initially my image name is "bg" When i found issue, i rename image as "background" but when click on image and hit "Show in Finder"changes was not reflected. image was name as "bg-1.jpg".
so i removed from project convert image to png and drag and drop into
project it works for me.
Believe or not, sometimes this happens because some IBOutlet was removed and in the storyboard have the reference to it.
Make sure the 'Target Membership' for the 'Assets.xcassets' has been selected.
Click 'Assets.xcassets'
In the 'File inspector', make sure 'Target Membership' selected.

Images in iPhone app appear in Simulator, but not when compiled to device

I am learning iPhone development, and have built a simple app that has an image that changes to another image when you tap it.
If i build it to the simulator, it works fine, but if i build it to the device the images dont appear. i feel like they aren't being copied across. I have checked they have been named correctly and i have made sure i imported them to 'resources'
I dont think it is a problem with the code because i added a thing to also make text appear when the image is tapped, and this works, so a button is still there doing something, it just doesn't have an image on it.
-(IBAction)changeImage:(id)sender {
[fortuneCookieButton setImage:[UIImage imageNamed:#"Image2.jpg"] forState:UIControlStateNormal];
label.hidden = NO;
}
-(IBAction)restoreImage:(id)sender {
[fortuneCookieButton setImage:[UIImage imageNamed:#"Image1.jpg"] forState:UIControlStateNormal];
label.hidden = YES;
}
Does the case (upper/lower) of all your file names match exactly for all letters? Source code & project & Mac?
just to share with you, I had this same problem and I found out the solution: I was using lower case in the file name and upper case in code. The thing is on Simulator there was no problem because Mac file system is case-insensitive but in the iPad it didn't work because iOS file system is case sensitive. ;-)
I had this problem. Bizarrely the image had been working in the past, then just stopped appearing on the device one day.
It was a PNG.
I opened it in GIMP and saved it again. Then it went back to working again. No idea why.
Crazy.
Is it the case with only PNG images or also for JPG & other format you're having same issue. If it's only for PNG image, then it might be possible they're not being compressed. Try the following way.
Select your project target & go into its info. Here go into the build tab. In the configuration select "All Configurations" from Configuration section. Now, write "COMPRESS_PNG_FILES' in the search bar. And see the status of the check-box. IF it's unchecked, then make it checked & it will work. But if it's already checked, then there should be other reason in your project.
In the later case, I would request you to create a new dummy project & check by adding 2-3 images whether it's coming or not.
Clear caches delete the previous build and try again.
I also had same problem, and it was caused by a different reason: my project has image files with the same name! Since my app has many images, I inadvertently included images with the same name. Simulator is more tolerant and show the images just fine; however, when built on device, neither of the images of the same name were copied to the build directory. Obviously xcode is more picky for device: since all images go to the same directory, the file names must be different. When there are files with the same name, xcode refuses to copy any of them since it doesn't know which one to pick.
I have the same problem. In my case, the issues is to do with the UILabel above the UIImageView that shows the image. When I change the type of UILabel to AttributedText (In Property Inspector), my real devices cannot load the image. When I change it back to Plain, it works now. I use XCode 6.2.
on top of all suggestions - it wasn't work for me until I restarted the device