- 27 Sep, 2023 1 commit
-
-
Daco Harkes authored
Support for FFI calls with `@Native external` functions through Native assets on Windows. 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 Windows. Mainly follows the design of https://github.com/flutter/flutter/pull/134031. Specifically for Windows in this PR is the logic for finding the compiler `cl.exe` and environment variables that contain the paths to the Windows headers `vcvars.bat` based on `vswhere.exe`.
-
- 25 Sep, 2023 1 commit
-
-
Chris Bracken authored
In our CocoaPods doctor check, if the version of CocoaPods is found to be too low, rather than emitting a link to the install instructions, emit a link to the upgrade instructions. Since this check operates on CocoaPodsStatus, an enum, swtich to using a case statement and cover all cases. ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
-
- 15 Sep, 2023 1 commit
-
-
Daco Harkes authored
Speeds up the native assets target in the backend by 1. changing other targets `gen_dart_plugin_registrant` and `release_unpack_ios` to do async I/O, 2. not reparsing the package config, and 3. not calling `dart pub deps --json` for 0 or 1 packages (fixed package:native_assets_builder). * https://github.com/flutter/flutter/issues/134427 ``` [ +2 ms] native_assets: Starting due to {} [ +2 ms] Skipping target: gen_localizations [ +1 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /Users/dacoharkes/flt/engine/flutter/examples/hello_world/.dart_tool/package_config_subset} [ +33 ms] gen_dart_plugin_registrant: Complete [ +107 ms] release_unpack_ios: Complete [ +60 ms] Writing native_assets.yaml. [ +7 ms] Writing /Users/dacoharkes/flt/engine/flutter/examples/hello_world/.dart_tool/flutter_build/be2692bbfbc0b9a27fcd2422d52354c6/native_assets.yaml done. [ ] native_assets: Complete ``` -> ``` [ +4 ms] native_assets: Starting due to {} [ ] Skipping target: gen_localizations [ +1 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /Users/dacoharkes/flt/engine/flutter/examples/hello_world/.dart_tool/package_config_subset} [ +31 ms] Writing native_assets.yaml. [ +8 ms] Writing /Users/dacoharkes/flt/engine/flutter/examples/hello_world/.dart_tool/flutter_build/f9451a65a465bfab70d004e21d6cc1d6/native_assets.yaml done. [ +1 ms] native_assets: Complete ``` ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
-
- 10 Sep, 2023 1 commit
-
-
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.
-
- 09 Aug, 2023 1 commit
-
-
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.
-
- 04 Aug, 2023 1 commit
-
-
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.
-
- 20 Jun, 2023 1 commit
-
-
Victoria Ashworth authored
This PR fixes issue of duplicate entries from `xcdevice list` cause devices to not show in `flutter devices`, `flutter run`, etc. When a duplicate entry is found, use the entry without errors as the authority. If both have errors, use the one with the higher SDK as the authority. Fixes https://github.com/flutter/flutter/issues/128719.
-
- 14 Jun, 2023 1 commit
-
-
Arne Molland authored
The current implementation of macOS flavor support (#119564) assumes a bundle directory that differs from both the iOS implementation and the official documentation. The [documentation](https://docs.flutter.dev/deployment/flavors) instructs developers to suffix their Xcode build configurations with `-<flavor>`, but the implementation assumes a space: https://github.com/flutter/flutter/blob/5fd9ef4240d3fc239f042f49b8eb1ad24260091f/packages/flutter_tools/lib/src/macos/application_package.dart#L174-L178 Whereas the iOS implementation, which is the reference for the docs, assumes a `-<flavor>` suffix: https://github.com/flutter/flutter/blob/a257efc2841ed7042322fbd043f0983e705d7da2/packages/flutter_tools/lib/src/ios/xcodeproj.dart#L482-L488 This change replaces the empty space with the `-` character which is in line with the documentation and iOS implementation, as well as removing the sentence-casing applied to the flavor name; every bundle built with a flavor keeps the original flavor name in its filename. *List which issues are fixed by this PR. You must list at least one issue.* #122684. *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
- 04 May, 2023 1 commit
-
-
chunhtai authored
fixes https://github.com/flutter/flutter/issues/120405
-
- 03 May, 2023 1 commit
-
-
Kevin Moore authored
-
- 27 Apr, 2023 1 commit
-
-
Jenn Magder authored
Looks like CocoaPods 1.12.1 is incompatible with < Xcode 14 due to https://github.com/CocoaPods/CocoaPods/pull/11828 (see https://github.com/flutter/flutter/issues/123890 for context). Bump the minimum Xcode version allowed by tooling to 14, released September 2022. ``` [!] Xcode - develop for iOS and macOS (Xcode 13.4) â Flutter requires Xcode 14 or higher. Download the latest version or update via the Mac App Store. ``` Fixes https://github.com/flutter/flutter/issues/125286. Previous bump at #97746.
-
- 15 Apr, 2023 1 commit
-
-
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.
-
- 05 Apr, 2023 1 commit
-
-
Chris Bracken authored
In #122336 we migrated the principal class from NSApplication to FlutterApplication in the app Info.plist. We removed the need for FlutterApplication in https://github.com/flutter/engine/pull/40929. This reverses the migration for anyone who previously upgraded on the Flutter master branch. Issue: https://github.com/flutter/flutter/issues/30735 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
-
- 04 Apr, 2023 1 commit
-
-
Victoria Ashworth authored
Better support for wireless devices in IDEs
-
- 03 Apr, 2023 1 commit
-
-
Jenn Magder authored
-
- 29 Mar, 2023 1 commit
-
-
Victoria Ashworth authored
Update device selection to wait for wireless devices to load
-
- 16 Mar, 2023 1 commit
-
-
Greg Spencer authored
Add macos project auto migration code for FlutterApplication
-
- 15 Mar, 2023 1 commit
-
-
Victoria Ashworth authored
Separate attached and wireless devices
-
- 03 Mar, 2023 1 commit
-
-
Victoria Ashworth authored
Update device filtering and introduce isConnected and connectionInterface
-
- 28 Feb, 2023 1 commit
-
-
Todd Volkert authored
Cocoapods ffi error can be in stdout or stderr
-
- 17 Feb, 2023 1 commit
-
-
Ian Hickson authored
* lerp documentation * Remove Note, Note That from repo * Improve BorderSide documentation. * apply review comments
-
- 31 Jan, 2023 1 commit
-
-
Chris Bracken authored
* Reland: [macos] add flavor options to tool commands Adds --flavor option to flutter run and flutter build. Running against preexisting devicelab flavor tests for feature parity between macOS, iOS, and Android. This relands #118421 by alex-wallen which was reverted in #118858 due to the following test failures: The bail-out with "Host and target are the same. Nothing to install." added in `packages/flutter_tools/lib/src/commands/install.dart` triggered failures in the following tests, which unconditionally attempt to install the built app, which is unsupported on desktop since the host and target are the same: * https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8791495589540422465/+/u/run_flutter_view_macos__start_up/test_stdout * https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8791496218824259121/+/u/run_complex_layout_win_desktop__start_up/test_stdout * https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8791496218165602641/+/u/run_flutter_gallery_win_desktop__start_up/test_stdout Fixes #64088 * Partial revert: eliminate install check on desktop The original flavour support patch included a check that triggered a failure when flutter install is run on desktop OSes. This was intentional, since the host and target devices are the same and installation is unnecessary to launch the app on currently-supported desktop OSes. Note that Windows UWP apps *do* require installation to run, and we used to have an install command for those apps, though UWP is no longer supported. Since that part of the change was orthogonal to flavour support itself, I'm reverting that component of the change and we can deal with it separately if so desired.
-
- 20 Jan, 2023 2 commits
-
-
Victoria Ashworth authored
* Reland "Support iOS wireless debugging (#118104)" This reverts commit cbf2e168. * Remove device loading status
-
Jenn Magder authored
This reverts commit 73096fd9.
-
- 19 Jan, 2023 3 commits
-
-
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:
Jenn 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:
a-wallen <stephenwallen@google.com> Co-authored-by:
Jenn Magder <magder@google.com>
-
Jenn Magder authored
This reverts commit 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
-
- 15 Dec, 2022 2 commits
-
-
hellohuanlin authored
* [tools]some ui polish for build ipa validation * do not print out a few success validations * rename installed type to success for more general usage * forgot nit after reverting custom validation types and re-use doctor types
-
Jenn Magder authored
-
- 07 Nov, 2022 1 commit
-
-
Chris Bracken authored
Increases the minimum macOS deployment target from macOS 10.13 (High Sierra) to 10.14 (Mojave) in the macOS app templates. Includes: * Update migration for macOS 10.11 apps to upgrade to 10.14 * Adds migration for macOS 10.13 apps to upgrade to 10.14 * Apply migration to all examples, and integration tests This does not increase version in the plugin templates since those will need to wait until the 10.14 framework rolls to stable channel, so new plugins can build with apps created with `flutter create` on stable channel. Issue: https://github.com/flutter/flutter/issues/114445 See RFC: http://flutter.dev/go/flutter-drop-macOS-10.13-2022-q4 See previous patch: https://github.com/flutter/flutter/pull/107689
-
- 06 Nov, 2022 1 commit
-
-
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.
-
- 05 Oct, 2022 1 commit
-
-
Jenn Magder authored
-
- 29 Aug, 2022 1 commit
-
-
Zachary Anderson authored
-
- 30 Jul, 2022 1 commit
-
-
Jenn Magder authored
-
- 26 Jul, 2022 1 commit
-
-
Jenn Magder authored
-
- 15 Jul, 2022 1 commit
-
-
Jenn Magder authored
-
- 18 Jun, 2022 2 commits
-
-
Jonah Williams authored
-
Jenn Magder authored
-
- 16 Jun, 2022 1 commit
-
-
Jesús S Guerrero authored
-
- 25 May, 2022 1 commit
-
-
Michael Goderbauer authored
-