<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSUserActivity/targetContentIdentifier",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUserActivity(py)targetContentIdentifier"
  },
  "title" : "targetContentIdentifier"
}
-->

# targetContentIdentifier

A string that identifies the user activity’s content.

```
var targetContentIdentifier: String? { get set }
```

## Discussion

A target content identifier is a string you define within your app. This string provides a unique identifier for specific content in your app, like a particular document or the location of a piece of data in a database. This string isn’t visible to the user.

If you set this property, when the system delivers an [`NSUserActivity`](/documentation/Foundation/NSUserActivity) object to an app with multiple scenes, it chooses the <doc://com.apple.documentation/documentation/UIKit/UIScene> whose <doc://com.apple.documentation/documentation/UIKit/UISceneActivationConditions> have the best match with the target content identifier. For more information, see <doc://com.apple.documentation/documentation/UIKit/UISceneActivationConditions>.

This property is optional but is highly recommended to create a great multitasking experience for apps that run on iPad. Setting this property doesn’t automatically set [`needsSave`](/documentation/Foundation/NSUserActivity/needsSave) to <doc://com.apple.documentation/documentation/Swift/true>.

---

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)