Commit Graph

41 Commits

Author SHA1 Message Date
auto-submit[bot]
c32ffa65c9
Reverts "[Reland] Skip injecting Bonjour settings when port publication is disabled" (#136839)
Reverts flutter/flutter#136751
Initiated by: vashworth
This change reverts the following previous change:
Original Description:
Reland of https://github.com/flutter/flutter/pull/136562 with fixes.
2023-10-18 20:33:17 +00:00
Victoria Ashworth
1599cbebc3
[Reland] Skip injecting Bonjour settings when port publication is disabled (#136751)
Reland of https://github.com/flutter/flutter/pull/136562 with fixes.
2023-10-18 20:08:19 +00:00
Christopher Fujino
8a31a3a284
Flutter preview device (#135639)
Fixes https://github.com/flutter/flutter/issues/130277

This PR does two things:

1. introduce a hidden `flutter build _preview` command, that will build a debug windows desktop app and copy it into the SDK's binary cache. This command is only intended to be run during packaging.
2. introduce a new device type, called `PreviewDevice`, which relies on the prebuilt desktop debug app from step 1, copies it into the target app's assets build folder, and then hot reloads their dart code into it.
2023-10-18 00:27:54 +00:00
auto-submit[bot]
54c0a350dd
Reverts "Skip injecting Bonjour settings when port publication is disabled" (#136750)
Reverts flutter/flutter#136562
Initiated by: vashworth
This change reverts the following previous change:
Original Description:
Some of our tests in CI are triggering the `NSLocalNetworkUsageDescription` dialog when they're not supposed to (https://github.com/flutter/flutter/issues/129836) since it's disabled via flags (`--no-publish-port` for flutter/flutter and `--disable-vm-service-publication` for flutter/engine).

Normally, we inject `NSLocalNetworkUsageDescription` (and other bonjour settings) to the Info.plist during the project build for debug and profile mode since by default they will publish the VM Service port over mDNS.

To help diagnose the issue, though, this PR changes it so that we don't inject `NSLocalNetworkUsageDescription` (and other bonjour settings) when port publication is disabled since it shouldn't be needed. Hopefully, this will give us better error messages or cause the app to crash and end the test early (rather than timeout after 30 minutes).
2023-10-17 19:27:19 +00:00
Victoria Ashworth
0383d8ba9e
Skip injecting Bonjour settings when port publication is disabled (#136562)
Some of our tests in CI are triggering the `NSLocalNetworkUsageDescription` dialog when they're not supposed to (https://github.com/flutter/flutter/issues/129836) since it's disabled via flags (`--no-publish-port` for flutter/flutter and `--disable-vm-service-publication` for flutter/engine).

Normally, we inject `NSLocalNetworkUsageDescription` (and other bonjour settings) to the Info.plist during the project build for debug and profile mode since by default they will publish the VM Service port over mDNS.

To help diagnose the issue, though, this PR changes it so that we don't inject `NSLocalNetworkUsageDescription` (and other bonjour settings) when port publication is disabled since it shouldn't be needed. Hopefully, this will give us better error messages or cause the app to crash and end the test early (rather than timeout after 30 minutes).
2023-10-17 19:09:08 +00:00
Zachary Anderson
30a9f99bc8
Send analytics on 'build ios' and 'build ipa' for plist impeller value (#135193)
This analytics event only records the value of the plist entry on
`build` commands. This will give an idea of the proportion of users who
are disabling Impeller when shipping apps.
2023-09-21 11:49:29 -07:00
Victoria Ashworth
2892b57558
Reland "Print pretty error when xcodebuild fails due to missing simulator #130286" (#130506)
Reland https://github.com/flutter/flutter/pull/130286 with fix.

It failed the first time because of a discrepancy between the master branch and my branch (see https://github.com/flutter/flutter/pull/130504#issue-1803449182 for more info).
2023-07-13 19:36:10 +00:00
Victoria Ashworth
ab86c79c3a
Revert "Print pretty error when xcodebuild fails due to missing simulator" (#130504)
Reverts flutter/flutter#130286
2023-07-13 17:19:56 +00:00
Victoria Ashworth
604010e9e2
Print pretty error when xcodebuild fails due to missing simulator (#130286)
Starting in Xcode 15, the simulator is no longer included in Xcode and must be downloaded and installed separately.

If you try to run flutter and the simulator is missing, you'll get an error like
```
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
               		{ id:B1234A5C-67B8-901D-B2CB-FE34F56BDE78 }

               	Ineligible destinations for the "Runner" scheme:
               		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 17.0 is not installed. To use with Xcode, first download and install the platform }
```

Print a pretty error to make it easier for developers to know what to do.

Part 2 of https://github.com/flutter/flutter/issues/129558.
2023-07-13 16:51:13 +00:00
Victoria Ashworth
6c2023162f
Change resultBundlePath representation from File to Directory (#130156)
`resultBundlePath` is meant to be a directory. In the `xcodebuild --help`, it describes it as a directory: 
```
-resultBundlePath PATH     specifies the directory where a result bundle describing what occurred will be placed
```

This PR changes our usage of it from a file to a directory so that it gets deleted correctly between reruns.

Fixes https://github.com/flutter/flutter/issues/129954.
2023-07-10 17:47:51 +00:00
Chris Yang
972b447434
[tool] delete xcresult bundle file before each xcode retry. (#127144)
xcodebuild command generates a xcresult bundle file on each run, however, it doesn't delete the file generated from previous run and will throw an error if the exact file already exists.

In tool, we manually delete the file after each `flutter build` or `flutter run` command. However, there are some internal logic where xcodebuild retries multiple times. 

This PR deletes the xcresult bundle file at the start of each retry if it exists.

Fixes https://github.com/flutter/flutter/issues/127119
2023-05-19 17:18:15 +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
Christopher Fujino
3736274a6d
Revert "[flutter_tools] Remove sound null safety flag (#123031)" (#123280)
Revert "[flutter_tools] Remove sound null safety flag (#123031)"
2023-03-22 22:53:49 +00:00
Christopher Fujino
f4c3facfdd
Revert "Revert "[flutter_tools] Remove sound null safety flag (#120936)" (#122909)" (#123031)
[flutter_tools] Remove sound null safety flag #2
2023-03-20 22:32:07 +00:00
Christopher Fujino
f6bc147c91
Revert "[flutter_tools] Remove sound null safety flag (#120936)" (#122909)
This reverts commit 7c3088cf22.
2023-03-17 11:31:48 -07:00
Christopher Fujino
7c3088cf22
[flutter_tools] Remove sound null safety flag (#120936)
[flutter_tools] Remove sound null safety flag
2023-03-17 17:48:35 +00:00
Tim Maffett
2e8c3468e7
fix devtool instructional messages after flutter build ... --analyze-size . Fixes #122229 (#122230)
fix devtool instructional messages after `flutter build ... --analyze-size `.  Fixes #122229
2023-03-09 22:29:50 +00:00
hellohuanlin
162be5933b
[tools]build IPA validation bundle identifier using the default "com.example" prefix (#116430)
* [tools]build IPA validation bundle identifier using default com.example

* rephrase the warning
2022-12-02 20:49:30 +00:00
Jesús S Guerrero
530324d232
Build command dependency injection (#114383)
* update flutter build command

* update tests

* fix analyze suggestions
2022-11-08 23:38:10 +00:00
Jenn Magder
f059dd40ea
Show Xcode compilation errors at end of build, suppress stdout and stderr from Xcode (#113302) 2022-10-17 17:47:25 +00:00
Liam Appelbe
8da0432094
Null safety migration of packages/flutter_tools/test/commands.shard/hermetic, part 1/3 (#110707)
* Migrate packages/flutter_tools/test/commands.shard/hermetic, part 1/3

* Fix tests

* Fix analysis

* Fix analyze_test

* Make AnalysisServer a local variable

* Chris's comments
2022-09-06 11:21:23 -07:00
Phil Quitslund
b5e7fb076c
[flutter_tools] rename local functions with _s (#102688) 2022-04-27 16:19:07 -07:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals (#102585) 2022-04-27 09:15:35 +02:00
Chris Yang
a8da7ced35
Hide default bundle id error when xcresult detects an error (#101993) 2022-04-15 11:44:08 -07:00
Chris Yang
1755819cb1
Log XCResult before other build issues (#100787) 2022-04-08 16:27:08 -07:00
Jenn Magder
114185f686
Pass 'build ios' device ID into xcodebuild (#96669) 2022-01-19 10:20:11 -08:00
Spt
7de1e225de
fix rsync output utf8decode bug (#95881) 2022-01-13 10:20:20 -08:00
Chris Yang
1c4128c703
Xcode error message (#94747) 2021-12-21 08:39:18 -08: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
Ahmed Ashour
9492e13c45
Reland [flutter_tools] show only supported sub commands (#86153) 2021-07-22 13:41:03 -07:00
Zachary Anderson
c589a0c322
Revert "[flutter_tools] show only supported sub commands (#85125)" (#86131)
This reverts commit 84e576786c.
2021-07-08 15:58:05 -07:00
Ahmed Ashour
84e576786c
[flutter_tools] show only supported sub commands (#85125) 2021-07-08 14:56:06 -07:00
Jenn Magder
3e6fe491f3
Remove extended attributes from entire Flutter project (#81435) 2021-05-06 16:34:04 -07:00
Sam Rawlins
133a55ae51
Remove "unnecessary" imports. (#81003) 2021-05-06 16:19:07 -07:00
Jenn Magder
db3f49b1b4
Use cached Xcode build settings during iOS build (#80904) 2021-04-27 17:20:11 -07:00
Jenn Magder
18a118b952
Log full app bundle location after "flutter build ios" (#80838) 2021-04-21 21:39:03 -07:00
Jenn Magder
a2f67720ef
Migrate test/src/common to null safety (#79907) 2021-04-06 22:55:03 -07:00
Jenn Magder
61c848c1bd
Point "flutter build ipa --analyze-size" to archive app output (#78259) 2021-03-16 09:43:02 -07:00