Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happen if I return false in didFinishLaunchingWithOptions?

I tried to return the false in didFinishLaunchingWithOptions method, nothing happens my app run successfully, can anyone tell why this thing work, and what's the difference (true/false) here.

like image 998
Rohit Kumar Avatar asked May 21 '19 06:05

Rohit Kumar


People also ask

What is the use of application Willfinishlaunchingwithoptions and application didFinishLaunchingWithOptions?

Discussion. Use this method (and the corresponding application(_:didFinishLaunchingWithOptions:) method) to initialize your app and prepare it to run. This method is called after your app has been launched and its main storyboard or nib file has been loaded, but before your app's state has been restored.

Will finish launching?

Event: 'will-finish-launching'​Emitted when the application has finished basic startup. On Windows and Linux, the will-finish-launching event is the same as the ready event; on macOS, this event represents the applicationWillFinishLaunching notification of NSApplication .


1 Answers

It doesn't determine if the app launches or not, just whether it can handle the "option" or not.

Return Value

false if the app cannot handle the URL resource or continue a user activity, otherwise return true. The return value is ignored if the app is launched as a result of a remote notification.

Ref: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622921-application

like image 57
staticVoidMan Avatar answered Oct 18 '22 21:10

staticVoidMan