Hi,
I've tried to add a launch screen to my app but can't get it to work consistently:
- On simulators, it works all the time (all iPhones and iPads including iPad Pro)
- On my iPad Air, it works the first time I install the app after a fresh restart. Then, when I run it a second time, I get a black launch screen before the main interface appears. Remove app, run again (reinstall), black launch screen. Restart iPad, run app, black launch screen. Remove app AND restart iPad, run again: correct launch screen. Run it again, black screen.
In the system logs, I find multiple entries like:
Dec 2 23:19:50 iPad-van-Marina-van-Vugt splashboardd[191] <Error>: ImageIO: CGImageReadCreateDataWithMappedFile 'open' failed '/var/mobile/Containers/Bundle/Application/1B97BA77-69A0-4B78-920C-DF8560F779C4/Kaodoku.app/Splash@2x.png'
error = 2 (No such file or directory)
However, the same image is used within the app where it is loaded just fine, so it's definitely there. With the correct capitalisation and everything.
I just tried another experiment: Remove app, restart iPad, run app, kill app using device (2 x home button, swipe up, then "Step over" in Xcode to finish it), tap on app icon. Works OK. Killed and restarted app several times, still OK. Run again from Xcode: black launch screen. Every next attempt at launching with any method yields yet another black screen.
On my iPhone 5, the launch screen seemed to work fine with multiple runs ("Run" from Xcode), until I tried "Run" while holding the device upside down. Now I got a black launch, and every subsequent launch in normal orientation is black as well. Only way to get a correct launch screen again is delete app and restart device.
I've already read a few threads on this forum and other developer forums and tried to follow the suggestions. I had first tried a storyboard, but then followed a suggestion on these forums and used a xib instead (deleting the storyboard). So now I have "LaunchScreen.xib" (which becomes a nib in the compiled app) and a plist entry "LaunchScreen". I've selected "Use as launch screen". I've tried entering it as "Main Interface" but removed it again since that didn't help. I've changed the launch image set (for older iOS versions) to only include iOS 6.0 and prior (since a post on some other developer forum suggested that). Nothing changes anything.
Thanks for any help,
Michel Colman