mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
macOS/iOS: Fix unguarded availability warnings
This commit is contained in:
parent
ef8ad92138
commit
eda5c696e5
27 changed files with 220 additions and 177 deletions
|
|
@ -528,8 +528,9 @@ void File::addToDock() const
|
|||
|
||||
File File::getContainerForSecurityApplicationGroupIdentifier (const String& appGroup)
|
||||
{
|
||||
if (auto* url = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier: juceStringToNS (appGroup)])
|
||||
return File (nsStringToJuce ([url path]));
|
||||
if (@available (macOS 10.8, *))
|
||||
if (auto* url = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier: juceStringToNS (appGroup)])
|
||||
return File (nsStringToJuce ([url path]));
|
||||
|
||||
return File();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
|||
#endif
|
||||
|
||||
//==============================================================================
|
||||
class URLConnectionState : public URLConnectionStateBase
|
||||
class API_AVAILABLE (macos (10.9)) URLConnectionState : public URLConnectionStateBase
|
||||
{
|
||||
public:
|
||||
URLConnectionState (NSURLRequest* req, const int maxRedirects)
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ inline var nsDictionaryToVar (NSDictionary* dictionary)
|
|||
DynamicObject::Ptr dynamicObject (new DynamicObject());
|
||||
|
||||
for (NSString* key in dictionary)
|
||||
dynamicObject->setProperty (nsStringToJuce (key), nsObjectToVar (dictionary[key]));
|
||||
dynamicObject->setProperty (nsStringToJuce (key), nsObjectToVar ([dictionary objectForKey: key]));
|
||||
|
||||
return var (dynamicObject.get());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue