ios_workflow.dart 925 Bytes
Newer Older
1 2 3 4
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
import '../base/context.dart';
6
import '../base/platform.dart';
7
import '../doctor.dart';
8
import '../macos/xcode.dart';
9

10
IOSWorkflow get iosWorkflow => context.get<IOSWorkflow>();
11

12 13
class IOSWorkflow implements Workflow {
  const IOSWorkflow();
14

15
  @override
16
  bool get appliesToHostPlatform => platform.isMacOS;
17

18
  // We need xcode (+simctl) to list simulator devices, and libimobiledevice to list real devices.
19
  @override
20
  bool get canListDevices => xcode.isInstalledAndMeetsVersionCheck && xcode.isSimctlInstalled;
21 22 23

  // We need xcode to launch simulator devices, and ideviceinstaller and ios-deploy
  // for real devices.
24
  @override
25 26
  bool get canLaunchDevices => xcode.isInstalledAndMeetsVersionCheck;

27 28
  @override
  bool get canListEmulators => false;
29
}