---
title: "ODNodeCreateWithNodeType(_:_:_:_:)"
framework: opendirectory
role: symbol
role_heading: Function
path: "opendirectory/odnodecreatewithnodetype(_:_:_:_:)"
---

# ODNodeCreateWithNodeType(_:_:_:_:)

Returns a new node created with a specified type.

## Declaration

```swift
func ODNodeCreateWithNodeType(_ allocator: CFAllocator!, _ session: ODSessionRef!, _ nodeType: ODNodeType, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<ODNodeRef>!
```

## Parameters

- `allocator`: The memory allocator to use. If NULL, the default allocator is used.
- `session`: The session to create the node in.
- `nodeType`: The type of the node.
- `error`: An error reference for error details. Can be NULL.

## Return Value

Return Value The created node.

## See Also

### Working with Nodes

- [ODNodeCopyDetails(_:_:_:)](opendirectory/odnodecopydetails(_:_:_:).md)
- [ODNodeCopyRecord(_:_:_:_:_:)](opendirectory/odnodecopyrecord(_:_:_:_:_:).md)
- [ODNodeCopySubnodeNames(_:_:)](opendirectory/odnodecopysubnodenames(_:_:).md)
- [ODNodeCopySupportedAttributes(_:_:_:)](opendirectory/odnodecopysupportedattributes(_:_:_:).md)
- [ODNodeCopySupportedRecordTypes(_:_:)](opendirectory/odnodecopysupportedrecordtypes(_:_:).md)
- [ODNodeCopyUnreachableSubnodeNames(_:_:)](opendirectory/odnodecopyunreachablesubnodenames(_:_:).md)
- [ODNodeCreateCopy(_:_:_:)](opendirectory/odnodecreatecopy(_:_:_:).md)
- [ODNodeCreateRecord(_:_:_:_:_:)](opendirectory/odnodecreaterecord(_:_:_:_:_:).md)
- [ODNodeCreateWithName(_:_:_:_:)](opendirectory/odnodecreatewithname(_:_:_:_:).md)
- [ODNodeCustomCall(_:_:_:_:)](opendirectory/odnodecustomcall(_:_:_:_:).md)
- [ODNodeGetName(_:)](opendirectory/odnodegetname(_:).md)
- [ODNodeGetTypeID()](opendirectory/odnodegettypeid().md)
- [ODNodeSetCredentials(_:_:_:_:_:)](opendirectory/odnodesetcredentials(_:_:_:_:_:).md)
- [ODNodeSetCredentialsExtended(_:_:_:_:_:_:_:)](opendirectory/odnodesetcredentialsextended(_:_:_:_:_:_:_:).md)
