mirror of
https://github.com/dart-lang/sdk
synced 2024-10-01 19:29:09 +00:00
Report iOS as iOS rather than OS X.
R=iposva@google.com Review URL: https://codereview.chromium.org/1417013011 .
This commit is contained in:
parent
56249f5b53
commit
f3759dedd3
|
@ -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
|
||||
|
|
|
@ -53,7 +53,11 @@ int Platform::NumberOfProcessors() {
|
|||
|
||||
|
||||
const char* Platform::OperatingSystem() {
|
||||
#if TARGET_OS_IOS
|
||||
return "ios";
|
||||
#else
|
||||
return "macos";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,11 @@
|
|||
namespace dart {
|
||||
|
||||
const char* OS::Name() {
|
||||
#if TARGET_OS_IOS
|
||||
return "ios";
|
||||
#else
|
||||
return "macos";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue