IOS app only takes up full screen after second launch - ios

I'm developing an app using Cordova. When I launch the app for the first time on a device (both simulator and live), there is a black border and the content is shrunk. If I exit it and relaunch it a second time, the app takes up the full screen as expected.
Also, when I run it in the simulator on an iPad, it is offset down and to the right slightly. Some content ends up cut off. How do I correct this?
I have tried it with and without viewport-fit=cover and with and without the splashscreen plugin.

Related

iOS App shows black screen after succesful install on device using Xcode 12.5

I am trying to install an app using Xcode 12.5 on my personal device which is an iPhone 7 plus running iOS 15 underneath.
I got it to work after much hassle by adding iOS 15 device support files, but, after the app installs and launches itself, I get a black screen for like a minute or two and then the app works fine.
However, if I debug it takes approximately 30-40 seconds from jumping to one breakpoint to another and it consumes a lot of time.
I have tried scouring for a lot of information on this but no luck. Any solution for this would be appreciated.
You probably disabled your Splash screen that is why black screen appears.
Go in your LaunchScreen.storyboard file, there you will find a Screen Controller. Make it story board entry point and give it a background color of your choice.

Choosing Launch Screen File in Xcode makes my app launch slow on iOS

I have an app I'm about to launch to the Appstore, however, when I created an archive of my app in Xcode (developed in PhoneGap), it automatically compiled asset catalogs for icons and splash screens, and set the launch screen image to MainViewController in the settings. Because of that, my app takes a few seconds to launch after I tap the app icon on my phone and it doesn't show the splash screen (which worked perfectly when Launch Screen File was empty). Now, when I remove the Launch Screen File, my app launches quickly and normally, shows the splash screen, but now my app appears completely zoomed in.
How can I fix this? It's really annoying.
EDIT: Someone suggested an edit saying this has nothing to with Cordova. But it might. This app was built using Cordova CLI. When it was freshly built, no launch screen file was selected, but the app did't zoom in as it does now, when no launch screen file is selected. How can Cordova make an app appear normal without a selected launch screen file, but does it not work after archiving?

iOS app not displaying correctly iPad

I am working on an App which should be able to run on iPhones and iPads.
I have been able to run it on iPhones and it is displaying perfectly. But when I run it on an iPad the App itself is very zoomed in. I am not sure what main issue.
This is how it displays on iPad:
And this is how it comes up on an iPhone:
Any idea how to fix it or what the issue is?
Your app isn't made to run on the iPad. When displayed on the iPad, it just stretches the display of the iPhone version (you can see that by the 1x button on the lower right corner of the screen). You need to setup your XCode project as a Universal App (instead of it being just for iPhone) and then you'll be able to take advantage of the entire iPad screen and design the display especially for it.
You can set the app as Universal on your project properties in XCode:

Black screen showing instead of LaunchScreen.xib

I'm trying to make my file LaunchScreen.xib show as the launch screen of my app. Whenever I run the app for the first time (where you run the app, and the simulator loads up for the first time), the splash screen is not shown.
There's one black screen before the simulator loads, but then there is a second black screen before my app loads. If I run the app again, after the simulator is loaded, the launch screen displays with no issue. However, if the black screen shows the first time, users will assume the app is not working, hence why this is a concern.
These are the settings I am using for my launch screen.
All help appreciated.
It is just Xcode's fault. While starting the app Xcode attaches its debugger and does some communication and a lot of other stuff. It is very possible that the launch screen is not displayed during that time or just for a split second.
If you just have the app on the device, completely quit it and then start it again, the launch screen should show up as expected.
There is no issue. The simulator load with blackscreen, it's not belong to your application. (os loaded at that time). After simulator loaded os, it launches your app with your laucnh screen

App starts and the device screen goes black sometimes

This is a very strange bug. I'm running my app on an iPhone device and only sometimes, when the app starts, you can see the app for a freckle of a second and then the screen goes black.
Any advice?
If you have call any thread or block the main thread to be execute, then for some second your screen will be blank. To avoid that add some splash screen shot, like FaceBook shows. Replace Default launch images. Default is blank, so it shows black screen. If you make required size screen shots then it will not shows black screen when app launch.
I do not know exactly why this happens but I develop an app and testing on several devices like 4, 4S,5,5S(iOS 7.1, 8.1) and get same black screen as you get after I change device. My solution is always "quit from simulator and open it again" when I do like this it works fine (Sometimes 3-4 times). I guess there is nothing to do by user. My thought, Only apple can solve this problem if we lucky :)

Resources