What's wrong with my asset catalog containing launch images?
I’m not using storyboards here, for reasons that would be a distraction to get into. I’m instead trying to add four launch images to an asset catalog:
My app doesn’t support iPads or 3.5-inch iPhones, so these should be sufficient. Is that fine or do I need landscape as well?
Here are the properties of each of the images:
Here’s the same information in textual form:
filename: LaunchImage.launchimage children: filename: 5.5.png idiom: iphone subtype: 736h scale: 3x orientation: portrait extent: full-screen minimum-system-version: 8.0 image: height: 2208 width: 1242 filename: 4.7.png idiom: iphone subtype: 667h scale: 2x orientation: portrait extent: full-screen minimum-system-version: 8.0 image: height: 1334 width: 750 filename: 3.5-inch, 2x-1.png idiom: iphone scale: 2x orientation: portrait extent: full-screen minimum-system-version: 7.0 image: height: 960 width: 640 filename: 4.png idiom: iphone subtype: retina4 scale: 2x orientation: portrait extent: full-screen minimum-system-version: 7.0 image: height: 1136 width: 640
Here’s how my app is configured:
When I run the app on the iPhone 7 Plus, I see the 4.7-inch launch image. Why is this happening, and how do I fix it?
I tried using plain PNG files without putting them in an asset catalog, but that doesn’t work, either, as discussed in this separate question.
Note that unlike other questions asking about this:
I’m not using xibs or storyboards, for reasons that would be a distraction to get into here.
I’m using PNG files wrapped in an asset catalog, as opposed to plain PNG files in the top-level directory.
I support only iOS 10 and above, which means I don’t support 3.5-inch phones.
I don’t support iPads.
I’m using Xcode 8.3 and running iOS 10.3 on my phone.
- I get an error “None of the input catalogs contained a matching launch image” in xCode5-iOS7
- Is it okay to leave out unnecessary launch images?
- Can't submit the app with storyboard launch images to the App Store: Your binary is not optimized for iPhone 5
- LaunchImage in Images.xcassets with Launchscreen.xib
- iOS8 icons sizes and names for icons and launch image
- Launch Image not showing up in iOS application (using Images.xcassets)
2 Solutions Collect From Internet About “What's wrong with my asset catalog containing launch images?”
I had an issue very similar to this recently, where my 4.7″ iPhones were unable to load the 667h launch image and fell back to the size it could, being the 538h. Since iOS uses the presence of static launch images as one of its determinations for what resolution to display the app at, the app ended up coming out all blown up in resolution.
It doesn’t sound like you’re hitting that latter consequence, but I can share my fix: re-evaluate the color space you used to export those images and try exporting them again. I wasn’t able to pin down the exact reason why the images were an issue for the platform, but re-exporting and cleaning helped. In addition to the color space, did you perhaps use a Save for Web option? I also found that affected things for us.
Have you tried cleaning the project and the build folder, deleting derived data, removing the app from the device and restarting Xcode?
Might sound like a silly suggestion, but this has fixed so many things for me in the past.
- NSDateFormatter milliseconds bug
- How to get list of available Bluetooth devices?
- convert date string to NSDate in objective c/iOS
- how to change the color of backBarButtonItem?
- Issue with returning a Directory Enumerator from NSFileManager using enumeratorAtUrl in Swift
- How do I import and read a file in my iOS app?
- Xcode 8 with mixed Swift and Objective-c project generated “ModuleName-Swift.h” header not found
- Why do I keep getting this error for my bridging Header in Xcode 7: Bridging Header does not exsist?
- AVFoundation tap to focus feedback rectangle
- Linking Error in Xcode
- View Controller Loads Twice – How Do I Fix It?
- Assertion Failure in UITableViewController
- 403 Error – Thats an error. Error: disallowed_useragent
- Swipe To Delete TableView Row
- How to turn flashlight on/off using one button?