---
title: "willSetProfile(_:onChannel:enabled:)"
framework: coremidi
role: symbol
role_heading: Instance Method
path: "coremidi/midiciprofileresponderdelegate/willsetprofile(_:onchannel:enabled:)"
---

# willSetProfile(_:onChannel:enabled:)

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

## Declaration

```swift
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

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

## See Also

### Protocol Methods

- [connectInitiator(_:with:)](coremidi/midiciprofileresponderdelegate/connectinitiator(_:with:).md)
- [handleData(for:onChannel:data:)](coremidi/midiciprofileresponderdelegate/handledata(for:onchannel:data:).md)
- [initiatorDisconnected(_:)](coremidi/midiciprofileresponderdelegate/initiatordisconnected(_:).md)
