mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-29 02:40:05 +00:00
iOS: Fixed an openURL iOS 10 deprecation
This commit is contained in:
parent
f755050df5
commit
fe134173f6
2 changed files with 12 additions and 1 deletions
|
|
@ -576,7 +576,13 @@ struct iOSAudioIODevice::Pimpl : public AudioPlayHead,
|
|||
&hostUrl,
|
||||
&dataSize);
|
||||
if (err == noErr)
|
||||
[[UIApplication sharedApplication] openURL:(NSURL*)hostUrl];
|
||||
{
|
||||
#if (! defined __IPHONE_OS_VERSION_MIN_REQUIRED) || (! defined __IPHONE_10_0) || (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0)
|
||||
[[UIApplication sharedApplication] openURL: (NSURL*)hostUrl];
|
||||
#else
|
||||
[[UIApplication sharedApplication] openURL: (NSURL*)hostUrl options: @{} completionHandler: nil];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -402,7 +402,12 @@ bool JUCE_CALLTYPE Process::openDocument (const String& fileName, const String&
|
|||
if (SystemStats::isRunningInAppExtensionSandbox())
|
||||
return false;
|
||||
|
||||
#if (! defined __IPHONE_OS_VERSION_MIN_REQUIRED) || (! defined __IPHONE_10_0) || (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0)
|
||||
return [[UIApplication sharedApplication] openURL: filenameAsURL];
|
||||
#else
|
||||
[[UIApplication sharedApplication] openURL: filenameAsURL options: @{} completionHandler: nil];
|
||||
return true;
|
||||
#endif
|
||||
#else
|
||||
NSWorkspace* workspace = [NSWorkspace sharedWorkspace];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue