I am getting error: Cannot convert value of type '() -> ()' to specified type 'MIDI.IO.Manager'
I am going to be exposing the value create by the midiManager to React Native. Just don't understand Why I get the error with this code block
I am not sure how to fix this as I am new to swift and objective-c. Any help would be greatly appreciated
import Foundation
import MIDIKit
@objc(MidiManager)
class MidiManager: NSObject{
var midiManager: MIDI.IO.Manager = {
let newManager = MIDI.IO.Manager(
clientName: "MIDIEventLogger",
model: "LoggerApp",
manufacturer: "Orchetect") { notification, manager in
print("Core MIDI notification:", notification)
}
do {
logger.debug("Starting MIDI manager")
try newManager.start()
} catch {
logger.default(error)
}
}
}
