title: Flutter Error : Getter not found : 'iMobileDevice' when trying to rebuild Flutter tool
body: <p>Good afternoon,</p>
  
  <p>I am following the tutorial on Windows 7 for an Ipad on IOS 9.3.5 :</p>
  
  <p><a href="https://medium.com/flutter-community/developing-and-debugging-flutter-apps-for-ios-without-a-mac-8d362a8ec667" rel="nofollow noreferrer">https://medium.com/flutter-community/developing-and-debugging-flutter-apps-for-ios-without-a-mac-8d362a8ec667</a>
   and I'm stuck at <strong>rebuilding the Flutter Tool</strong>. (Last part of the tutorial)</p>
  
  <p>I downloaded (from the link of the tutorial) and copied in <code>C:\src\flutter\bin</code>  the <strong>libimobiledevice</strong>, <strong>ideviceinstaller</strong> and <strong>which</strong> binaries.
  Then I ran the <code>git apply ios.diff</code> which gives me multiple errors, sometimes it's just about mac.dart, and sometimes it's more like this : </p>
  
  <pre><code>error: patch failed: packages/flutter_tools/lib/src/ios/devices.dart:103
  error: packages/flutter_tools/lib/src/ios/devices.dart: patch does not apply
  error: patch failed: packages/flutter_tools/lib/src/ios/ios_workflow.dart:26
  error: packages/flutter_tools/lib/src/ios/ios_workflow.dart: patch does not apply
  error: patch failed: packages/flutter_tools/lib/src/ios/mac.dart:124
  error: packages/flutter_tools/lib/src/ios/mac.dart: patch does not apply
  </code></pre>
  
  <p>Then I found this command in here : <a href="https://stackoverflow.com/questions/4770177/git-patch-does-not-apply">git: patch does not apply</a></p>
  
  <pre><code>git apply --reject --whitespace=fix mychanges.patch 
  </code></pre>
  
  <p>What I got was : (don't mind the content of the <code>Future&lt;String&gt;</code>, it's because I've already changed it to what it was supposed to be)</p>
  
  <pre><code>Checking patch packages/flutter_tools/lib/src/ios/mac.dart...
  error: while searching for:
    Future&lt;String&gt; getAvailableDeviceIDs() async {
      try {
        final ProcessResult result = await processManager.run(&lt;String&gt;['idevice_id', '-l']);
        if (result.exitCode != 0)
          throw ToolExit('idevice_id returned an error:\n${result.stderr}');
        return result.stdout;
      } on ProcessException {
        throw ToolExit('Failed to invoke idevice_id. Run flutter doctor.');
  
  error: patch failed: packages/flutter_tools/lib/src/ios/mac.dart:124
  Applying patch packages/flutter_tools/lib/src/ios/devices.dart with 1 reject...
  Rejected hunk #1.
  Applying patch packages/flutter_tools/lib/src/ios/ios_workflow.dart with 1 reject...
  Rejected hunk #1.
  Applying patch packages/flutter_tools/lib/src/ios/mac.dart with 1 reject...
  Rejected hunk #1.
  </code></pre>
  
  <p>At this point I manually pasted the right content in the <strong>mac.dart</strong> file (as you might have seen in the error above), but I am still not sure everything went well because of the :</p>
  
  <pre><code>error: patch failed: packages/flutter_tools/lib/src/ios/mac.dart:124
  </code></pre>
  
  <p>Anyway, I kept going and ran the command to rebuild the flutter tool: </p>
  
  <pre><code>bin\cache\dart-sdk\bin\dart --snapshot=.\bin\cache\flutter_tools.snapshot --packages=.\packages\flutter_tools\.packages .\packages\flutter_tools\bin\flutter_tools.dart
  </code></pre>
  
  <p>Finally, the output is this :</p>
  
  <pre><code>C:\src\flutter&gt;bin\cache\dart-sdk\bin\dart --snapshot=.\bin\cache\flutter_tools.snapshot --packages=.\packages\flutter_tools\.packages .\
  packages\flutter_tools\bin\flutter_tools.dart
  packages/flutter_tools/lib/src/ios/ios_workflow.dart:20:30: Error: Getter not found: 'iMobileDevice'.
    bool get canListDevices =&gt; iMobileDevice.isInstalled || (xcode.isInstalledAndMeetsVersionCheck &amp;&amp; xcode.isSimctlInstalled);
                               ^^^^^^^^^^^^^
  packages/flutter_tools/lib/src/ios/ios_workflow.dart:20:30: Error: The getter 'iMobileDevice' isn't defined for the class 'IOSWorkflow'.
   - 'IOSWorkflow' is from 'package:flutter_tools/src/ios/ios_workflow.dart' ('packages/flutter_tools/lib/src/ios/ios_workflow.dart').
  Try correcting the name to the name of an existing getter, or defining a getter or field named 'iMobileDevice'.
    bool get canListDevices =&gt; iMobileDevice.isInstalled || (xcode.isInstalledAndMeetsVersionCheck &amp;&amp; xcode.isSimctlInstalled);
                               ^^^^^^^^^^^^^
  </code></pre>
  
  <p>Is this "iMobileDevice" related to this libimobiledevice ? I can run any of the <code>ideviceinstaller.exe</code> or <code>idevice_id.exe</code>, so I guess I installed it correctly.</p>
  
  <p>I am missing something important to correct this error ?</p>
  
  <p>Thanks a lot for your time :)</p>