• Victoria Ashworth's avatar
    Check for simulator runtime in flutter doctor (#131795) · b39604e0
    Victoria Ashworth authored
    Redo of https://github.com/flutter/flutter/pull/130728 - code is the same as before. That PR was stuck in Google testing and then I messed up the rebase so started over.
    
    ----
    
    Starting in Xcode 15, the simulator is no longer included in Xcode and must be downloaded and installed separately. This adds a validation to `flutter doctor` to warn when the needed simulator runtime is missing.
    
    Validation message looks like:
    ```
    [!] Xcode - develop for iOS and macOS (Xcode 15.0)
        ! iOS 17.0 Simulator not installed; this may be necessary for iOS and macOS development.
          To download and install the platform, open Xcode, select Xcode > Settings > Platforms,
          and click the GET button for the required platform.
    
          For more information, please visit:
            https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes
    ```
    
    It may also show an error like this when something goes wrong when checking for the simulator:
    ```
    [!] Xcode - develop for iOS and macOS (Xcode 15.0)
        ✗ Unable to find the iPhone Simulator SDK.
    ```
    
    Note: I'm unsure of in the future if the SDK and the simulator runtime will need to match the exact version or just the major. For now, it only checks against the major version.
    
    Part 3 of https://github.com/flutter/flutter/issues/129558.
    b39604e0
Name
Last commit
Last update
..
code_signing_test.dart Loading commit data...
devices_test.dart Loading commit data...
ios_deploy_test.dart Loading commit data...
ios_device_install_test.dart Loading commit data...
ios_device_logger_test.dart Loading commit data...
ios_device_port_forwarder_test.dart Loading commit data...
ios_device_project_test.dart Loading commit data...
ios_device_start_nonprebuilt_test.dart Loading commit data...
ios_device_start_prebuilt_test.dart Loading commit data...
ios_project_migration_test.dart Loading commit data...
ios_workflow_test.dart Loading commit data...
mac_test.dart Loading commit data...
simulators_test.dart Loading commit data...
xcodeproj_test.dart Loading commit data...
xcresult_test.dart Loading commit data...
xcresult_test_data.dart Loading commit data...