From 2322dec6a4341b7ac6fcf60462e738533252a57f Mon Sep 17 00:00:00 2001 From: evgeny Date: Tue, 25 Dec 2018 21:51:18 +0300 Subject: version up --- index.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'index.mm') diff --git a/index.mm b/index.mm index 2e9db03..6599ff7 100644 --- a/index.mm +++ b/index.mm @@ -96,7 +96,9 @@ void AskForMediaAccess(const v8::FunctionCallbackInfo& args) { Local cbFunc = Local::Cast(args[1]); if (auto type = ParseMediaType(mediaType)) { - if (@available(macOS 10.14, *)) { + NSOperatingSystemVersion minimumSupportedOSVersion = { .majorVersion = 10, .minorVersion = 14, .patchVersion = 0 }; + BOOL isSupported = [NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:minimumSupportedOSVersion]; + if (isSupported) { Baton *baton = new Baton; baton->type = type; baton->callback.Reset(isolate, cbFunc); -- cgit v1.2.3