---
title: "DADiskCreateFromIOMedia(_:_:_:)"
framework: Disk Arbitration
role: symbol
role_heading: Function
platforms: [Mac Catalyst 13.1+, macOS 10.4+]
path: "diskarbitration/dadiskcreatefromiomedia(_:_:_:)"
---

# DADiskCreateFromIOMedia(_:_:_:)

Creates a new disk object.

## Declaration

```swift
func DADiskCreateFromIOMedia(_ allocator: CFAllocator?, _ session: DASession, _ media: io_service_t) -> DADisk?
```

## Parameters

- `allocator`: The allocator object to be used to allocate memory.
- `session`: The DASession in which to contact Disk Arbitration.
- `media`: The I/O Kit media object.

## Return Value

Return Value A reference to a new DADisk.

## Discussion

Discussion The caller of this function receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with CFRelease().

## See Also

### Miscellaneous

- [DADiskCopyDescription(_:)](diskarbitration/dadiskcopydescription(_:).md)
- [DADiskCopyIOMedia(_:)](diskarbitration/dadiskcopyiomedia(_:).md)
- [DADiskCopyWholeDisk(_:)](diskarbitration/dadiskcopywholedisk(_:).md)
- [DADiskCreateFromBSDName(_:_:_:)](diskarbitration/dadiskcreatefrombsdname(_:_:_:).md)
- [DADiskCreateFromVolumePath(_:_:_:)](diskarbitration/dadiskcreatefromvolumepath(_:_:_:).md)
- [DADiskGetBSDName(_:)](diskarbitration/dadiskgetbsdname(_:).md)
- [DADiskGetTypeID()](diskarbitration/dadiskgettypeid().md)
