Commit Graph

106 Commits

Author SHA1 Message Date
Loïc Sharma
40843e3e61
Update minimum macOS version as needed in Swift package (#152347)
If Swift Package Manager is enabled, the tool generates a Swift package at `<ios/macos>/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/`. This Swift package is how the tool adds plugins to the Flutter project.

SwiftPM is strictly enforces platform versions: you cannot depend on a Swift package if its supported version is higher than your own.

On iOS, we use the project's minimum deployment version for the generated Swift package. If a plugin has a higher requirement, you'll need to update your project's minimum deployment version. The generated Swift package is automatically updated the next time you run the tool.

This updates macOS to do the same thing.

Fixes https://github.com/flutter/flutter/issues/146204
2024-07-26 22:02:08 +00:00
Sigurd Meldgaard
21d996929b
Refactor BuildInfo to always require packageConfigPath (#150559)
Refactor warming up to #150196
2024-07-02 11:19:31 +02:00
Elias Yishak
d3b60d4649
Clean up lint ignores (#144229)
Fixes:
- https://github.com/dart-lang/tools/issues/234

Bumps the version for package:unified_analytics and removes TODOs and lint ignores
2024-02-27 23:21:03 +00:00
Elias Yishak
70456f5b2d
Unified analytics events migration for BuildEvent (#137562)
Related to tracker issue:
- https://github.com/flutter/flutter/issues/128251
2023-11-01 19:56:50 +00:00
Victoria Ashworth
af5ac930d8
Set the CONFIGURATION_BUILD_DIR in generated xcconfig when debugging core device (#134493)
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.
2023-09-13 18:08:35 +00:00
Matan Lurey
6579844528
Update flutter_tools internals related to Gradle/XCode to set --local-engine-host. (#132346)
Partial work towards https://github.com/flutter/flutter/issues/132245.

I made a minor refactor to test-only code because it was too confusing
to have 2 optional parameters that are technically required together,
but otherwise all other changes *should* be pass throughs. That being
said, I can't say I totally understand the Gradle stuff so I could use a
hand double checking that.
2023-08-15 07:28:18 -07:00
Victoria Ashworth
d631b26285
New tooling for iOS 17 physical devices (#131865)
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.
2023-08-09 19:25:12 +00:00
LouiseHsu
c9b132d079
Allow .xcworkspace and .xcodeproj to be renamed from default name 'Runner' (#124533)
Adds the ability to rename Runner.xcodeproj and Runner.xcworkspace - fixes https://github.com/flutter/flutter/issues/9767.

To rename a project:
1. Open Runner.xcodeproj in Xcode
2. In the left panel, left click "Show File Inspector" 
<img width="441" alt="Screenshot 2023-04-17 at 11 41 07 PM" src="https://user-images.githubusercontent.com/36148254/232692957-8743742d-c3ef-42e5-833f-dff31aeb2b6a.png">
3. In the right panel, the name of the project, "Runner", should be visible under "Identity and Type". Change the name and press enter.
<img width="299" alt="Screenshot 2023-04-17 at 11 40 43 PM" src="https://user-images.githubusercontent.com/36148254/232693315-b6a71165-f5e3-4a0f-8954-2f3eee5b67cf.png">
4. A wizard should pop up. Click Rename.
<img width="573" alt="Screenshot 2023-04-17 at 11 44 01 PM" src="https://user-images.githubusercontent.com/36148254/232693381-bb9cf026-2a75-4844-b42d-ae0036ae9fdd.png">
To rename the workspace:

1. Make sure Xcode is closed.
2. Rename the .xcworkspace to your new name.

If you also renamed the project

&nbsp; 3. Reopen the .xcworkspace in Xcode. If the selected project is the old name and in red, update it to match the new project name.

Tests for schemeFor were changed as with Xcode 14, in some cases the scheme will be renamed along with the project. Thus we will get the best match scheme for either the project name, or the default name Runner. However if a flavor is present, the scheme should always match the flavor.
2023-05-03 05:52:58 +00:00
Victoria Ashworth
8aad1190b7
Check for watch companion in build settings (#114078) 2022-10-27 22:05:05 +00:00
Jenn Magder
9f5c6553bc
Revert "Check for watch companion in build settings (#113956)" (#114035)
This reverts commit e13372188f.
2022-10-25 13:33:35 -07:00
Victoria Ashworth
e13372188f
Check for watch companion in build settings (#113956) 2022-10-25 20:08:19 +00:00
Jonah Williams
db829c1e20
[flutter_tools] migrate more unit tests to null safety (#106153) 2022-06-17 21:34:27 -07:00
Jesús S Guerrero
32b22b85de
parse build version on xcodeproj (#105908) 2022-06-16 22:26:06 +00:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals (#102585) 2022-04-27 09:15:35 +02:00
Jenn Magder
d4bfb01336
Do not build for iOS armv7 (#97341) 2022-04-12 14:44:09 -07:00
Yang Chao
343713727a
Enable track widget creation when generating Generated.xcconfig (#101123) 2022-04-11 14:29:11 -07:00
Jenn Magder
a452c92d5d
Set ARCHS to single-arch for local engine macOS builds (#100917) 2022-03-28 18:45:06 -07:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint (#91409)" (#91461)
This reverts commit 5fd259be24.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint (#91409) 2021-10-07 20:13:02 -07:00
Jenn Magder
61e2e86611
Add iOS build -destination flag (#90915) 2021-10-04 10:18:03 -07:00
Jenn Magder
ab6f2fc8ce
Set BUILD_DIR when determining if plugins support arm64 simulators (#90088) 2021-09-15 18:37:04 -07:00
Jenn Magder
7424db448d
Exclude arm64 from iOS app archs if unsupported by plugins on x64 Macs (#87362) 2021-07-30 14:44:04 -07:00
Jenn Magder
a69b3ca5d3
Exclude arm64 from iOS app archs if unsupported by plugins (#87244) 2021-07-30 10:54:34 -07:00
Jenn Magder
f76b292626
Support iOS arm64 simulator (#85642) 2021-06-30 14:31:04 -07:00
Zachary Anderson
407916d44f
Revert "Support iOS arm64 simulator (#85059)" (#85641)
This reverts commit a1020512ef.
2021-06-30 12:44:49 -07:00
Jenn Magder
a1020512ef
Support iOS arm64 simulator (#85059) 2021-06-30 11:56:17 -07:00
Jenn Magder
8334fb0a1e
Tool exit on xcodebuild -list when Xcode project is corrupted (#82476) 2021-05-13 21:34:04 -07:00
Jonah Williams
bfe16a8640
[flutter_tools] remove even more mocks (#81618) 2021-05-10 08:24:03 -07:00
Jenn Magder
db3f49b1b4
Use cached Xcode build settings during iOS build (#80904) 2021-04-27 17:20:11 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations (#80817) 2021-04-21 13:49:03 -07:00
Jenn Magder
72976f552c
Migrate xcodeproj to null safety (#80549) 2021-04-16 17:22:46 -07:00
Jenn Magder
56c0002c47
Adopt FakeProcessManager.empty (#80480) 2021-04-15 14:19:02 -07:00
Jenn Magder
15c591a15f
Split out XcodeProjectInterpreter from xcode_build_settings (#80399) 2021-04-14 16:51:10 -07:00
Jonah Williams
4807f806e2
[flutter_tools] remove globals from logger (#78353) 2021-03-16 16:46:21 -07:00
Michael Goderbauer
cb867bbedc
Enable unnecessary_await_in_return lint (#77434) 2021-03-05 18:38:15 -08:00
Michael Goderbauer
7b251f5f37
Enable use_function_type_syntax_for_parameters lint (#77163) 2021-03-04 08:59:17 -08:00
Jenn Magder
eee0dc8441
Exclude arm64 from valid iOS simulators (#73828) 2021-03-03 18:58:37 -08:00
Jenn Magder
62d8969203
Adopt Artifacts.test(localEngine:) in a few tests (#76354) 2021-02-18 19:31:03 -08:00
Sam Rawlins
ba58ad0385
Remove "unnecessary" imports in test/general.shard (#75954) 2021-02-18 13:38:24 -08:00
Jonah Williams
04182572f7
[flutter_tools] allow bypassing context for FlutterProject creation, remove fromPath (#76258) 2021-02-18 12:36:04 -08:00
Jenn Magder
5b823cded8
Remove dead mock classes (#75757) 2021-02-10 17:01:28 -08:00
Jenn Magder
152d88a3df
Add exception to FakeCommand (#75545) 2021-02-09 10:07:46 -08:00
Jonah Williams
021311ed8a
Revert "[flutter_tools] move process manager into tool (#75350)" (#75639)
This reverts commit 8b6baae44c.
2021-02-08 09:21:46 -08:00
Jonah Williams
8b6baae44c
[flutter_tools] move process manager into tool (#75350)
Our current top crasher is an unclear error when ProcessManager fails to resolve an executable path. To fix this, we'd like to being adjusting the process resolution logic and adding more instrumentation to track failures. In order to begin the process, the ProcessManager has been folded back into the flutter tool
2021-02-04 13:19:11 -08:00
Jonah Williams
b926c7b696
[flutter_tools] rewrite Usage.test to capture objects instead of print logs (#74829) 2021-01-28 12:41:14 -08:00
Jonah Williams
74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. (#74832)
* opt out the flutter tool

* oops EOF

* fix import

* Update tool_backend.dart

* Update daemon_client.dart

* fix more
2021-01-27 15:17:53 -08:00
Alexandre Ardhuin
d546e1d311
fix for upcoming lint use_named_constants (#74788) 2021-01-27 20:20:44 +01:00
Jenn Magder
17edb9aa8c
Build x86_64 iOS apps with simulator local engines (#74003) 2021-01-15 14:47:14 -08:00
Jenn Magder
f63055a895
Revert "Exclude arm64 from valid iOS simulators (#73755)" (#73807)
This reverts commit 201e5e4ecb.
2021-01-12 13:02:46 -08:00