iOS (iPhone) clear images from application cache - iphone

I have problem with images on my iPhone when I delete it. I clear image from disk, I remove reference in XCode, I delete app from my iPhone and when I run app again the image is still there.
Any suggestion how I can completely remove image from my project?

Lit sounds like you are adding images to your Xcode project and copying them to the app. Then you removed them from Xcode and observe that they aren't removed from the app.
In this case, clean the project.
Xcode isn't very good at removing files from an already built app when the source file is removed from the project.

Related

iOS Launch Screen Asset Catalog not working

I believe I am making a silly mistake. But I cannot figure it out.
I have an image named Default.png that I have added to my project. Now when I go to General and then Launch Images I drag and drop this Default.png to the 2x window for my app. When I go to build the project and try it, I get this error:
"The launch image set named "LaunchImage" did not have any applicable content."
What's the problem here? I've also seen that simply dragging and dropping the Default.png should do it, but I think that's for older versions.
Any ideas?
Thanks
Search for LaunchImage keyword in your .plist file and delete it. Then, try assigning the image again by dragging as you already did before...
This case raised in Xcode 5.0 + iOS 7.
Apple use Images.xcassets to group App Icons, App Launch (Default) Images in Xcode 5.0 + iOS 7.
For solving the problem of Asset Catalog Compiler Error
The launch image set named "LaunchImage" did not have any applicable content.
Approach:
Putting suitable size of images into LaunchImage.
For example:
Should be 640x960 dimensioning in iPhone Portrait iOS7 2x.
Should be 640x1136 dimensioning in iPhone Portrait iOS 7 R2.
Reference from iOS App Programming Guide:
Create and Set iOS Launch Images
Launch images are displayed while your app is launching on iOS. A launch image matching the device resolution appears as soon as the user taps your app icon.
App Launch (Default) Images
Specify the launch images for your app in your Xcode project settings. In Xcode 5.0, specify these images on the General tab of your project settings; in older versions of Xcode, this tab may have a different name. Xcode places your launch image files at the top-level of the app bundle and configures other project settings as appropriate. Specifically, Xcode adds the UILaunchImages key to your app’s Info.plist file automatically if your app runs on iOS 7 or later. That key tells the system the name of your app’s launch image files. For earlier versions of iOS, the system uses the launch image filenames to decide which image to load.
The same error has been resolved by adding the exact sizes of launch images for different iOS devices.
I tried everything here, deleted the .app and rebuilt each time, and nothing worked. I finally got fed up and switched back to the old style of launcher image specification (Project Settings Window -> General -> Launch Images -> Source -> Don't use asset catalogs.) That worked!
I had this problem as well. Make sure of a couple of things:
Aspect Ratio is what Apple expects, in other words square
The sizes are correct, 60pt (for example) should be 60x60
60pt #2x should be 120x120
After I fixed the sizes the app compiled without errors but I think the most important thing is the aspect ratio.
In my case, with Xcode 7, the Images.xcassets was missing from the Build Phases, under Copy Bundle Resources. Then I just added it manually and the problem was gone.
Try looking at the code for "LaunchImage" and rename it to "Default"
Check and compare carefully if your image size matches the expected size. In my case I was using a wrong size, but when correcting the project built fine.
Check this attached image to see where you can compare them

App icon not showing up on iPhone 5 device during testing

I have a 120x120 icon image that's working fine on emulators - however when I try it on my device, the icon doesn't show up. Any thoughts?
I figured it out. This was actually really annoying. So the UI designer had simply renamed his .psd files with .png and xcode thought this was fine. However, renaming the .pngs isn't going to automatically make them real .pngs. The way I solved this was going to mac preview and exporting the files to the PNG format.
Sometimes some of the images get cached by the OS.
Delete your app completely from your mobile device (press and hold, then delete the app)
Turn off your device and turn it on again.(This ensures that the cache gets cleared)
In xCode, clean the project and rebuild.
Load the software again you your device.
You should be able to see your icon as long as its properly added to your project.
Drag your app over another app to group both into a folder. Then drag the app out of the folder.
Check your info.plist file. Make sure the icon entry looks something like this (use your own image file names of course):
If you see another "Icon already includes gloss effects" row outside, remove it.
It is not uncommon not to see your app icon on the device. However, when your app is being uploaded to the App Store, everything will be fine.
Is your iOS device running iOS7? If not, you will need to include 57x57 and 114x114 icons as well. See https://stackoverflow.com/a/18737063/1646862 for icon sizes apple requires. It is always good to include all icon sizes you may need in your iOS bundle.

Images displaying incorrectly in iPhone Simulator

When I run my iOS app in simulator after updating numerous images within the application the images being displayed are still the old one. What must be done in order to properly update the images loaded into the simulator?
try Xcode menu:product:Clean
if not enough go to Xcode preferences:locations tab:
click on the little gray arrow below derived data
then in the finder selected folder delete all files...

iPhone App finds and loads image not inside .app

I've taken an existing iPhone app, and stripped it down to become a "New App" starter project. It has a loading screen, which references an image called "Loading_Background.png". But when I go to the .app and do "Show Package Contents", I don't see any image with this name. There isn't an image with this name in the Copy Bundle Resources in the project, either.
How is the iPhone finding and loading this non-existent image? Is it somehow finding that image in the original application which is installed on the same iPhone?
Try a clean build (and also delete the app off the iphone) sounds like you are getting something from a past build.
Possibly. If you keep the same Bundle ID, your iPhone can confuse the two apps.

iOS SDK 4.1 UIImageView differences?

I just upgraded to iOS 4.1 SDK and now when I run my app in the simulator one of the images (the only one really) that was working fine before the upgrade is no longer showing up in my view. I've tried removing the file and re-adding it to the project, cleaning all targets and running a build, and making changes to the XIB where the UIImageView is configured to for it to recompile it, but no dice. It's worth noting that my Tab-Bar images came through just fine. Any ideas?
If the UIImageView is created inside a .xib, open it up in Interface Builder: can you see the image in the "preview"? If not, then it can't find the image to begin with. Perhaps the file has been renamed?
Look inside the application bundle in the Finder. Is your image file present? If not, is it still referenced in your project? Check Xcode to make sure the file name isn't in red (i.e. missing).
Maybe they've changed the 4.1 simulator to be (or rather, pretend that the filesystem is) case-sensitive?
Does the app work on a 4.0 device?