---
title: nodeNames()
framework: opendirectory
role: symbol
role_heading: Instance Method
path: opendirectory/odsession/nodenames()
---

# nodeNames()

Returns the node names that are registered with this session.

## Declaration

```swift
func nodeNames() throws -> [Any]
```

## Return Value

Return Value The node names registered with this session.

## Discussion

Discussion note: In Swift, this method returns a nonoptional result and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.
