- 19 Mar, 2024 1 commit
-
-
goodmost authored
fix some comments
-
- 04 Mar, 2024 1 commit
-
-
Jenn Magder authored
Explicitly handle the case where the iOS device is not paired. On `flutter run` show an error and bail instead of trying and failing to launch on the device. On this PR: ``` $ flutter run -d 00008110-0009588C2651401E 'iPhone' is not paired. Open Xcode and trust this computer when prompted. $ ``` Fixes https://github.com/flutter/flutter/issues/144447 Closes https://github.com/flutter/flutter/pull/144095
-
- 27 Feb, 2024 1 commit
-
-
Elias Yishak authored
Fixes: - https://github.com/dart-lang/tools/issues/234 Bumps the version for package:unified_analytics and removes TODOs and lint ignores
-
- 08 Feb, 2024 1 commit
-
-
Daco Harkes authored
Reland of https://github.com/flutter/flutter/pull/142709. The revert of the revert is in the first commit, the fix in the commit on top. The move of the fakes for packages/flutter_tools/test/general.shard/resident_runner_test.dart was erroneous before, as it was trying to use setters instead of a private field. This PR changes the private `_devFS` field in the fake to be a public `fakeDevFS` in line with other fakes. ## Original PR description Native assets in other build systems are not built with `package:native_assets_builder` invoking `build.dart` scripts. Instead all packages have their own blaze rules. Therefore we'd like to not depend on `package:native_assets_builder` from flutter tools in g3 at all. This PR aims to move the imports of `native_assets_builder` and `native_assets_cli` into the `isolated/` directory and into the files with a `main` function that are not used in with other build systems. In order to be able to remove all imports in files used by other build systems, two new interfaces are added `HotRunnerNativeAssetsBuilder` and `TestCompilerNativeAssetsBuilder`. New parameters are then piped all the way through from the entry points: * bin/fuchsia_tester.dart * lib/executable.dart The build_system/targets dir is already excluded in other build systems. So, after this PR only the two above files and build_system/targets import from `isolated/native_assets/` and only `isolated/native_assets/` import `package:native_assets_cli` and `package:native_assets_builder`. Context: * https://github.com/flutter/flutter/issues/142041
-
- 07 Feb, 2024 1 commit
-
-
auto-submit[bot] authored
Reverts flutter/flutter#142709 Initiated by: vashworth Reason for reverting: `Mac tool_tests_general` started failing on this commit: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20tool_tests_general/15552/overview Original PR Author: dcharkes Reviewed By: {christopherfujino, chingjun, reidbaker} This change reverts the following previous change: Original Description: Native assets in other build systems are not built with `package:native_assets_builder` invoking `build.dart` scripts. Instead all packages have their own blaze rules. Therefore we'd like to not depend on `package:native_assets_builder` from flutter tools in g3 at all. This PR aims to move the imports of `native_assets_builder` and `native_assets_cli` into the `isolated/` directory and into the files with a `main` function that are not used in with other build systems. In order to be able to remove all imports in files used by other build systems, two new interfaces are added `HotRunnerNativeAssetsBuilder` and `TestCompilerNativeAssetsBuilder`. New parameters are then piped all the way through from the entry points: * bin/fuchsia_tester.dart * lib/executable.dart The build_system/targets dir is already excluded in other build systems. So, after this PR only the two above files and build_system/targets import from `isolated/native_assets/` and only `isolated/native_assets/` import `package:native_assets_cli` and `package:native_assets_builder`. Context: * https://github.com/flutter/flutter/issues/142041
-
- 06 Feb, 2024 1 commit
-
-
Daco Harkes authored
Native assets in other build systems are not built with `package:native_assets_builder` invoking `build.dart` scripts. Instead all packages have their own blaze rules. Therefore we'd like to not depend on `package:native_assets_builder` from flutter tools in g3 at all. This PR aims to move the imports of `native_assets_builder` and `native_assets_cli` into the `isolated/` directory and into the files with a `main` function that are not used in with other build systems. In order to be able to remove all imports in files used by other build systems, two new interfaces are added `HotRunnerNativeAssetsBuilder` and `TestCompilerNativeAssetsBuilder`. New parameters are then piped all the way through from the entry points: * bin/fuchsia_tester.dart * lib/executable.dart The build_system/targets dir is already excluded in other build systems. So, after this PR only the two above files and build_system/targets import from `isolated/native_assets/` and only `isolated/native_assets/` import `package:native_assets_cli` and `package:native_assets_builder`. Context: * https://github.com/flutter/flutter/issues/142041
-
- 01 Feb, 2024 1 commit
-
-
Victoria Ashworth authored
When the Dart VM is not found within 10 minutes in CI on CoreDevices (iOS 17+), stop the app and upload the logs from DerivedData. The app has to be stopped first since the logs are not put in DerivedData until it's stopped. Also, rearranged some logic to have CoreDevice have its own function for Dart VM url discovery. Debugging for https://github.com/flutter/flutter/issues/142448.
-
- 31 Jan, 2024 1 commit
-
-
Christopher Fujino authored
Add debugging for #141892 to detect when the temp file mysteriously disappears after running devicectl.
-
- 25 Jan, 2024 1 commit
-
-
Andrew Kolos authored
Part of work on [#101077](https://github.com/flutter/flutter/pull/141194). This is done as a separate PR to avoid a massive diff. ## Context 1. The `FakeCommand` class accepts a list of patterns that's used to match a command given to its `FakeProcessManager`. Since `FakeCommand` can match a list of patterns, not just specifically strings, it can be used to match commands where the exact value of some arguments can't (easily) known ahead of time. For example, a part of the tool may invoke a command with an argument that is the path of a temporarily file that has a randomly-generated basename. 2. The `FakeCommand` class provides on `onRun` parameter, which is a callback that is run when the `FakeProcessManager` runs a command that matches the `FakeCommand` in question. ## Issue In the event that a `FakeCommand` is constructed using patterns, the test code can't know the exact values used for arguments in the command. This PR proposes changing the type of `onRun` from `VoidCallback?` to `void Function(List<String>)?`. When run, the value `List<String>` parameter will be the full command that the `FakeCommand` matched. Example: ```dart FakeCommand( command: <Pattern>[ artifacts.getArtifactPath(Artifact.engineDartBinary), 'run', 'vector_graphics_compiler', RegExp(r'--input=/.*\.temp'), RegExp(r'--output=/.*\.temp'), ], onRun: (List<String> command) { final outputPath = (() { // code to parse `--output` from `command` })(); testFileSystem.file(outputPath).createSync(recursive: true); }, ) ```
-
- 24 Jan, 2024 1 commit
-
-
Jo Jaeyong authored
`idevicesyslog` requires the `--network` flag to obtain logs for iOS devices when wirelessly paired. When running Flutter on devices with iOS 12 or earlier versions, [the `idevicesyslog` command is used.](https://github.com/flutter/flutter/blob/5931b4f21da0c564b28794f40257b5f660596a3e/packages/flutter_tools/lib/src/ios/devices.dart#L1269-L1277). Related Issue: #15072 Related PRs: #118104, #118895, #60623
-
- 22 Jan, 2024 1 commit
-
-
Daco Harkes authored
Fixes https://github.com/flutter/flutter/issues/141827 Reland: https://dart-review.googlesource.com/c/sdk/+/346960 has rolled into g3, so the imports should now resolve in g3 as well. > [!CAUTION] > _Do NOT merge if "Google Testing" bot didn't run!_ Rolls the packages from https://github.com/dart-lang/native in the native assets implementation. Most notable we're refactoring `package:native_assets_cli` for `build.dart` use. Therefore, all imports to that package for Flutter/Dart should be to the implementation internals that are no longer visible for `build.dart` writers. Hence all the import updates. No behavior in Flutter apps should change. This PR also updates the template to use the latests version of `package:native_assets_cli` which no longer exposes all the implementation details.
-
- 19 Jan, 2024 1 commit
-
-
Daco Harkes authored
Packages the native assets for iOS and MacOS in frameworks. Issue: * https://github.com/flutter/flutter/issues/140544 * https://github.com/flutter/flutter/issues/129757 ## Details * [x] This packages dylibs from the native assets feature in frameworks. It packages every dylib in a separate framework. * [x] The dylib name is updated to use `@rpath` instead of `@executable_path`. * [x] The dylibs for flutter-tester are no longer modified to change the install name. (Previously it was wrongly updating the install name to the location the dylib would have once deployed in an app.) * [x] Use symlinking on MacOS.
-
- 18 Jan, 2024 1 commit
-
-
Jesús S Guerrero authored
b/320767653 Reverts flutter/flutter#141684
-
- 17 Jan, 2024 1 commit
-
-
Daco Harkes authored
Rolls the packages from https://github.com/dart-lang/native in the native assets implementation. Most notable we're refactoring `package:native_assets_cli` for `build.dart` use. Therefore, all imports to that package for Flutter/Dart should be to the implementation internals that are no longer visible for `build.dart` writers. Hence all the import updates. No behavior in Flutter apps should change. This PR also updates the template to use the latests version of `package:native_assets_cli` which no longer exposes all the implementation details.
-
- 16 Jan, 2024 1 commit
-
-
Anis Alibegić authored
I continued [my mission](https://github.com/flutter/flutter/pull/141431) to find as many typos as I could. This time it's a smaller set than before. There is no need for issues since it's a typo fix.
-
- 12 Jan, 2024 1 commit
-
-
Anis Alibegić authored
Fair amount of typos spotted and fixed. Some of them are in comments, some of them are in code and some of them are in nondart files. There is no need for issues since it's a typo fix. I have doubts about [packages/flutter_tools/lib/src/ios/core_devices.dart](https://github.com/flutter/flutter/compare/master...anisalibegic:flutter:master#diff-fdbc1496b4bbe7e2b445a567fd385677af861c0093774e3d8cc460fdd5b794fa), I have a feeling it might broke some things on the other end, even though it's a typo.
-
- 03 Jan, 2024 2 commits
-
-
Jenn Magder authored
Change the following in the `flutter create` templates. I didn't make any auto-migrations for existing apps because none seem that critical: 1. Turn on `ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS` in iOS and macOS. 1. Turn on `BuildIndependentTargetsInParallel` in macOS template. https://github.com/flutter/flutter/pull/125827/files#r1181817619 1. Turn on `DEAD_CODE_STRIPPING` in macOS template. 1. Set `ENABLE_USER_SCRIPT_SANDBOXING=NO` in iOS and macOS template. `flutter` scripts don't work with this on. This might require a migration in the future to explicitly turn this one off. However at least for now if the setting isn't present it defaults to `NO`. Add migration for `LastUpgradeVersion` so users won't see these validation issues in Xcode. Run migrator on all the example apps. A few aren't Flutter apps so I edited them in Xcode. Fixes https://github.com/flutter/flutter/issues/140253 See also https://github.com/flutter/flutter/issues/125817 and https://github.com/flutter/flutter/pull/90304.
-
Jenn Magder authored
Reland https://github.com/flutter/flutter/pull/140478 with `ios_content_validation_test` test fix. ``` [ios_content_validation_test] Process terminated with exit code 0. Task result: { "success": true, "data": null, "detailFiles": [], "benchmarkScoreKeys": [], "reason": "success" } ``` __________ 1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0. 2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'` 3. Compile with `-miphoneos-version-min=12.0` 4. Run the migrator on all example apps and integration tests. See also https://github.com/flutter/flutter/pull/62902 and https://github.com/flutter/flutter/pull/85174 and https://github.com/flutter/flutter/pull/101963 Fixes https://github.com/flutter/flutter/issues/136060
-
- 02 Jan, 2024 2 commits
-
-
auto-submit[bot] authored
Reverts flutter/flutter#140478 Initiated by: loic-sharma This change reverts the following previous change: Original Description: 1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0. 2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'` 3. Compile with `-miphoneos-version-min=12.0` 4. Run the migrator on all example apps and integration tests. See also https://github.com/flutter/flutter/pull/62902 and https://github.com/flutter/flutter/pull/85174 and https://github.com/flutter/flutter/pull/101963 Fixes https://github.com/flutter/flutter/issues/136060
-
Jenn Magder authored
1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0. 2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'` 3. Compile with `-miphoneos-version-min=12.0` 4. Run the migrator on all example apps and integration tests. See also https://github.com/flutter/flutter/pull/62902 and https://github.com/flutter/flutter/pull/85174 and https://github.com/flutter/flutter/pull/101963 Fixes https://github.com/flutter/flutter/issues/136060
-
- 20 Dec, 2023 1 commit
-
-
Christopher Fujino authored
[flutter_tools] handle FileSystemException trying to delete temp directory from core_devices.dart (#140415) Fixes https://github.com/flutter/flutter/issues/140416, the top crasher on stable/3.16.4
-
- 12 Dec, 2023 1 commit
-
-
Christopher Fujino authored
Fixes https://github.com/flutter/flutter/issues/139709 This adds a static helper method `ProcessUtils.writelnToStdinGuarded()`, which will asynchronously write to a sub-process's STDIN `IOSink` and catch errors. In talking with Brian, it sounds like this is the best and most reliable way to catch `SocketException`s during these writes *to sub-process file descriptors* specifically (with a "real" hard drive file, the future returned by `.flush()` should complete with the write error). Also, as I note in the dartdoc to `writelnToStdinGuarded()`, the behavior seems to be different between macOS and linux. Moving forward, in any place where we want to catch exceptions writing to STDIN, we will want to use this new helper.
-
- 08 Dec, 2023 1 commit
-
-
Victoria Ashworth authored
For CoreDevices we use a combination of mDNS and device logs to find the Dart VM url. If mDNS fails first, it will cause the launch to fail even though the device logs may be able to find the url. So if one of the methods fails, wait for the other method before failing the launch. Fixes https://github.com/flutter/flutter/issues/139685.
-
- 04 Dec, 2023 1 commit
-
-
Elias Yishak authored
Relanding based on this comment: - https://github.com/flutter/flutter/pull/139278#issuecomment-1832951108 Related to tracker issue: - https://github.com/flutter/flutter/issues/128251 <img width="278" alt="image" src="https://github.com/flutter/flutter/assets/42216813/cee7b9be-48d6-48e5-8c39-de28d0a1f0de"> The image above shows all of the instances where we have `sendTiming`. All of the call sites have been updated to use the new `Event.timing` event from `package:unified_analytics`.
-
- 30 Nov, 2023 1 commit
-
-
auto-submit[bot] authored
Reverts flutter/flutter#138896 Initiated by: CaseyHillers This change reverts the following previous change: Original Description: Related to tracker issue: - https://github.com/flutter/flutter/issues/128251 <img width="278" alt="image" src="https://github.com/flutter/flutter/assets/42216813/cee7b9be-48d6-48e5-8c39-de28d0a1f0de"> The image above shows all of the instances where we have `sendTiming`. All of the call sites have been updated to use the new `Event.timing` event from `package:unified_analytics`.
-
- 29 Nov, 2023 1 commit
-
-
Elias Yishak authored
Related to tracker issue: - https://github.com/flutter/flutter/issues/128251 <img width="278" alt="image" src="https://github.com/flutter/flutter/assets/42216813/cee7b9be-48d6-48e5-8c39-de28d0a1f0de"> The image above shows all of the instances where we have `sendTiming`. All of the call sites have been updated to use the new `Event.timing` event from `package:unified_analytics`.
-
- 22 Nov, 2023 1 commit
-
-
Elias Yishak authored
Add `commandHasTerminal` parameter + apple usage event + `sendException` events for `package:unified_analytics` (#138806) Relates to tracker issue: - https://github.com/flutter/flutter/issues/128251 This PR includes 3 major updates: - Adding the `commandHasTerminal` parameter for `Event.flutterCommandResult` - In `packages/flutter_tools/lib/src/runner/flutter_command.dart` - Adding the new event for `sendException` from package:usage to be `Event.exception` (this event can be used by all dash tools) - In `packages/flutter_tools/lib/runner.dart` - Migrating the generic `UsageEvent` which was only used for Apple related workflows for iOS and macOS. I did an initial analysis in this [sheet](https://docs.google.com/spreadsheets/d/11KJLkHXFpECMX7tw-trNkYSr5MHDG15XNGv6TgLjfQs/edit?resourcekey=0-j4qdvsOEEg3wQW79YlY1-g#gid=0) to identify all the call sites - Found in several files, highlighted in the sheet above
-
- 07 Nov, 2023 1 commit
-
-
Daco Harkes authored
If the native assets feature is enabled, and the `build.dart` invocation fails, the `flutter build` and `flutter run` should abort. Closes: https://github.com/flutter/flutter/issues/137910
-
- 01 Nov, 2023 1 commit
-
-
Elias Yishak authored
Related to tracker issue: - https://github.com/flutter/flutter/issues/128251
-
- 30 Oct, 2023 1 commit
-
-
- 25 Oct, 2023 1 commit
-
-
Victoria Ashworth authored
Some users have their Xcode settings set to not debug (see example here https://github.com/flutter/flutter/issues/136197#issuecomment-1766834195). This will cause the [engine check for a debugger](https://github.com/flutter/engine/blob/22ce5c6a45e2898b4ce348c514b5fa42ca25bc88/runtime/ptrace_check.cc#L56-L71) to fail, which will cause an error and cause the app to crash. This PR parses the scheme file to ensure the scheme is set to start a debugger and warn the user if it's not. Fixes https://github.com/flutter/flutter/issues/136197.
-
- 12 Oct, 2023 1 commit
-
-
Derek Xu authored
-
- 28 Sep, 2023 1 commit
-
-
Yegor authored
This implements https://github.com/flutter/flutter/issues/132654#issuecomment-1738221257, namely: Make `Chromium.close` more robust: * Send `SIGTERM` and wait up to 5 seconds, if the process exited, great! Return from the function. * If the process has not exited, then send a `SIGKILL`, which is a much firmer way to exit a process. Same as before, wait up to 5 seconds, if the process exited, great! Return from the function. * If it still hasn't exited then give up trying to exit Chromium, just print a warning to the console and return from the function. Bonus: a few nullability fixes and extra `-v` logging. Fixes https://github.com/flutter/flutter/issues/132654
-
- 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`.
-
- 26 Sep, 2023 1 commit
-
-
Victoria Ashworth authored
So there appears to be a race situation between the flutter CLI and Xcode. In the CLI, we update the `CONFIGURATION_BUILD_DIR` in the Xcode build settings and then tell Xcode to install, launch, and debug the app. When Xcode installs the app, it should use the `CONFIGURATION_BUILD_DIR` to find the bundle. However, it appears that sometimes Xcode hasn't processed the change to the build settings before the install happens, which causes it to not be able to find the bundle. Fixes https://github.com/flutter/flutter/issues/135442 --- Since it's a timing issue, there's not really a consistent way to test it. I was able to confirm that it works, though, by using the following steps: 1. Create a flutter project 2. Open the project in Xcode 3. `flutter clean` 4. `flutter run --profile -v` If I saw a print line `stderr: CONFIGURATION_BUILD_DIR: build/Debug-iphoneos`, that means it first found the old and incorrect `CONFIGURATION_BUILD_DIR` before updating to the the new, so I was able to confirm that it would wait until it updated.
-
- 20 Sep, 2023 1 commit
-
-
Michael Goderbauer authored
Avoids that dynamic accidentally sneaks in, see https://dart.dev/tools/analysis#enabling-additional-type-checks
-
- 18 Sep, 2023 1 commit
-
-
Victoria Ashworth authored
When retrying to connect to the device during app launch, don't uninstall the app first. Latest test flake for https://github.com/flutter/flutter/issues/120808: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8770202475999850785/+/u/run_hot_mode_dev_cycle_ios__benchmark/test_stdout Shows that it uninstalled and then tried debugging and failed, which would make sense since the app wasn't installed anymore. ``` [2023-09-11 18:02:24.555646] [STDOUT] stdout: [ +6 ms] Lost connection to device. Trying to connect again... [2023-09-11 18:02:24.556949] [STDOUT] stdout: [ +1 ms] executing: /opt/s/w/ir/x/w/recipe_cleanup/tmp53fs1szo/flutter sdk/bin/cache/artifacts/libimobiledevice/idevicesyslog -u 00008030-00144DA10185402E [2023-09-11 18:02:24.557323] [STDOUT] stdout: [ ] executing: script -t 0 /dev/null /opt/s/w/ir/x/w/recipe_cleanup/tmp53fs1szo/flutter sdk/bin/cache/artifacts/ios-deploy/ios-deploy --id 00008030-00144DA10185402E --bundle build/ios/iphoneos/Flutter Gallery.app --app_deltas build/ios/app-delta --uninstall --noinstall --debug --no-wifi --args --enable-dart-profiling --disable-vm-service-publication --enable-checked-mode --verify-entry-points [2023-09-11 18:02:24.578010] [STDOUT] stdout: [ +20 ms] [....] Waiting for iOS device to be connected [2023-09-11 18:02:24.712631] [STDOUT] stdout: [ +134 ms] [....] Using 00008030-00144DA10185402E (N104AP, iPhone 11, iphoneos, arm64e, 16.2, 20C65) a.k.a. 'iPhone 11'. [2023-09-11 18:02:24.712725] [STDOUT] stdout: [ ] ------ Uninstall phase ------ [2023-09-11 18:02:24.818293] [STDOUT] stdout: [ +105 ms] [ OK ] Uninstalled package with bundle id io.flutter.examples.gallery [2023-09-11 18:02:24.906833] [STDOUT] stdout: [ +88 ms] ------ Debug phase ------ [2023-09-11 18:02:24.906924] [STDOUT] stdout: [ ] Starting debug of 00008030-00144DA10185402E (N104AP, iPhone 11, iphoneos, arm64e, 16.2, 20C65) a.k.a. 'iPhone 11' connected through USB... [2023-09-11 18:02:25.285252] [STDOUT] stdout: [ +378 ms] [ 0%] Looking up developer disk image [2023-09-11 18:02:25.529937] [STDOUT] stdout: [ +244 ms] [ 90%] Mounting developer disk image [2023-09-11 18:02:25.545261] [STDOUT] stdout: [ +15 ms] [ 95%] Developer disk image already mounted [2023-09-11 18:02:25.587923] [STDOUT] stdout: [ +42 ms] Detected path to iOS debug symbols: "Symbol Path: /Users/swarming/Library/Developer/Xcode/iOS DeviceSupport/16.2 (20C65) arm64e/Symbols" [2023-09-11 18:02:25.857177] [STDOUT] stdout: [ +269 ms] Script started, output file is /dev/null [2023-09-11 18:02:25.857259] [STDOUT] stdout: [ ] Script done, output file is /dev/null [2023-09-11 18:02:25.857511] [STDOUT] stdout: [ ] ios-deploy exited with code 0 [2023-09-11 18:02:25.858066] [STDOUT] stderr: [ ] Could not run build/ios/iphoneos/Flutter Gallery.app on 00008030-00144DA10185402E. [2023-09-11 18:02:25.858130] [STDOUT] stderr: [ ] Try launching Xcode and selecting "Product > Run" to fix the problem: [2023-09-11 18:02:25.858214] [STDOUT] stderr: [ ] open ios/Runner.xcworkspace [2023-09-11 18:02:25.858537] [STDOUT] stdout: [ ] Installing and launching... (completed in 52.4s) [2023-09-11 18:02:25.858956] [STDOUT] stderr: [ ] Error launching application on iPhone 11. ```
-
- 13 Sep, 2023 1 commit
-
-
Victoria Ashworth authored
Xcode uses the CONFIGURATION_BUILD_DIR build setting to determine the location of the bundle to build and install. When launching an app via Xcode with the Xcode debug workflow (for iOS 17 physical devices), temporarily set the CONFIGURATION_BUILD_DIR to the location of the bundle so Xcode can find it. Also, added a Xcode Debug version of the `microbenchmarks_ios` integration test since it uses `flutter run --profile` without using `--use-application-binary`. Fixes https://github.com/flutter/flutter/issues/134186.
-
- 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.
-
- 05 Sep, 2023 1 commit
-
-
Victoria Ashworth authored
Sometimes `ios-deploy` loses connection to the device after installing, starting debugserver, and launching. This is shown with an error message like: ``` Process 579 exited with status = -1 (0xffffffff) lost connection ``` This happens frequently in our CI system: https://github.com/flutter/flutter/issues/120808 Usually in CI, on retry it'll work and pass - so this is an attempt to retry without failing the test first. It's not guaranteed to fix since we're unable to recreate this error locally.
-