<!--
{
  "availability" : [
    "iOS: 12.0.0 - 18.0.0",
    "iPadOS: 12.0.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.14.0 - 15.0.0",
    "visionOS: 1.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDICISession",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "c:objc(cs)MIDICISession"
  },
  "title" : "MIDICISession"
}
-->

# MIDICISession

An object that represents a MIDI-CI session.

```
class MIDICISession
```

## Overview

A MIDI-CI session is a bidirectional communication path between a MIDI source and destination identified using MIDI-CI discovery. Use a session to manipulate MIDI-CI profiles and to discover device capabilities.

## Topics

### Creating a Session

[`-  initWithDiscoveredNode:dataReadyHandler:disconnectHandler:`](/documentation/CoreMIDI/MIDICISession/init(discoveredNode:dataReadyHandler:disconnectHandler:))

Creates a MIDI-CI session.

### Configuring a Session

[`-  profileStateForChannel:`](/documentation/CoreMIDI/MIDICISession/profileState(forChannel:))

Returns the profile state for the specified MIDI channel number.

[`-  enableProfile:onChannel:error:`](/documentation/CoreMIDI/MIDICISession/enable(_:onChannel:))

Performs an asynchronous request to enable a profile for a specific MIDI channel number.

[`-  disableProfile:onChannel:error:`](/documentation/CoreMIDI/MIDICISession/disableProfile(_:onChannel:))

Performs an asynchronous request to disable a profile for a specific MIDI channel number.

[`MIDICIProfileChangedBlock`](/documentation/CoreMIDI/MIDICIProfileChangedBlock)

A block the system calls to indicate it has enabled or disabled a profile.

[`profileChangedCallback`](/documentation/CoreMIDI/MIDICISession/profileChangedCallback)

An optional block the system calls after it enables or disables a profile.

[`-  sendProfile:onChannel:profileData:`](/documentation/CoreMIDI/MIDICISession/send(_:onChannel:profileData:))

Sends profile-specific data to the MIDI-CI session.

[`MIDICIProfileSpecificDataBlock`](/documentation/CoreMIDI/MIDICIProfileSpecificDataBlock)

A block the system calls when a MIDI-CI session or responder receives profile-specific data.

[`profileSpecificDataHandler`](/documentation/CoreMIDI/MIDICISession/profileSpecificDataHandler)

An optional block the system calls when a device sends profile-specific data to the session.

[`MIDIChannelsWholePort`](/documentation/CoreMIDI/MIDIChannelsWholePort)

A constant value that indicates to use all channels of the port.

### Inspecting a Session

[`deviceInfo`](/documentation/CoreMIDI/MIDICISession/deviceInfo)

Information about a MIDI-CI device.

[`maxSysExSize`](/documentation/CoreMIDI/MIDICISession/maxSysExSize)

The maximum size of System Exclusive (SysEx) messages.

[`midiDestination`](/documentation/CoreMIDI/MIDICISession/midiDestination)

The MIDI destination with which the session is communicating.

[`maxPropertyRequests`](/documentation/CoreMIDI/MIDICISession/maxPropertyRequests)

The maximum number of simultaneous property exchange requests, if supported.

[`supportsProfileCapability`](/documentation/CoreMIDI/MIDICISession/supportsProfileCapability)

A Boolean value that indicates whether the entity supports the MIDI-CI profile’s capability.

[`supportsPropertyCapability`](/documentation/CoreMIDI/MIDICISession/supportsPropertyCapability)

A Boolean value that indicates whether the entity supports the MIDI-CI property exchange capability.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)