<!--
{
  "availability" : [
    "iOS: 27.2.0 -",
    "iPadOS: 27.2.0 -",
    "macCatalyst: 27.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeExtensions",
  "identifier" : "/documentation/HomeExtensions/HomeExtension/main()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "HomeExtensions"
    ],
    "preciseIdentifier" : "s:14HomeExtensions0A9ExtensionPAAE4mainyyKFZ"
  },
  "title" : "main()"
}
-->

# main()

Starts your app extension.

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

## Discussion

Don’t call this method directly. Mark your extension type with `@main` instead.

---

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)