Flutter Engine
The Flutter Engine
platform_version.mm
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/fml/platform/darwin/platform_version.h"
6
7#include <Foundation/NSProcessInfo.h>
8
9namespace fml {
10
11bool IsPlatformVersionAtLeast(size_t major, size_t minor, size_t patch) {
12 const NSOperatingSystemVersion version = {
13 .majorVersion = static_cast<NSInteger>(major),
14 .minorVersion = static_cast<NSInteger>(minor),
15 .patchVersion = static_cast<NSInteger>(patch),
16 };
17 return [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:version];
18}
19
20} // namespace fml
Definition: ascii_trie.cc:9
bool IsPlatformVersionAtLeast(size_t major, size_t minor=0, size_t patch=0)