<!--
{
  "availability" : [
    "iOS: 14.0.0 - 18.0.0",
    "iPadOS: 14.0.0 - 18.0.0",
    "macCatalyst: 14.0.0 - 18.0.0",
    "macOS: 11.0.0 - 15.0.0",
    "visionOS: 1.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDICIProfileResponderDelegate/willSetProfile(_:onChannel:enabled:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "c:objc(pl)MIDICIProfileResponderDelegate(im)willSetProfile:onChannel:enabled:"
  },
  "title" : "willSetProfile(_:onChannel:enabled:)"
}
-->

# willSetProfile(_:onChannel:enabled:)

Provides an opportunity to perform an action before the system sets the profile.

```
optional func willSetProfile(_ aProfile: MIDICIProfile, onChannel channel: MIDIChannelNumber, enabled shouldEnable: Bool) -> Bool
```

## Parameters

`aProfile`

The profile the system uses to configure the device.

`channel`

The MIDI channel assignment.

`shouldEnable`

A Booean value that indicates whether the system should enable the profile.

## Return Value

A Boolean value that indicates whether the system enabled the profile.

## Discussion

---

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)