<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSOrderedSet/init(object:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSOrderedSet(im)initWithObject:"
  },
  "title" : "init(object:)"
}
-->

# init(object:)

Initializes a new ordered set with the object.

```
convenience init(object: Any)
```

## Parameters

`object`

The object to add to the new ordered set

## Return Value

A new ordered set that contains a single member, `object`.

## See Also

[`-  initWithObjects:`](/documentation/Foundation/NSOrderedSet/initWithObjects:)

Initializes a newly allocated set with members taken from the specified list of objects.

[`+  orderedSetWithObjects:`](/documentation/Foundation/NSOrderedSet/orderedSetWithObjects:)

Creates and returns a ordered set containing the objects in a given argument list.

[`+  orderedSetWithObject:`](/documentation/Foundation/NSOrderedSet/orderedSetWithObject:)

Creates and returns a ordered set that contains a single given object.



---

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)