---
title: "init(activityType:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsuseractivity/init(activitytype:)"
---

# init(activityType:)

Creates a user activity object with the specified type.

## Declaration

```swift
init(activityType: String)
```

## Parameters

- `activityType`: The type of the activity. The value is a developer-defined string in reverse-DNS format by convention, for example, com.myCompany.myEditor.editing.

## Return Value

Return Value An NSUserActivity object.

## See Also

### Related Documentation

- [Handoff Programming Guide](apple-archive/documentation/UserExperience/Conceptual/Handoff/HandoffFundamentals.md)
