mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-08 04:20:09 +00:00
iOS: Added an assertion if attempting to use MIDI in an iOS 13 simulator
This commit is contained in:
parent
78fd7a7364
commit
3a9c07c148
1 changed files with 16 additions and 3 deletions
|
|
@ -220,9 +220,22 @@ namespace CoreMidiHelpers
|
|||
|
||||
if (! hasEnabledNetworkSession)
|
||||
{
|
||||
MIDINetworkSession* session = [MIDINetworkSession defaultSession];
|
||||
session.enabled = YES;
|
||||
session.connectionPolicy = MIDINetworkConnectionPolicy_Anyone;
|
||||
auto iOSVersion = nsStringToJuce ([[UIDevice currentDevice] systemVersion]);
|
||||
auto majorVersion = StringArray::fromTokens (iOSVersion, ".", {})[0].getIntValue();
|
||||
|
||||
if (majorVersion == 13)
|
||||
{
|
||||
// From the Xcode 11 release notes known issues:
|
||||
// Attempting to create an MIDINetworkSession in a simulated device running
|
||||
// iOS 13 won’t succeed. (54484923)
|
||||
jassertfalse;
|
||||
}
|
||||
else
|
||||
{
|
||||
MIDINetworkSession* session = [MIDINetworkSession defaultSession];
|
||||
session.enabled = YES;
|
||||
session.connectionPolicy = MIDINetworkConnectionPolicy_Anyone;
|
||||
}
|
||||
|
||||
hasEnabledNetworkSession = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue