Skip to content

Commit

Permalink
Adds next steps for getting started (flutter#10245)
Browse files Browse the repository at this point in the history
Adds all 2nd level add-ons to getting started. 

- Fixes flutter#10187
- Fixes flutter#10189
- Fixes flutter#10190

Partial fixes to flutter#10186, flutter#10188, flutter#10191

----

## Refactors flutter doctor results

Uses a data file to store what bits are flipped for each combination of
installed tools.

## Next Steps added to Install pages

[Start building Flutter native desktop apps on
Windows](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/get-started/install/windows/desktop#manage-your-flutter-sdk)

* [Add Android compilation
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android/install-android-from-windows)
* [Add Web debugging
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web/install-web-from-windows-desktop)

[Start building Flutter Android apps on
Windows](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/get-started/install/windows/mobile#manage-your-flutter-sdk)

* [Add Web debugging
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web/install-web-from-android-on-windows)
* [Add Windows desktop compiliation
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/windows/install-windows/install-windows-from-android)

[Start building Flutter web apps on
Windows](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/get-started/install/windows/web#manage-your-flutter-sdk)

* [Add Android compilation
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android/install-android-from-web)
* [Add Windows desktop compiliation
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/windows/install-windows/install-windows-from-web)

[Start building Flutter native desktop apps on
macOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/get-started/install/macos/desktop#manage-your-flutter-sdk)

* [Add Android compilation
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android/install-android-from-macos)
* [Add Web debugging
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web/install-web-from-macos-desktop)
* [Add iOS simulator or
device](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/ios/install-ios/install-ios-from-macos)

[Start building Flutter iOS apps on
macOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/get-started/install/macos/mobile-ios#manage-your-flutter-sdk)

* [Add Android compilation
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android/install-android-from-ios)
* [Add Web debugging
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web/install-web-from-ios-on-macos)

[Start building Flutter Android apps on
macOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/get-started/install/macos/mobile-android#manage-your-flutter-sdk)

* [Add Web debugging
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web/install-web-from-android-on-macos)
* [Add iOS simulator or
device](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/ios/install-ios/install-ios-from-android)
* [Add macOS compliation
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/macos/install-macos/install-macos-from-android)

[Start building Flutter web apps on
macOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/get-started/install/macos/web#manage-your-flutter-sdk)

* [Add Android compilation
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android/install-android-from-web)
* [Add iOS simulator or
device](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/ios/install-ios/install-ios-from-web)
* [Add macOS compliation
tools](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/macos/install-macos/install-macos-from-web)

## Starting pages for adding devtools

Each shows next steps based on what they picked for their initial setup.

[Add Android devtools for
Flutter](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android)

*
[macOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android/install-android-from-macos)
*
[Windows](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android/install-android-from-windows)
*
[iOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android/install-android-from-ios)
* [Web on
macOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android/install-android-from-web-on-macos)
* [Web on
Windows](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/android/install-android/install-android-from-web-on-windows)

[Add iOS devtools for
Flutter](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/ios/install-ios)

*
[macOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/ios/install-ios/install-ios-from-macos)
*
[Android](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/ios/install-ios/install-ios-from-android)
*
[Web](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/ios/install-ios/install-ios-from-web)

[Add macOS devtools for
Flutter](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/macos/install-macos)

*
[iOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/macos/install-macos/install-macos-from-ios)
*
[Android](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/macos/install-macos/install-macos-from-android)
*
[Web](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/macos/install-macos/install-macos-from-web)

[Add Web devtools for
Flutter](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web)

* [macOS
desktop](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web/install-web-from-macos-desktop)
* [Windows
desktop](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web/install-web-from-windows-desktop)
* [iOS on
macOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web/install-web-from-ios-on-macos)
* [Android on
macOS](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web/install-web-from-android-on-macos)
* [Android on
Windows](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/web/install-web/install-web-from-android-on-windows)

[Add Windows devtools for
Flutter](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/windows/install-windows)

*
[Android](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/windows/install-windows/install-windows-from-android)
*
[Web](https://flutter-docs-prod--pr10245-fix-10187-1al5ko4r.web.app/platform-integration/windows/install-windows/install-windows-from-web)
  • Loading branch information
atsansone committed Apr 5, 2024
1 parent 78f9adc commit c9d7818
Show file tree
Hide file tree
Showing 48 changed files with 1,374 additions and 148 deletions.
448 changes: 448 additions & 0 deletions src/_data/doctor.yml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/_data/sidenav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@
- title: Android
permalink: /platform-integration/android
children:
- title: Add Android as build target
permalink: /platform-integration/android/install-android
- title: Add a splash screen
permalink: /platform-integration/android/splash-screen
- title: Bind to native code
Expand All @@ -369,6 +371,8 @@
- title: iOS
permalink: /platform-integration/ios
children:
- title: Add iOS as build target
permalink: /platform-integration/ios/install-ios
- title: Leverage Apple's system libraries
permalink: /platform-integration/ios/apple-frameworks
- title: Add a launch screen
Expand All @@ -393,13 +397,17 @@
- title: macOS
permalink: /platform-integration/macos
children:
- title: Add macOS as build target
permalink: /platform-integration/macos/install-macos
- title: Build a macOS app
permalink: /platform-integration/macos/building
- title: C interop
permalink: /platform-integration/macos/c-interop
- title: Web
permalink: /platform-integration/web
children:
- title: Add web as build target
permalink: /platform-integration/web/install-web
- title: Build a web app
permalink: /platform-integration/web/building
- title: Web FAQ
Expand All @@ -413,6 +421,8 @@
- title: Windows
permalink: /platform-integration/windows
children:
- title: Add Windows as build target
permalink: /platform-integration/windows/install-windows
- title: Build a Windows app
permalink: /platform-integration/windows/building

Expand Down
41 changes: 35 additions & 6 deletions src/_includes/docs/install/compiler/android.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
## Configure Android development

{% assign devos = include.devos %}
{% assign target = include.target %}
{% assign compiler = include.compiler %}
{% assign time = include.time %}

{% case devos %}
{% when 'Windows' -%}
{% assign terminal='PowerShell' %}
{% assign prompt='C:\>' %}
{% when "macOS" -%}
{% assign terminal='your Terminal' %}
{% assign prompt='$' %}
{% else -%}
{% assign terminal='a shell' %}
{% assign prompt='$' %}
{% endcase -%}

### Configure the Android toolchain in Android Studio

{% include docs/help-link.md location='android-studio' section='#android-setup' %}

{% comment %} Nav tabs {% endcomment -%}
<ul class="nav nav-tabs" id="android-studio-start" role="tablist">
<ul class="nav nav-tabs" id="android-studio-start-{{devos | downcase}}" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="first-start-tab" href="#first-start" role="tab" aria-controls="first-start" aria-selected="true">First time using Android Studio</a>
</li>
Expand All @@ -17,7 +34,11 @@
{% comment %} Tab panes {% endcomment -%}
<div class="tab-content">

<div class="tab-pane active" id="first-start" role="tabpanel" aria-labelledby="first-start-tab" markdown="1">
<div class="tab-pane active"
id="first-start"
role="tabpanel"
aria-labelledby="first-start-tab"
markdown="1">

1. Start **Android Studio**.

Expand All @@ -35,7 +56,11 @@

</div>

<div class="tab-pane" id="later-start" role="tabpanel" aria-labelledby="later-start-tab" markdown="1">
<div class="tab-pane"
id="later-start"
role="tabpanel"
aria-labelledby="later-start-tab"
markdown="1">

1. Start **Android Studio**.

Expand Down Expand Up @@ -116,18 +141,20 @@

<div class="tab-pane active" id="virtual" role="tabpanel" aria-labelledby="virtual-tab" markdown="1">

{% include docs/install/devices/android-emulator.md os=include.os %}
{% include docs/install/devices/android-emulator.md devos=devos %}

</div>

<div class="tab-pane" id="physical" role="tabpanel" aria-labelledby="physical-tab" markdown="1">

{% include docs/install/devices/android-physical.md os=include.os %}
{% include docs/install/devices/android-physical.md devos=devos %}

</div>
</div>
{% comment %} End: Tab panes. {% endcomment -%}

{% if time=="first" %}

### Agree to Android licenses

{% include docs/help-link.md location='android-licenses' section='#android-setup' %}
Expand All @@ -140,7 +167,7 @@ agree to the licenses of the Android SDK platform.
1. Run the following command to enable signing licenses.

```terminal
$ flutter doctor --android-licenses
{{prompt}} flutter doctor --android-licenses
```

If you accepted the Android Studio licenses at another time,
Expand Down Expand Up @@ -207,3 +234,5 @@ source ~/.zshrc
```

</details>

{% endif %}
48 changes: 32 additions & 16 deletions src/_includes/docs/install/compiler/xcode.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
## Configure iOS development

{% assign prompt1='$' %}
{% assign os = include.os %}
{% assign devos = include.devos %}
{% assign target = include.target %}
{% assign time = include.time %}

### Configure Xcode

To develop Flutter apps for {{os}}, install Xcode to compile to native bytecode.
{% if time=="first" %}

To develop Flutter apps for {{target}}, install Xcode to compile to native bytecode.

1. To configure the command-line tools to use the installed version of Xcode,
run the following commands.
Expand All @@ -18,25 +21,33 @@ To develop Flutter apps for {{os}}, install Xcode to compile to native bytecode.
To use the latest version of Xcode, use this path.
If you need to use a different version, specify that path instead.

{% if target=="mobile-ios" %}

1. To install the iOS Simulator, run the following command.
1. Sign the Xcode license agreement.

```terminal
{{prompt1}} xcodebuild -downloadPlatform iOS
{{prompt1}} sudo xcodebuild -license
```

{% endif %}
{% else %}

1. Sign the Xcode license agreement.
This section presumes you have installed and configured Xcode when you
installed Flutter for

```terminal
{{prompt1}} sudo xcodebuild -license
```
{%- case target %}
{%- when 'iOS' %}
[macOS desktop][macos-install]
{%- when 'desktop' %}
[iOS][ios-install]
{%- endcase %}
development.

[macos-install]: /get-started/install/macos/desktop/#configure-ios-development
[ios-install]: /get-started/install/macos/mobile-ios/#configure-ios-development

{% endif %}

Try to keep to the current version of Xcode.

{% if target=="mobile-ios" %}
{% if target=='iOS' %}

### Configure your target iOS device

Expand All @@ -57,25 +68,27 @@ With Xcode, you can run Flutter apps on an iOS device or on the simulator.

<div class="tab-pane active" id="virtual" role="tabpanel" aria-labelledby="virtual-tab" markdown="1">

{% include docs/install/devices/ios-simulator.md os=include.os %}
{% include docs/install/devices/ios-simulator.md %}

</div>

<div class="tab-pane" id="physical" role="tabpanel" aria-labelledby="physical-tab" markdown="1">

{% include docs/install/devices/ios-physical.md os=include.os %}
{% include docs/install/devices/ios-physical.md %}

</div>
</div>
{% comment %} End: Tab panes. {% endcomment -%}

{% endif %}

{% if time=="first" %}

### Install CocoaPods

If your apps depend on [Flutter plugins][] with native {{os}} code,
If your apps depend on [Flutter plugins][] with native {{target}} code,
install [CocoaPods][cocoapods].
This program bundles various dependencies across Flutter and {{os}} code.
This program bundles various dependencies across Flutter and {{target}} code.

To install and set up CocoaPods, run the following commands:

Expand All @@ -100,4 +113,7 @@ To install and set up CocoaPods, run the following commands:
1. To apply this change, restart all open terminal sessions.

[Flutter plugins]: /packages-and-plugins/developing-packages#types

{% endif %}

[cocoapods]: https://guides.cocoapods.org/using/getting-started.html#installation
9 changes: 7 additions & 2 deletions src/_includes/docs/install/devices/android-emulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@

{% include docs/help-link.md location='android-emulator' section='#android-setup' %}

{% if include.os=='Windows' -%}
{% assign devos = include.devos %}
{% assign target = include.target %}
{% assign compiler = include.compiler %}
{% assign time = include.time %}

{% if devos=='Windows' -%}
{% assign images = '**x86 Images**' -%}
{% elsif include.os=='macOS' -%}
{% elsif devos=='macOS' -%}
{% assign images = '**x86 Images** if your Mac runs on an Intel CPU or **ARM Images** if your Mac runs on an Apple CPU' -%}
{% endif -%}

Expand Down
13 changes: 9 additions & 4 deletions src/_includes/docs/install/devices/android-physical.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

{% include docs/help-link.md location='android-device' section='#android-setup' %}

{% assign devos = include.devos %}
{% assign target = include.target %}
{% assign compiler = include.compiler %}
{% assign time = include.time %}

To configure your Flutter app to run on a physical Android device,
you need an Android device running {{site.targetmin.android}} or later.

Expand All @@ -14,26 +19,26 @@ you need an Android device running {{site.targetmin.android}} or later.
enable **Wireless debugging** on your device as described in the
[Android documentation]({{site.android-dev}}/studio/run/device#wireless).

{%- if include.os == 'Windows' %}
{%- if devos == 'Windows' %}

1. Install the [Google USB Driver]({{site.android-dev}}/studio/run/win-usb).

{% endif %}

1. Plug your device into your {{include.os}} computer.
1. Plug your device into your {{devos}} computer.
If your device prompts you, authorize your computer to access your device.

1. Verify that Flutter recognizes your connected Android device.

{%- if include.os == 'Windows' %}
{%- if devos == 'Windows' %}

In PowerShell, run:

```terminal
c:\> flutter devices
```

{% elsif include.os == 'macOS' %}
{% elsif devos == 'macOS' %}

In the Terminal, run:

Expand Down
2 changes: 1 addition & 1 deletion src/_includes/docs/install/devices/ios-physical.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ extend the timeout. The timeout defaults to 10 seconds.
To extend the timeout, change the value to an integer greater than 10.

```terminal
flutter run --device-timeout 60
$ flutter run --device-timeout 60
```

{{site.alert.secondary}}
Expand Down
6 changes: 6 additions & 0 deletions src/_includes/docs/install/devices/ios-simulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
To prepare to run and test your Flutter app on the iOS simulator,
follow this procedure.

1. To install the iOS Simulator, run the following command.

```terminal
{{prompt1}} xcodebuild -downloadPlatform iOS
```

1. To start the Simulator, run the following command:

```terminal
Expand Down
67 changes: 31 additions & 36 deletions src/_includes/docs/install/flutter-doctor-success.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,40 @@
{% assign doctor = site.data.doctor %}
{% assign config = site.data.doctor[include.config] %}

```terminal
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, {{site.appnow.flutter}}, on {{os}} A.B chipset, locale en)
{% if os=='Windows' -%}
{%- if config.windows == 'Y' %}
[✓] Windows version (Installed version of Windows is version 10 or higher)
{% endif -%}
{% case target -%}
{% when 'mobile','mobile-android' -%}
[] Android toolchain - develop for Android devices (Android SDK version {{site.appnow.android_sdk}})
{% else -%}
[!] Android toolchain - develop for Android devices
{% endcase -%}
{% if target=='web' -%}[]{% else -%}[!]{% endif %} Chrome - develop for the web
{%- if os=='macOS' -%}
{% case target %}
{%- when 'desktop', 'mobile-ios' %}
[] Xcode - develop for iOS and macOS (Xcode {{site.appnow.xcode}})
{%- else %}
[!] Xcode - develop for iOS and macOS (Xcode not installed)
{%- endif %}
{% case config.android-toolchain %}
{%- when 'Y' %}[✓] Android toolchain - develop for Android devices (Android SDK version {{site.appnow.android_sdk}})
{%- when 'N' %}[!] Android toolchain - develop for Android devices
{%- endcase %}
{% case config.chrome %}
{%- when 'Y' %}[✓] Chrome - develop for the web
{%- when 'N' %}[!] Chrome - develop for the web
{%- endcase %}
{% case config.xcode %}
{%- when 'Y' %}[✓] Xcode - develop for iOS and macOS (Xcode {{site.appnow.xcode}})
{%- when 'N' %}[!] Xcode - develop for iOS and macOS (Xcode not installed)
{%- endcase -%}
{% case config.visual-studio %}
{%- when 'Y' %}[✓] Visual Studio - develop Windows apps (version 2022)
{%- when 'N' %}[!] Visual Studio - develop Windows apps
{%- endcase %}
{% case config.android-studio %}
{%- when 'Y' %}[✓] Android Studio (version {{site.appnow.android_studio}})
{%- when 'N' %}[!] Android Studio (not installed)
{%- endcase %}
{% endif -%}
{% if os=='Windows' %}
{% if target=='desktop' -%}
[] Visual Studio - develop Windows apps (version 2022)
{% else -%}
[!] Visual Studio - develop Windows apps
{% endif -%}
{% endif -%}
{% if target=='mobile' or target=='mobile-android' -%}
[] Android Studio (version {{site.appnow.android_studio}})
{% else -%}
[!] Android Studio (not installed)
{% endif -%}
{% case config.linux %}
{%- when 'Y' %}[✓] Linux toolchain - develop for Linux desktop
{%- when 'N' %}[!] Linux toolchain - develop for Linux desktop
{%- endcase -%}
[✓] VS Code (version {{site.appnow.vscode}})
[✓] Connected device (1 available)
[✓] Network resources
{% case target %}
{% when 'desktop','mobile-ios' -%}
! Doctor found issues in 3 categories.
{% when 'mobile', 'mobile-android' -%}
! Doctor found issues in 2 categories.
{% when 'web' -%}
! Doctor found issues in 4 categories.
{% endcase -%}
! Doctor found issues in {{config.errors}} categories.
```
Loading

0 comments on commit c9d7818

Please sign in to comment.