<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplicationDelegate/main()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So21UIApplicationDelegateP5UIKitE4mainyyFZ"
  },
  "title" : "main()"
}
-->

# main()

Provides the top-level entry point for the app.

```
@MainActor @preconcurrency static func main()
```

## Discussion

[`UIApplicationDelegate`](/documentation/UIKit/UIApplicationDelegate) provides an implementation of the [`main()`](/documentation/UIKit/UIApplicationDelegate/main()) method so that it can serve as the main entry point for a UIKit app. The system calls the [`main()`](/documentation/UIKit/UIApplicationDelegate/main()) method to launch your app; you never call it yourself. You can have exactly one entry point in your app, which you mark with the `@main` attribute.

---

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)