App launches slowly on iPhone 4/4s at first launch - ios

I am observing a wierd issue on iPhone 4/4S and sometimes iPhone 5/5S too. App launch time (at splash screen) is more than usual. I have compared and after installing (first fresh install) it takes about 7-10 sec at the launch image. That is too much and I am worried about my app rejection. (even if not rejection than its a bad user experience for sure).
On iPhone 6/6s it is fine. From the second launch it takes normal acceptable time of 3-4 sec.
Now the funny part is when I delete the app and reinstall it loads relatively faster like 3-4 sec. Also from 2nd launch the app launches in about the same time or lesser.
Now to reproduce I delete the app and installs again after 3-4 hrs it gives the same issue of taking longer time to launch for the first launch.
I don’t know if system caches the launch image until some period of time even after deleting the app. (As it launches faster if delete the app and reinstalls quickly).
Also how to quickly launch the app? Any tips? I am using image xcassets and iOS version supported is iOS 7 and above.
Does it make difference if launch image is more than 1 mb and should I use jpg to reduce size?
Note:
It's taking time at launch image itself. I am curious to know why it's just first time launch after install. Like after killing the app and relaunching doesn't take that much time. And it's device specific only. Not seeing on iPhone 6 and above. I saw issue on iPad 2 as well.

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.

iPhone 12 Pro debugging on device hangs

Like many of you I received my iPhone 12 pro today in the mail! And of course the first thing I wanted to do was run it in debug on my actual device. Curious if any of you with new iPhone 12's, or iPhone 12 pro's are seeing a huge lag when trying to debug to the device. for example it takes almost 1 min to even hit the entry point in the app delegate, and about 20 seconds when given focus to a uitextview for the keyboard to show up (after the 1st time the keyboard loads, the subsequent ones are instant)
Its super crazy because the simulator is instant, all other actual devices (Xs etc) are instant (all on 14.1), but my brand new 12 pro is unworkable when debugging to it.
Any suggestions? Ive tried multiple projects, seems to do it on every one. Ive submitted a feedback as well.
Disconnect the device, then delete the contents of ~/Library/Developer/Xcode/iOS DeviceSupport and restart Xcode.

iOS app launch time is around 10 seconds

My App is taking around 10 seconds to launch.
To be clear, 10 seconds is the time between when i press the app icon and splash screen appears.
I have tried to put timer on main and didFinishLaunchingWithOptions calls. but it seems that these are getting called after the 10 seconds only.
To add some more details here,
This is the update of the app. Previous version of the app was/is working fine on the same device (iOS 8.3 OS), But not the current app.
The main difference between the two updates (except few new features which come into effect after launch only) is the change in the coredata-model.
For which , I have added a new dataModel-filename_2.xcdatamodel file.
Any idea/suggestions on how can I fix this launch time issue?
Edit: Just to add, I am not facing this issue on the "iOS 9". But there is one "iOS 8" iPad on which I am seeing this issue to the extent that app takes long to even come up from background (not just fresh launch). But Can't generalize this, I have tested on 2 devices only.

iOS Simulator takes extremely long time to boot first time

I'm trying to run an iOS simulator (Xcode 7.0.1, OS X Yosemite). However, the first time I run the simulator, it takes a very long time to boot up (80-120 seconds), which is causing my automation testing to time out. If I close the simulator and re-launch the same one, it will boot up in about 5-8 seconds. Launching a different device will cause the long boot up time again.
I have tried resetting the content and settings of the simulator, deleting and re-downloading simulators, and uninstalling and reinstalling Xcode.
This machine is a Parallels Desktop VM running on a 2012 Mac Mini. While I do not believe this to be a resource issue (the simulator runs just fine with the second launch), I have tried increasing ram and video memory to the VM with no success.
Had the same issue after updating to Xcode 7 on my iMac (late 2013). And yesterday I've succeeded to resolve it by doing 2 steps (unfortunately, I don't know which did really help):
I had Xcode 6 installed side by side with Xcode 7. So I've deleted Xcode 6 instance.
Open Xcode 7, go to Window -> Devices and delete all listed iOS simulators you have there. Close & re-start Xcode. Go to Window -> Devices again and add only simulators you need (in my case I've added iPhone 6 iOS 8, iPhone 6s iOS 9, iPad Air 2 iOS 9). You can add more simulators later on as you need them. Also, not sure if this is critical, I've selected no paired watchOS device for simulators I've added.
After completing these steps, my simulator cold start was significantly imporoved - it takes now like 30-40seconds max for a cold start. Before that it was 3-4minutes and first debugger attach attempt always failed.
Hope, this will be helpful for somebody.
My solution so far has been to pre-boot the Simulator prior to needing it for automation. I consider this somewhat hackish, but it does get the job done.
xcrun instruments -w "Simulator Name Here"
sleep 120
This will launch the simulator, then sleep for a couple minutes before proceeding on to whatever else you need the simulator for.
At first boot, the sim device will go through initial setup just like a real device. Taking 2 minutes is quite a long time on modern systems but not that unheard of, especially if you're not on an SSD. I suggest you watch the sim device's system.log to see what tasks are occurring during the boot process and keep an eye out for any errors that might indicate what is going wrong.
I tried to run the iPhone6S simulator on my Macbook Air, and it just hung at the game center login screen. It hung for 10 minutes. I had 50% scale on the simulator window. Then I tried to reduce the scale even more, and immediately it passed the GC login screen.
My guess is that my little Air has don't have time to do anything else but updating the simulator screen at high scales, and when I reduced the scale it had time to bother with the game center login functionality. My simulator widow is the size of a stamp now. :)
Puh. I've had this simulator problem for weeks...

App stays in splash screen in iOS 7.0.3

Recently in iOS 7.0.3, my app stays in the splash screen and was not going into the app at all.
If i kill the app and launch it again it opens up without any issues.
Can anyone help me on this issue?. I think the application -didFinishLaunchingWithOptions was not returning yes.
Note: I have a lot of stuffs like deleting database, initializing a dozen of buttons in appdelegate init function.
I know that it is a bad practice to have things in init but since its been there for more than 4 years and was working fine with previous OS versions i didn't find a good reason to change it.
Also this issue is not happening all the time.
My app size is 40 MB.
The iOS Guidelines say that you should not include anything which holds the Splash screen for much time its better if you do all the process in background so that splash screens loads up and user can play with app. But as you said your issue is not all the time so Try to reset the app and also quit simulator. Hope this helps.

Resources