<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ShareLink/init(_:item:subject:message:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI9ShareLinkVAAs5NeverORs_AERs0_AA07DefaultcD5LabelVRs1_rlE_4item7subject7messageACys15CollectionOfOneVySSGA2eGG10Foundation23LocalizedStringResourceV_SSAA4TextVSgATtcAMRszrlufc::OverloadGroup"
  },
  "title" : "init(_:item:subject:message:)"
}
-->

# init(_:item:subject:message:)

Creates an instance, with a custom label, that presents the share
interface.

```
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, item: String, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<String>
```

## Parameters

`titleResource`

A resource for the title of the share action.

`item`

The item to share.

`subject`

A title for the item to show when sharing to activities
that support a subject field.

`message`

A description of the item to show when sharing to
activities that support a message field. Activities may
support attributed text or HTML strings.

---

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)