"Couldn't find MIDI network driver" crash in iOS 13 simulators
I was getting the same error as you and this frusturated me. I searched for a solution for four days, and finally found one. I hope this will help you as well! Please follow these steps carefully:
Update Xcode to the latest version
Make sure your build target deployment version is set to iOS 13.0
Quit the applications Simulator and Xcode if they are open
Using Finder, navigate to the folder which your version of Xcode is located (mine is in my Applications folder)
Control + click on Xcode, and select 'Show Package Contents'
Navigate to
/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime
Control + click on 'iOS.simruntime', and select 'Show Package Contents'
Navigate to
/Contents/MacOS
and verify you see a document named 'iOS 13.0'Exit out of the 'MacOS' folder back to the 'Contents' folder and Navigate to
/Resources/RuntimeRoot/System/Library/Audio
Copy the entire 'MIDI Drivers' folder
Exit out of the 'Audio' folder and navigate all the way back to the 'RuntimeRoot' folder
Navigate to
/Library/Audio
and you should see there is no folder called 'MIDI Drivers' here, only 'Plug-Ins' and 'Tunings'Paste the 'MIDI Drivers' folder you copied into this 'Audio' folder
Close Finder, relaunch Xcode and try running your project again in the iOS 13 simulator
Now, Xcode should not complain about missing the MIDI Drivers, and your code should run without the EXE_BAD_ACCESS! I hope this helps, and please feel free to reach out to me if you have any more questions.
This is just a simplification of the accepted answer, since I do this often. Assuming your Xcode is in /Applications/Xcode.app
:
Copy MIDI Drivers
from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Audio
to
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Library/Audio
and relaunch Xcode.
Note
So it's present in RuntimeRoot/System/Library/Audio
and needs to be in RuntimeRoot/Library/Audio
as well.