简体   繁体   中英

Can I increase iOS app launch time limit for Agentry app?

I have to create an application where I'm very limited to modify things. This is an Agentry aplication provided by SAP, that is kind of a render for a proprietary metadata programming language (like Apache Cordova but not for HTML unfortunately).

SAP delivers a framework and allows me to do some small changes to create a custom app with my own icons and data. My main goal is to add a database to this app so the user has all the data ready after installing.

The problem is that this is increasing the launch time a lot and the app crashes for older iPads with less processing power do to reaching the limit of 20 seconds.

Since this is an enterprise app that is not going to be published in the iOS AppStore, I was wondering if I could increase this timeout somehow.

And idea of what could I do?

Edit: Sorry, I'm not an iOS developer and I was not sure about my limitations. I found out that my "main.m" has only one instruction that is:

return UIApplicationMain(argc, argv,@"SMPAgentryApplication", @"SMPAgentryClientAppDelegate");

then all the AppDelegate and ViewController classes are empty because everything is done in the encapsulated framework. Given that I think I can't implement any of the given solutions.

The launch ends when you return from didFinishLaunchingWithOptions:

Change your code so that didFinishLaunchingWithOptions: starts everything you need in the background and then returns.

Move initialisation code inside viewDidAppear instead of viewDidLoad . This way you won't have to worry about launch time.

Simply add the sleep timer in didFinishLaunchingWithOptions:

[NSThread sleepForTimeInterval:5.0];

This will stop the further processing in the mean time you can either display the launchscreen for the seconds which you had added in the timer or can perform some other tasks that you want. Hope this helps :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM