<!--
{
  "availability" : [
    "macOS: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ClassKitUI",
  "identifier" : "/documentation/ClassKitUI/AssignedDocumentMenuItem/init(documentURL:willSubmit:didSubmit:willWithdraw:didWithdraw:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "ClassKit UI"
    ],
    "preciseIdentifier" : "s:10ClassKitUI24AssignedDocumentMenuItemC11documentURL10willSubmit03didK00J8Withdraw0lM0AC10Foundation0I0V_SbAKYaYbcyAKcSbAKYaYbcyAKctcfc"
  },
  "title" : "init(documentURL:willSubmit:didSubmit:willWithdraw:didWithdraw:)"
}
-->

# init(documentURL:willSubmit:didSubmit:willWithdraw:didWithdraw:)

Creates a menu item for assigned document submission.

```
init(documentURL: URL, willSubmit: @escaping @Sendable (URL) async -> Bool = { _ in true }, didSubmit: @escaping (URL) -> Void = { _ in }, willWithdraw: @escaping @Sendable (URL) async -> Bool = { _ in true }, didWithdraw: @escaping (URL) -> Void = { _ in })
```

## Parameters

`documentURL`

The URL of the assigned document.

`willSubmit`

A closure that executes before submission. Return `false` to prevent submission.

`didSubmit`

A closure that executes after successful submission.

`willWithdraw`

A closure that executes before withdrawing. Return `false` to prevent withdrawal.

`didWithdraw`

A closure that executes after successful withdrawal.

---

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)