<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplicationDelegate/application(_:willFinishLaunchingWithOptions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIApplicationDelegate(im)application:willFinishLaunchingWithOptions:"
  },
  "title" : "application(_:willFinishLaunchingWithOptions:)"
}
-->

# application(_:willFinishLaunchingWithOptions:)

Tells the delegate that the launch process has begun.

```
optional func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool
```

## Parameters

`application`

The singleton app object.

`launchOptions`

A dictionary indicating the reason the person or system launched the app. The contents of this dictionary may be empty in situations where a person launched the app directly. If the app supports scenes, this is `nil`. For information about the possible keys in this dictionary and how to handle them, see [`UIApplication.LaunchOptionsKey`](/documentation/UIKit/UIApplication/LaunchOptionsKey).

## Return Value

Return <doc://com.apple.documentation/documentation/Swift/false> if the app can’t handle the URL resource or continue a user activity, or if the app doesn’t need to perform the [`application(_:performActionFor:completionHandler:)`](/documentation/UIKit/UIApplicationDelegate/application(_:performActionFor:completionHandler:)) method because you’re handling the invocation of a Home Screen quick action in this method; otherwise return <doc://com.apple.documentation/documentation/Swift/true>. The system ignores the return value if the app launches as a result of a remote notification.

## Discussion

Use this method (and the corresponding [`application(_:didFinishLaunchingWithOptions:)`](/documentation/UIKit/UIApplicationDelegate/application(_:didFinishLaunchingWithOptions:)) method) to initialize your app and prepare it to run. In an app that doesn’t support scenes, the system calls this method after your app launches and loads its main storyboard or nib file, but before restoring your app’s state. When the system calls this method, your app is in the inactive state.

If the system launched your app for a specific reason, the `launchOptions` dictionary contains data indicating the reason for the launch. For some launch reasons, the system may call additional methods of your app delegate. For example, if your app launched to open a URL, the system calls the [`application(_:open:options:)`](/documentation/UIKit/UIApplicationDelegate/application(_:open:options:)) method after your app finishes initializing itself. The presence of the launch keys gives you the opportunity to plan for that behavior. In the case of a URL to open, you might want to prevent state restoration if the URL represents a document that the person wanted to open.

When the system asks to open a URL, the system combines the return result from this method with the return result from the [`application(_:didFinishLaunchingWithOptions:)`](/documentation/UIKit/UIApplicationDelegate/application(_:didFinishLaunchingWithOptions:)) method to determine whether to handle a URL. If either method returns <doc://com.apple.documentation/documentation/Swift/false>, the system doesn’t call the [`application(_:open:options:)`](/documentation/UIKit/UIApplicationDelegate/application(_:open:options:)) method. If you don’t implement one of the methods, the system only considers the return value of the implemented method.

In some cases, a person launches your app with a Home Screen quick action. To ensure you handle this launch case correctly, read the discussion in the [`application(_:performActionFor:completionHandler:)`](/documentation/UIKit/UIApplicationDelegate/application(_:performActionFor:completionHandler:)) method.

> Important:
> If your app relies on the state restoration machinery to restore its view controllers, always show your app’s window from this method. Do not show the window in your app’s ``doc://com.apple.uikit/documentation/UIKit/UIApplicationDelegate/application(_:didFinishLaunchingWithOptions:)`` method. Calling the window’s ``doc://com.apple.uikit/documentation/UIKit/UIWindow/makeKeyAndVisible()`` method does not make the window visible right away anyway. UIKit waits until your app’s ``doc://com.apple.uikit/documentation/UIKit/UIApplicationDelegate/application(_:didFinishLaunchingWithOptions:)`` method finishes before making the window visible on the screen.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)