iPad simulator crashing on attempting to create a midi connection (Xcode 11 / iPadOS13)


I noticed that my existing projects no longer work on the simulator after an update to Xcode 11 with iPadOS simulators 13.

In juce_mac_CoreMidi.cpp, line 214, there is an attempt to create a MIDI network session, even though my project (standalone / auv3 JUCE project) explicitly does not need midi as input, nor produces midi as output:

#define JucePlugin_IsSynth 0
#define JucePlugin_WantsMidiInput 0
#define JucePlugin_ProducesMidiOutput 0
#define JucePlugin_IsMidiEffect 0

iOS13 does not allow to create a midi connection on the simulator and therefore the attempt fails.

I’ve seen that in the develop branch, there are commits to prevent the connection from happening, and assert instead:

However, it seems we then simply hit the assert. Is there a way we can prevent the simulator from even trying to get MIDI going? I wonder if the attempt to make a midi connection should be made dependent on whether the app / auv3 wants midi / produces midi at all?

Since this is a known issue in Xcode 11 hopefully it’ll be fixed soon and we can remove that line. If you aren’t using MIDI at all in your plug-in then you shouldn’t hit that assertion when running as an AU, it only happens in the standalone plug-in because JUCE’s standalone plug-in holder class will auto open all available MIDI ports by default on mobile devices. You can disable this behaviour by defining JUCE_DONT_AUTO_OPEN_MIDI_DEVICES_ON_MOBILE in your project.

1 Like

Thanks @ed95 for the quick response and the pointer to JUCE_DONT_AUTO_OPEN_MIDI_DEVICES_ON_MOBILE. I completely missed that flag :slight_smile:

1 Like

This should be fixed now.

Confirmed here with Xcode 11.3.1that it doesn’t crashes

bump :slight_smile:

bumpity bump

1 Like

Thanks !