Migrating iOS Launch Images to LaunchScreen.storyboard: Preparation, Technical Solutions, and Common Issues
This article explains Apple's requirement to switch to LaunchScreen.storyboard before June 30 2020, compares LaunchImage and LaunchScreen.storyboard, details the preparation steps, presents three implementation approaches, and discusses device‑specific layout problems and cache‑related black‑screen issues with code examples.
Apple announced that all iOS apps must use a LaunchScreen.storyboard for the launch screen before June 30 2020, replacing the older LaunchImage method. The article first outlines the technical background: LaunchImage appeared earlier, while LaunchScreen.storyboard was introduced in iOS 8, has higher priority, and offers more flexible layout.
Preparation work includes removing the old launch image settings from the project, deleting legacy launch images from the asset catalog, configuring the new storyboard in the project settings, and optionally clearing cached launch screens in /Library/SplashBoard and /Library/Caches/Snapshots during app launch.
Technical solutions for the new launch screen are:
Use a single image with aspect fill – minimal resources but may cause cropping on different screen sizes.
Create an image set containing multiple resolutions for iPhone and iPad – avoids stretching but increases app bundle size.
Split the launch assets into separate UI elements (labels, image views) inside a normal storyboard – provides the best adaptation and keeps the bundle small, though it requires more work when the splash changes.
The author recommends the third approach as the most reliable and notes that Apple also suggests it.
Device‑specific issues are described, especially with the iPhone XS Max 12‑inch model where the home page UI is stretched beyond the safe area, while the XS Max 13‑inch behaves correctly. The problem was traced to a macro used to detect notch screens:
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];
if (!Is375x812hScreen()) {
self.tabBar.frame = CGRectMake(0, KScreenHeight - kDSTabBarHeight, CGRectGetWidth(self.tabBar.frame), kDSTabBarHeight);
}
}
#define Is375x812hScreen() (ABS((double)[[UIScreen mainScreen] bounds].size.height - 812.f) < DBL_EPSILON || ABS((double)[[UIScreen mainScreen] bounds].size.width - 812.f) < DBL_EPSILON)Updating the macro to also consider the 896 pt height resolved the issue:
#define Is375x812hScreen() (ABS((double)[[UIScreen mainScreen] bounds].size.height - 812.f) < DBL_EPSILON || ABS((double)[[UIScreen mainScreen] bounds].size.width - 812.f) < DBL_EPSILON || ABS((double)[[UIScreen mainScreen] bounds].size.height - 896.f) < DBL_EPSILON || ABS((double)[[UIScreen mainScreen] bounds].size.width - 896.f) < DBL_EPSILON)Black‑screen problems are also discussed. When downgrading an app version after changing the launch screen, the screen may stay black because iOS caches the previous launch assets. The article lists attempted fixes (clearing asset caches, renaming files, removing splash‑board caches) and concludes that the only reliable workaround is to uninstall the app or wait for an upgrade, as the cache behavior is controlled by the OS.
Overall, the guide provides a step‑by‑step migration path, code snippets, and troubleshooting tips for developers moving from LaunchImage to LaunchScreen.storyboard in iOS projects.
Huajiao Technology
The Huajiao Technology channel shares the latest Huajiao app tech on an irregular basis, offering a learning and exchange platform for tech enthusiasts.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.