Report iOS as iOS rather than OS X.

R=iposva@google.com

Review URL: https://codereview.chromium.org/1417013011 .
This commit is contained in:
Ryan Macnak 2015-11-13 11:15:04 -08:00
parent 56249f5b53
commit f3759dedd3
4 changed files with 18 additions and 1 deletions

View file

@ -13,6 +13,10 @@
* `dart:convert`
* `Base64Decoder.convert` now takes optional `start` and `end` parameters.
* `dart:io`
* `Platform` added an `isiOS` getter and `Platform.operatingSystem` may now
return `ios`.
## 1.13.0
### Core library changes

View file

@ -53,7 +53,11 @@ int Platform::NumberOfProcessors() {
const char* Platform::OperatingSystem() {
#if TARGET_OS_IOS
return "ios";
#else
return "macos";
#endif
}

View file

@ -27,7 +27,11 @@
namespace dart {
const char* OS::Name() {
#if TARGET_OS_IOS
return "ios";
#else
return "macos";
#endif
}

View file

@ -84,7 +84,7 @@ class Platform {
static String get pathSeparator => _pathSeparator;
/**
* Get a string (`linux`, `macos`, `windows` or `android`)
* Get a string (`linux`, `macos`, `windows`, `android`, or `ios`)
* representing the operating system.
*/
static String get operatingSystem => _operatingSystem;
@ -114,6 +114,11 @@ class Platform {
*/
static final bool isAndroid = (_operatingSystem == "android");
/**
* Returns true if the operating system is iOS.
*/
static final bool isiOS = (_operatingSystem == "ios");
/**
* Get the environment for this process.
*