1. 27 Sep, 2023 1 commit
  2. 25 Sep, 2023 1 commit
  3. 15 Sep, 2023 1 commit
  4. 10 Sep, 2023 1 commit
    • Daco Harkes's avatar
      Native assets support for MacOS and iOS (#130494) · aa36db1d
      Daco Harkes authored
      Support for FFI calls with `@Native external` functions through Native assets on MacOS and iOS. This enables bundling native code without any build-system boilerplate code.
      
      For more info see:
      
      * https://github.com/flutter/flutter/issues/129757
      
      ### Implementation details for MacOS and iOS.
      
      Dylibs are bundled by (1) making them fat binaries if multiple architectures are targeted, (2) code signing these, and (3) copying them to the frameworks folder. These steps are done manual rather than via CocoaPods. CocoaPods would have done the same steps, but (a) needs the dylibs to be there before the `xcodebuild` invocation (we could trick it, by having a minimal dylib in the place and replace it during the build process, that works), and (b) can't deal with having no dylibs to be bundled (we'd have to bundle a dummy dylib or include some dummy C code in the build file).
      
      The dylibs are build as a new target inside flutter assemble, as that is the moment we know what build-mode and architecture to target.
      
      The mapping from asset id to dylib-path is passed in to every kernel compilation path. The interesting case is hot-restart where the initial kernel file is compiled by the "inner" flutter assemble, while after hot restart the "outer" flutter run compiled kernel file is pushed to the device. Both kernel files need to contain the mapping. The "inner" flutter assemble gets its mapping from the NativeAssets target which builds the native assets. The "outer" flutter run get its mapping from a dry-run invocation. Since this hot restart can be used for multiple target devices (`flutter run -d all`) it contains the mapping for all known targets.
      
      ### Example vs template
      
      The PR includes a new template that uses the new native assets in a package and has an app importing that. Separate discussion in: https://github.com/flutter/flutter/issues/131209.
      
      ### Tests
      
      This PR adds new tests to cover the various use cases.
      
      * dev/devicelab/bin/tasks/native_assets_ios.dart
        * Runs an example app with native assets in all build modes, doing hot reload and hot restart in debug mode.
      * dev/devicelab/bin/tasks/native_assets_ios_simulator.dart
        * Runs an example app with native assets, doing hot reload and hot restart.
      * packages/flutter_tools/test/integration.shard/native_assets_test.dart
        * Runs (incl hot reload/hot restart), builds, builds frameworks for iOS, MacOS and flutter-tester.
      * packages/flutter_tools/test/general.shard/build_system/targets/native_assets_test.dart
        * Unit tests the new Target in the backend.
      * packages/flutter_tools/test/general.shard/ios/native_assets_test.dart
      * packages/flutter_tools/test/general.shard/macos/native_assets_test.dart
        * Unit tests the native assets being packaged on a iOS/MacOS build.
      
      It also extends various existing tests:
      
      * dev/devicelab/bin/tasks/module_test_ios.dart
         * Exercises the add2app scenario.
      * packages/flutter_tools/test/general.shard/features_test.dart
         * Unit test the new feature flag.
      aa36db1d
  5. 09 Aug, 2023 1 commit
    • Victoria Ashworth's avatar
      New tooling for iOS 17 physical devices (#131865) · d631b262
      Victoria Ashworth authored
      This PR includes the following changes. These changes only apply to iOS 17 physical devices.
      
      | Command | Change Description  | Changes to User Experience |
      | ------------- | ------------- | ------------- |
      | `flutter run --release` | Uses `devicectl` to install and launch application in release mode.  | No change.  |
      | `flutter run`  | Uses Xcode via automation scripting to run application in debug and profile mode. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal. |
      | `flutter run --use-application-binary=xxxx` | Creates temporary empty Xcode project and use Xcode to run via automation scripting in debug and profile. | Xcode will be opened in the background. Errors/crashes may be caught in Xcode and therefore may not show in terminal.  |
      | `flutter install` | Uses `devicectl` to check installed apps, install app, uninstall app.  | No change.  |
      | `flutter screenshot` | Will return error.  | Will return error.  |
      
      Other changes include:
      * Using `devicectl` to get information about the device
      * Using `idevicesyslog` and Dart VM logging for device logs
      
      Note:
      Xcode automation scripting (used in `flutter run` for debug and profile) does not work in a headless (without a UI) interface. No known workaround.
      
      Fixes https://github.com/flutter/flutter/issues/128827, https://github.com/flutter/flutter/issues/128531.
      d631b262
  6. 04 Aug, 2023 1 commit
    • 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
  7. 20 Jun, 2023 1 commit
  8. 14 Jun, 2023 1 commit
  9. 04 May, 2023 1 commit
  10. 03 May, 2023 1 commit
  11. 27 Apr, 2023 1 commit
  12. 15 Apr, 2023 1 commit
    • Andrew Kolos's avatar
      [flutter_tools] Remove `Version.unknown` (#124771) · 68ec71f4
      Andrew Kolos authored
      Fixes #124756 by removing the concept of `Version.unknown`.
      
      `Version` fields that needed the ability to represent an unknown version have been made nullable. Assigning `null` to them represents an unknown version.
      68ec71f4
  13. 05 Apr, 2023 1 commit
  14. 04 Apr, 2023 1 commit
  15. 03 Apr, 2023 1 commit
  16. 29 Mar, 2023 1 commit
  17. 16 Mar, 2023 1 commit
  18. 15 Mar, 2023 1 commit
  19. 03 Mar, 2023 1 commit
  20. 28 Feb, 2023 1 commit
  21. 17 Feb, 2023 1 commit
  22. 31 Jan, 2023 1 commit
  23. 20 Jan, 2023 2 commits
  24. 19 Jan, 2023 3 commits
    • Alex Wallen's avatar
      [macos] add flavor options to commands in the `flutter_tool` (#118421) · 73096fd9
      Alex Wallen authored
      * Add new macos target configured for flavors
      
      * Rename Free App copy-Info.plist to Free App Info.plist
      
      * Remove bogus entitlements
      
      * Remove Generated.xcconfig
      
      * Audit project.pbxproj
      
      * Remove unused configs
      
      * share one info.plist
      
      * Modify scheme so that paid app works
      
      * Codesign automatic
      
      * Pipe flavor as scheme into xcodebuild
      
      * Ignore incoming flavor string
      
      * pipe flavor for flutter run to work
      
      * Add devicelab tests
      
      * Error if host and target device are same for flutter install desktop
      
      * Avoid bang (!) by promoting a local.
      Co-authored-by: 's avatarJenn Magder <magder@google.com>
      
      * Add supportsInstall property
      
      * Override  in test classes
      
      * Add install test on macOS
      
      * Refactor application_package and add tests for package directory
      Co-authored-by: 's avatara-wallen <stephenwallen@google.com>
      Co-authored-by: 's avatarJenn Magder <magder@google.com>
      73096fd9
    • Jenn Magder's avatar
      Revert "Support iOS wireless debugging (#118104)" (#118826) · cbf2e168
      Jenn Magder authored
      This reverts commit 5cd2d4c6.
      cbf2e168
    • Victoria Ashworth's avatar
      Support iOS wireless debugging (#118104) · 5cd2d4c6
      Victoria Ashworth authored
      * setup wireless debugging to use device IP
      
      * fix tests
      
      * fix unused var and missing annotation
      
      * remove unneeded try catch
      
      * remove commented out line, change null to package id
      
      * better way to get package id
      
      * update mDNS lookup to continously check for server, add messaging if takes too long to find observatory url, update flutter drive to enable publish-port if using network device
      
      * Refactor mDNS Discovery to poll for observatories and better handle multiple instances of the same app. Update drive command to make publish-port more stable. Update attach for iOS to only use Protocol Discovery if applicable, run mDNS and Protocol Discovery simultaneously, handle --debug-port/--debug-url/--device-vmservice-port, continously poll for obseravtories with mDNS, include port in error message when mutliple available
      
      * add and update comments, use logger spinner intead of timer in flutter attach, other small improvements
      
      * add newline to message so next log won't be on same line
      
      * fix install/waiting for permission status progress so it doens't double print the time it took.
      
      * only print backtrace if observatory times out on a physical usb connected device
      
      * fix test
      
      * Update related references from Observatory to Dart VM Service
      
      * fix test
      5cd2d4c6
  25. 15 Dec, 2022 2 commits
  26. 07 Nov, 2022 1 commit
  27. 06 Nov, 2022 1 commit
    • Chris Bracken's avatar
      Fix macOS migration nothing-to-upgrade test (#114703) · 5bc50c13
      Chris Bracken authored
      When testing whether a macOS deployment target version migration is
      unnecessary due to already being at the target version, we were
      previously checking the iOS deployment target version rather than the
      macOS version. This updates it to test MACOSX_DEPLOYMENT_TARGET instead.
      5bc50c13
  28. 05 Oct, 2022 1 commit
  29. 29 Aug, 2022 1 commit
  30. 30 Jul, 2022 1 commit
  31. 26 Jul, 2022 1 commit
  32. 15 Jul, 2022 1 commit
  33. 18 Jun, 2022 2 commits
  34. 16 Jun, 2022 1 commit
  35. 25 May, 2022 1 commit