Windows MAC same MidiInput class code error

Hi everyone,
The same code that build on windows vs has no error has error on MAC xcode. I don’t know why. Any one could help me ?

The error in the red line zone:/Users/vtech_cms_rd/Desktop/Midi Juce Project/Midi_In_Combox/Source/Midi_In_Combox.h:132:34: No viable conversion from ‘std::unique_ptr’ to ‘std::__1::unique_ptr<juce::MidiInput, std::__1::default_deletejuce::MidiInput >::pointer’ (aka ‘juce::MidiInput *’)

Best Regards!!!Screenshot 2020-07-14 at 4.19.30 PM

So you are getting an error reset() takes a raw pointer, whereas openDevice returns a unique_ptr. Just do this instead:

CurrentInputDevice = MidiInput::openDevice (index, this);