0

I added LaunchScreen to my app, just to try it out and it works with no issues. When I went and removed it just by removing LaunchScreen.storyboard file, launch screen still showed up when I run the app. I then removed it from info.plist file and got an unexpected behavior, now my app appears in non-full screen mode and a bit zoomed in. Plus, I get the warning message that I'm missing default @568.png file. How can I revert to the state before adding Launch Screen? Or just remove LaunchScreen without this warning?

LaunchScreen

Before adding LaunchScreen

Thanks All Dusan

Dusan Juranovic
  • 157
  • 2
  • 12
  • Why did you remove the launch screen? You need either a launch screen or a whole bunch of launch images. Using a launch screen is much easier and is required to support the iPad Pro. – rmaddy Jan 21 '16 at 23:55
  • When I first built the app I had no LaunchScreen.storyboard file at all. The app is for iPhone only. The app started with the first ViewController of the app immediately. – Dusan Juranovic Jan 21 '16 at 23:58
  • As I said, to support all of the iPhone screen sizes, you need either one launch screen file or a whole bunch of appropriate launch images. – rmaddy Jan 21 '16 at 23:59
  • I get what you're saying, but it confuses me a bit, since I had no launch screen to begin with. Problem started only after I added a launch screen from User Interface files and then deleted it. – Dusan Juranovic Jan 22 '16 at 00:02
  • @rmaddy Well, there needs to be something if you have no launch screen. As rmaddy pointed out, you can use image instead of an actual launch screen - as long as there's something there. Why are you removing the launch screen anyways? What was there while you launched the app before you added the launch screen? – Coder-256 Jan 22 '16 at 00:11
  • The app used to go straight to my TableView, without showing any Launch Screen before that. Now I get this a default Launch Screen with my app's name on a white background. – Dusan Juranovic Jan 22 '16 at 00:19
  • I added the snapshot of the present LaunchScreen. – Dusan Juranovic Jan 22 '16 at 00:22
  • Now when i look back, I remember deleting default LaunchScreen.storyboard file when I just started building the app, but I had no issues like this, nor any warnings. It only started when i re-introduced the LaunchScreen. – Dusan Juranovic Jan 22 '16 at 00:32

1 Answers1

0

Have you tried deleting the reference in the field "Launch Screen File" in your app target > "General" section ?

enter image description here

the_critic
  • 12,720
  • 19
  • 67
  • 115
  • I have tried that, but the LaunchScreen still shows up. Only when I delete info.plist entry, the launch screen does not appear, but then i get the warning and the app looks odd. – Dusan Juranovic Jan 22 '16 at 00:34
  • can you elaborate on "the app looks odd" ? – the_critic Jan 22 '16 at 00:35
  • It does not show in full screen (i get black top and bottom) and everything is a bit zoomed in. The app still works, but the alerts are much bigger and generally, everything is bigger. – Dusan Juranovic Jan 22 '16 at 00:36
  • And i get a warning that i'm missing default@568.png file – Dusan Juranovic Jan 22 '16 at 00:37
  • Could you try something that seems a little hacky to me? In the Launch Screen field, specify your main storyboard (for example Main.storyboard). – the_critic Jan 22 '16 at 00:38
  • I tried that too, still the same result. I even deleted the LaunchScreen.storyboard file. Nothing works, only info.plist deletion, but with those side effects. – Dusan Juranovic Jan 22 '16 at 00:42
  • I created a sample project and I can confirm that the app layout is defective after deleting the LaunchScreen file, however, when I specify the Main.storyboard in the LaunchScreen field, the app launches normally (of course there is going to be some screen (white/black) to bridge the time between load and launch) – the_critic Jan 22 '16 at 00:52
  • The storyboard in that case will determine how the launch screen looks, i.e. if the storyboard you specify has a yellow background it will be yellow. It won't have your data and views after viewdidload obviously because it didn't come around to doing that. So for example if you have a tableview in your Main.storyboard and specify that as your launch screen file, the app will show with an empty table view as the loading screen. – the_critic Jan 22 '16 at 00:56
  • Again, this seems hacky to me and I wouldn't use that myself, but if you absolutely need to do it, then I guess this is the way... – the_critic Jan 22 '16 at 00:57
  • That is correct, I get the same behavior, but oddly enough, when i specify Main.storyboard in LaunchScreen, that gap is still loaded with LaunchScreen with my app's name. When I delete the info.plist entry for launch screen, I still get the warning about missing png, which again disappears after I do the Main.storyboard in LaunchScreen field again. Its like an infinite loop. One doesn't go without the other. Main.storyboard in LaunchScreen field solves the problem of defective layout, but the default LaunchScreen with apps name 's still there. The choice is one or the other I guess – Dusan Juranovic Jan 22 '16 at 01:03
  • I don't really get what you're saying. If you specify Main.storyboard for LaunchScreen and Main Interface, what happens ? In the sample project I set up, this seems to work fine... Can you elaborate on your issues ? – the_critic Jan 22 '16 at 01:06
  • Ok, first. The only way to get rid of launchScreen is to delete the "Launch screen interface file base name" from info.plist file. When I do that, I get the warning "Missing "Default-568h@2x.png" launch image". Then i set Main.storyboard in LaunchScreen field and the warning disappears, but the entry for "Launch screen interface file base name" reappears in info.plist. After all that I get the same behavior, LaunchScreen shows up before my app launches. – Dusan Juranovic Jan 22 '16 at 01:12
  • If I choose to ignore the warning, I get defective layout – Dusan Juranovic Jan 22 '16 at 01:12
  • Forgot to mention, both Main Interface and Launch Screen File are set to Main.storyboard – Dusan Juranovic Jan 22 '16 at 01:17
  • The launch screen is there for a reason, again, the time between the OS loading your app and your app being loaded needs to be bridged. So even if you don't specify anything it will show a launch screen that you specify as the Launch file. As of iOS8 this file is required, and the OS will make assumptions about the screen size based on that. Thus your only options remain having the `Main` as the launch file. Also notice that the file reference in the picture I posted in the original answer is `LaunchScreen` (without `.storyboard` extension!), so make sure you don't use an extension there. – the_critic Jan 22 '16 at 01:21
  • Yes, I understand that and I thank you for your help. It's just a bit confusing for me that before I added the LaunchScreen.storyboard file I had no issues like that and there were no LaunchScreen launching before my app does. And now I can get back to that same state of the app. I guess Im stuck with that launch screen. Thanks again for your input. – Dusan Juranovic Jan 22 '16 at 01:24