1

In this method what is the means of true and false?

application: didFinishLaunchingWithOptions: -> Bool{

 return true
}

if I write return true application Launch and works fine either I write return false application work's fine. so what is the mean of return true and false?.

Ravindra_Bhati
  • 1,071
  • 13
  • 28

2 Answers2

2

As of official documentation.

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.


The return result from this method is combined with the return result from the application(_:willFinishLaunchingWithOptions:) method to determine if a URL should be handled. If either method returns false, the URL is not handled. If you do not implement one of the methods, only the return value of the implemented method is considered.

For more details see https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622921-application

Bilal
  • 18,478
  • 8
  • 57
  • 72
  • 2
    Hi Bilal Means you want to say that app is not open by URL schema, deep linking. and by third-party app will not open an app. – Rakesh Mandloi Sep 12 '18 at 12:27
2

If you return false in didFinishLaunchingWithOptions then operating system will know that you cannot open the url coming in the launchOptions dictionary.

There is no other use of returning value in didFinishLaunchingWithOptions.