iOS loading screen - Default.png - ios

Right now in Xcode I have in my resources and image called "Default.png" and it is working fine as a loading screen for when the app is first opened (awakeFromNib?) Anyways, It's a funny loading screen and I want to give the users at least 5 seconds to gaze at it, however the app only takes about 2 seconds to load even on my slowest testing device, how can I code it in to last longer?

You can't make this loading screen longer without code.
You're going to need to develop a view controller that you will show to the user during 5 seconds before showing the rest of you're app.
So this should be the first UIViewController you present to the user in you AppDidFininshLaunching method.

Sleep(5); in your app delegates applicationdidifinish

Related

Launch screen for iOS

I have read a few posts on this topic about making the launch screen last longer, but I want to make it shorter.
Currently my launch screen takes 4 seconds before loading the login screen, and the app is not even close to being finished yet. Does that mean the launch screen could take longer to load once the app is finished?
Is there any way to make the launch screen appear for 2 seconds?
Xcode, Swift. backend in PHP.
The launch screen loading time depends on how "long" it takes your initial view controller to be prepared.
So, if you want it to "load faster" make your initial view controller more lightweight, do this by:
Reducing the number of interface elements being shown
Do not perform that many operations inside the "view did load" method.
Other than this, theres really not much you can do to control the time.
There isn't really a straightforward way of making the launch screen last shorter, because it depends on how long it takes for the necessities of your app to load.
Remember, the shorter the launch screen, the better, so the users of your app won't think that your app is taking a lot of time to boot up.

Do apps like Twitter implement custom relaunching when opened from background?

I've noticed that when I go off an app like Snapchat, Twitter etc for a few seconds then go back on it, it opens from background as expected, on to the view controller I was last on. However, if I go off the app for more than a few minutes, when I tap on the app it loads the splash screen again and opens the home page.
I initially thought this was standard iOS behaviour, but when I installed my app onto my device I have noticed that even if I go off it for hours, when I come back onto it, the last view controller I was on is shown.
I have thought about checking how long the app was in background by saving times in NSUserDefaults, but don't actually know if this is the right way of going about achieving that kind of behaviour?
Thanks!

My updated ios app just shows splash screen after updating on existing one

We have release our new build day before yesterday and when users updated new app on old app, after successfully installed it was just showing updated splash screen and nothing else. Its not moving further from splash screen.
When i have checked this scenario in development mode by updating new app over old app, its working fine. But i am not aware of this issue after app goes live. So anyone can have idea about how to resolve this issue.
Appreciate all inputs and thanks in advance.
I know its little delayed but i got answer myself. Let me answer here, so others get solution if they have same issue.
If Launch screen (Splash Screen) will take time more than 2-3 seconds, then app will get crash. And why it takes more time because if we write more logic in didFinishLaunchingWithOptions, then it will take more time than ideal time.
So you can increase the time limit of splash screen by writing following code in didFinishLaunchingWithOptions.
- (void) applicationDidFinishLaunching:(UIApplication*)application
{
[NSThread sleepForTimeInterval:5.0];
}
I have set here my time limit to 5 seconds as of my requirement to show splash of 5 seconds. And it solved my issue. Hope this will for your. Cheers - KPCoding :)

Slow launch time - how to navigate Time Profiler

I am developing my first iOS app and I am almost ready to submit to app store. However, I am having problems with launch time. It is taking ~3 seconds to launch. The app has a ContainerView with three UIViewControllers as Child View Controllers. The middle UIViewController is a camera and the left and right UIViewControllers are mostly made up of UITableViews that make basic network queries (not on main thread) to populate them. Basically, I am trying to figure out why my app takes 3 seconds whereas apps like SnapChat and Instagram take <1 second.
I tried seeing what was taking so long using Time Profiler in Instruments. There were a couple easy fixes but now I am stuck. It says 357ms are from main but when I double click on it, it just takes me to AppDelegate and shows me that AppDelegate is accounting for 100% (of the 357ms? - correct me if this is wrong). But this isn't helpful because I know that main() is to launch the app (?) but it isn't telling me anymore. Whereas when I click on other methods listed it breaks it down for me (i.e. what each part of the code is accounting for). This is my first time using Time Profiler and any help would be greatly appreciated.

camera view - can settings disrupt button response on a camera view on iPhone 5S?

I have a strange situation...
I implemented an in-app camera based on Apple's AVCam sample. It works just fine. My question is not about the actual camera implementation, but rather... What could cause a view's buttons to work on one iPhone 5S but fail on another iPhone 5S. Both are using the same build of the app, they have the same iOS version installed (7.0.4), etc.
The problem is...the camera starts and the camera preview displays just fine, but the buttons on that view (i.e. the shutter release, flash options, front/back camera switch, etc) all fail to respond. His iPhone 5S is the only one out of 4 iPhone 5S's that has the problem.
Trying to narrow down what can be different until I can hook the "sad" iPhone 5S up to my debugger in a few days when I see my client again (it's his)... we did notice that my phone asked for permission to access my photos and his did not...
Is there perhaps some system setting that he could have enabled that would cause this check to be skipped? I ask because I wonder if the camera scene's view controller is waiting for something from that check and therefor hanging the UI.
Any ideas would be appreciated
Finally tracked down the issue...
The difference was that on my developer phone, I had a few hundred to 1000 pictures in my camera roll. On my client's phone, he had about 6,000 pictures, so obviously getting those takes longer. If we were patient, the view eventually did come back alive after the enumeration block finished.
Also, I was asking my UICollectionView to scroll to the end (where the newest photos are) after it had finished loading all the camera roll images into itself. With few photos, the timing was fine, but with lots of photos, the timing was off and it was trying to scroll before it had finished enumerating. The solution, since there is no callback for "didFinishReloadingData" was no call the scroll method using -performSelector:withObject:withDelay to ensure that it gets called AFTER the enumeration block and reloadData are finished.

Resources