Commit 7311255f authored by Rohit Rao's avatar Rohit Rao Committed by Commit Bot

[ios] Adds IsRunningOnIOS14OrLater().

BUG=None

Change-Id: I13c7aeee67a7e72b665f23a4b1c4b942452db9b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2284058
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785951}
parent adbc9bc4
......@@ -25,6 +25,9 @@ BASE_EXPORT bool IsRunningOnIOS12OrLater();
// Returns whether the operating system is iOS 13 or later.
BASE_EXPORT bool IsRunningOnIOS13OrLater();
// Returns whether the operating system is iOS 14 or later.
BASE_EXPORT bool IsRunningOnIOS14OrLater();
// Returns whether the operating system is at the given version or later.
BASE_EXPORT bool IsRunningOnOrLater(int32_t major,
int32_t minor,
......
......@@ -48,6 +48,11 @@ bool IsRunningOnIOS13OrLater() {
return is_running_on_or_later;
}
bool IsRunningOnIOS14OrLater() {
static const bool is_running_on_or_later = IsRunningOnOrLater(14, 0, 0);
return is_running_on_or_later;
}
bool IsRunningOnOrLater(int32_t major, int32_t minor, int32_t bug_fix) {
static const int32_t* current_version = OSVersionAsArray();
int32_t version[] = {major, minor, bug_fix};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment