In iOS there is an LaunchScreen before you're app is ready. Can you add things to do (Code) to this?
I want to execute a JSON request on LaunchScreen but have no idea where to put the code.
Thanks In Advance, Kaaseter
As you wrote, LaunchScreen is there before your app is ready and it implies that you can't execute your code in this time.
To achieve something similar, copy & paste content of your LaunchScreen into your initial view controller in your Main storyboard (or whatever you do use) and launch your request in initial view controller and then transition to any other view controller.
User is not going to notice LaunchScreen -> Main transition.
Purpose of LaunchScreen is to just replace splash images with something better where you can use auto layout for example, ... In other words, to minimize your work, so, you're not forced to create splash screen for every device screen size, etc. But you are not allowed to run any logic in LaunchScreen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With