ios_workflow.dart 931 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4
// 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 '../doctor.dart';
7
import '../globals.dart' as globals;
8

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

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

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

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

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

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