diff --git a/firebase.json b/firebase.json index 82b5190296e..a68d347559a 100644 --- a/firebase.json +++ b/firebase.json @@ -83,8 +83,8 @@ { "source": "/responsive*", "destination": "/ui/layout/responsive/adaptive-responsive", "type": 301 }, { "source": "/routing-and-navigation", "destination": "/ui/navigation", "type": 301 }, { "source": "/sdk-archive", "destination": "/install/archive", "type": 301 }, - { "source": "/setup-:os*", "destination": "/get-started/install/:os*", "type": 301 }, - { "source": "/setup", "destination": "/get-started/install", "type": 301 }, + { "source": "/setup-:os*", "destination": "/get-started", "type": 301 }, + { "source": "/setup", "destination": "/get-started", "type": 301 }, { "source": "/technical-overview", "destination": "/resources/architectural-overview", "type": 301 }, { "source": "/text-input", "destination": "/cookbook/forms/text-input", "type": 301 }, { "source": "/ui/widgets-intro", "destination": "/ui", "type": 301 }, @@ -122,14 +122,14 @@ { "source": "/cookbook/testing/widget-test-introduction", "destination": "/cookbook/testing/widget", "type": 301 }, { "source": "/cookbook/testing/widget-test-tap-drag", "destination": "/cookbook/testing/widget/tap-drag", "type": 301 }, { "source": "/deployment/fastlane-cd", "destination": "/deployment/cd#fastlane", "type": 301 }, - { "source": "/get-started", "destination": "/get-started/install", "type": 301 }, { "source": "/get-started/codelab-web", "destination": "/get-started/codelab", "type": 301 }, { "source": "/get-started/editor", "destination": "/tools/editors", "type": 301 }, { "source": "/get-started/flutter-for", "destination": "/get-started/learn-flutter", "type": 301 }, { "source": "/get-started/flutter-for/ios-devs", "destination": "/get-started/flutter-for/swiftui-devs", "type": 301 }, { "source": "/get-started/fwe/:rest*", "destination": "/get-started/fundamentals/:rest*", "type": 301 }, - { "source": "/get-started/install/null", "destination": "/get-started/install", "type": 301 }, + { "source": "/get-started/install", "destination": "/get-started", "type": 301 }, { "source": "/get-started/install/help", "destination": "/install/troubleshoot", "type": 301 }, + { "source": "/get-started/install/:rest*", "destination": "/get-started", "type": 301 }, { "source": "/get-started/learn-more", "destination": "/get-started/learn-flutter", "type": 301 }, { "source": "/get-started/test-drive*", "destination": "/get-started/codelab", "type": 301 }, { "source": "/get-started/uninstall", "destination": "/install/uninstall", "type": 301 }, @@ -767,7 +767,7 @@ { "source": "/to/handle-errors", "destination": "/testing/errors", "type": 301 }, { "source": "/to/hot-reload", "destination": "/tools/hot-reload", "type": 301 }, { "source": "/to/impeller", "destination": "/perf/impeller", "type": 301 }, - { "source": "/to/install", "destination": "/get-started/install", "type": 301 }, + { "source": "/to/install", "destination": "/get-started", "type": 301 }, { "source": "/to/integrate-android-archive", "destination": "/add-to-app/android/project-setup", "type": 301 }, { "source": "/to/integration-test-on-web", "destination": "/testing/integration-tests#test-in-a-web-browser", "type": 301 }, { "source": "/to/integration-testing", "destination": "/cookbook/testing/integration/introduction", "type": 301 }, @@ -782,12 +782,12 @@ { "source": "/to/ios-minimum-target", "destination": "/deployment/ios#review-xcode-project-settings", "type": 301 }, { "source": "/to/to/java-gradle-incompatibility", "destination": "/release/breaking-changes/android-java-gradle-migration-guide", "type": 301 }, { "source": "/to/java-gradle-incompatibility", "destination": "/release/breaking-changes/android-java-gradle-migration-guide", "type": 301 }, - { "source": "/to/linux-android-setup", "destination": "/get-started/install/linux/android", "type": 301 }, - { "source": "/to/macos-android-setup", "destination": "/get-started/install/macos/mobile-android", "type": 301 }, + { "source": "/to/linux-android-setup", "destination": "/platform-integration/android/setup", "type": 301 }, + { "source": "/to/macos-android-setup", "destination": "/platform-integration/android/setup", "type": 301 }, { "source": "/to/macos-deploy", "destination": "/deployment/macos", "type": 301 }, { "source": "/to/macos-entitlements", "destination": "/platform-integration/macos/building#entitlements-and-the-app-sandbox", "type": 301 }, { "source": "/to/macos-ffi", "destination": "/platform-integration/macos/c-interop", "type": 301 }, - { "source": "/to/macos-ios-setup", "destination": "/get-started/install/macos/mobile-ios", "type": 301 }, + { "source": "/to/macos-ios-setup", "destination": "/platform-integration/ios/setup", "type": 301 }, { "source": "/to/macos-minimum-target", "destination": "/deployment/ios#review-xcode-project-settings", "type": 301 }, { "source": "/to/minimize-layout-passes", "destination": "/perf/best-practices#minimize-layout-passes-caused-by-intrinsic-operations", "type": 301 }, { "source": "/to/performance-overlay", "destination": "/perf/ui-performance#performance-overlay", "type": 301 }, @@ -813,12 +813,12 @@ { "source": "/to/team-infra", "destination": "https://github.com/flutter/flutter/blob/main/docs/triage/Infra-Triage.md", "type": 301 }, { "source": "/to/test-drive", "destination": "/get-started/quick", "type": 301 }, { "source": "/to/track-widget-creation", "destination": "/tools/devtools/inspector#track-widget-creation", "type": 301 }, - { "source": "/to/troubleshoot-devices", "destination": "/get-started/install", "type": 301 }, + { "source": "/to/troubleshoot-devices", "destination": "/install/troubleshoot", "type": 301 }, { "source": "/to/unbounded-constraints", "destination": "/ui/layout/constraints#unbounded", "type": 301 }, { "source": "/to/unit-testing", "destination": "/cookbook/testing/unit/introduction", "type": 301 }, - { "source": "/to/update-linux-path", "destination": "/get-started/install/linux/android?tab-save-vs-code-or-download=download-and-install#add-flutter-to-your-path", "type": 301 }, - { "source": "/to/update-macos-path", "destination": "/get-started/install/macos/mobile-ios?tab-save-vs-code-or-download=download-and-install#add-flutter-to-your-path", "type": 301 }, - { "source": "/to/update-windows-path", "destination": "/get-started/install/windows/mobile?tab-save-vs-code-or-download=download-and-install#update-your-windows-path-variable", "type": 301 }, + { "source": "/to/update-linux-path", "destination": "/install/add-to-path#linux", "type": 301 }, + { "source": "/to/update-macos-path", "destination": "/install/add-to-path#macos", "type": 301 }, + { "source": "/to/update-windows-path", "destination": "/install/add-to-path#windows", "type": 301 }, { "source": "/to/use-mirror-site", "destination": "/community/china#configure-your-machine-to-use-a-mirror-site", "type": 301 }, { "source": "/to/use-profile-mode", "destination": "/perf/ui-performance#run-in-profile-mode", "type": 301 }, { "source": "/to/wasm", "destination": "/platform-integration/web/wasm", "type": 301 }, @@ -829,9 +829,9 @@ { "source": "/to/web-renderers", "destination": "/platform-integration/web/renderers", "type": 301 }, { "source": "/to/widget-previews", "destination": "/tools/widget-previewer", "type": 301 }, { "source": "/to/widget-testing", "destination": "/cookbook/testing/widget/introduction", "type": 301 }, - { "source": "/to/windows-android-setup", "destination": "/get-started/install/windows/mobile", "type": 301 }, + { "source": "/to/windows-android-setup", "destination": "/platform-integration/android/setup", "type": 301 }, { "source": "/to/windows-ffi", "destination": "/platform-integration/windows/building#integrating-with-windows", "type": 301 }, - { "source": "/to/windows-setup", "destination": "/get-started/install/windows", "type": 301 }, + { "source": "/to/windows-setup", "destination": "/platform-integration/windows/setup", "type": 301 }, { "source": "/to/xcode-name-config", "destination": "/deployment/ios#review-xcode-project-settings", "type": 301 } ], "headers": [ diff --git a/src/_data/docsCards.yml b/src/_data/docsCards.yml index efa0ca89f32..33ae1657850 100644 --- a/src/_data/docsCards.yml +++ b/src/_data/docsCards.yml @@ -1,6 +1,6 @@ - name: Get started description: Set up your environment and start building. - url: /get-started/install + url: /get-started - name: Widget catalog description: Dip into the rich set of Flutter widgets available in the SDK. url: /ui/widgets diff --git a/src/_data/shells.yml b/src/_data/shells.yml deleted file mode 100644 index 178100c4da1..00000000000 --- a/src/_data/shells.yml +++ /dev/null @@ -1,14 +0,0 @@ -- name: bash - set-path: echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.bash_profile -- name: zsh - set-path: echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.zshenv -- name: fish - set-path: fish_add_path -g -p ~/development/flutter/bin -- name: csh - set-path: echo 'setenv PATH "$HOME/development/flutter/bin:$PATH"' >> ~/.cshrc -- name: tcsh - set-path: echo 'setenv PATH "$HOME/development/flutter/bin:$PATH"' >> ~/.tcshrc -- name: ksh - set-path: echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.profile -- name: sh - set-path: echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.profile diff --git a/src/_data/sidenav.yml b/src/_data/sidenav.yml index df5e65989af..76478c4a4de 100644 --- a/src/_data/sidenav.yml +++ b/src/_data/sidenav.yml @@ -1,55 +1,14 @@ - header: Get started + - title: Set up Flutter - permalink: /get-started/install + permalink: /get-started hiddenChildren: true children: - - title: Choose a platform - permalink: /get-started/install - - title: On Windows - permalink: /get-started/install/windows - children: - - title: Choose a target - permalink: /get-started/install/windows - - title: Target Android - permalink: /get-started/install/windows/mobile - - title: Target web - permalink: /get-started/install/windows/web - - title: Target desktop - permalink: /get-started/install/windows/desktop - - title: On macOS - permalink: /get-started/install/macos - children: - - title: Choose a target - permalink: /get-started/install/macos - - title: Target iOS - permalink: /get-started/install/macos/mobile-ios - - title: Target Android - permalink: /get-started/install/macos/mobile-android - - title: Target web - permalink: /get-started/install/macos/web - - title: Target desktop - permalink: /get-started/install/macos/desktop - - title: On Linux - permalink: /get-started/install/linux - children: - - title: Choose a target - permalink: /get-started/install/linux - - title: Target Android - permalink: /get-started/install/linux/android - - title: Target web - permalink: /get-started/install/linux/web - - title: Target desktop - permalink: /get-started/install/linux/desktop - - title: On ChromeOS - permalink: /get-started/install/chromeos - children: - - title: Choose a target - permalink: /get-started/install/chromeos - - title: Target Android - permalink: /get-started/install/chromeos/android - - title: Target web - permalink: /get-started/install/chromeos/web + - title: Quick start + permalink: /get-started/quick + - title: Custom setup + permalink: /get-started/custom - title: Install Flutter permalink: /install diff --git a/src/_includes/docs/dart-tool-win.md b/src/_includes/docs/dart-tool-win.md deleted file mode 100644 index 45af516a272..00000000000 --- a/src/_includes/docs/dart-tool-win.md +++ /dev/null @@ -1,50 +0,0 @@ -:::note -The Flutter SDK contains the `dart` command alongside the `flutter` command -so that you can more easily run Dart command-line programs. -Downloading the Flutter SDK also downloads the compatible version of Dart, -but if you've downloaded the Dart SDK separately, -make sure that the Flutter version of `dart` is -first in your path, as the two versions might not be compatible. -The following command tells you whether the `flutter` and `dart` -commands originate from the same `bin` directory and are -therefore compatible. - -```console -C:\>where flutter dart -C:\path-to-flutter-sdk\bin\flutter -C:\path-to-flutter-sdk\bin\flutter.bat -C:\path-to-dart-sdk\bin\dart.exe :: this should go after `C:\path-to-flutter-sdk\bin\` commands -C:\path-to-flutter-sdk\bin\dart -C:\path-to-flutter-sdk\bin\dart.bat -``` - -As shown above, the command `dart` from the Flutter SDK doesn't come first. -Update your path to use commands from `C:\path-to-flutter-sdk\bin\` before -commands from `C:\path-to-dart-sdk\bin\` (in this case). -After restarting your shell for the change to take effect, -running the `where` command again -should show that the `flutter` and `dart` commands -from the same directory now come first. - -```console -C:\>where flutter dart -C:\dev\src\flutter\bin\flutter -C:\dev\src\flutter\bin\flutter.bat -C:\dev\src\flutter\bin\dart -C:\dev\src\flutter\bin\dart.bat -C:\dev\src\dart-sdk\bin\dart.exe -``` - -However, if you are using `PowerShell`, in it `where` is -an alias of `Where-Object` command, so you need to use `where.exe` instead. - -```console -PS C:\> where.exe flutter dart -``` - - -To learn more about the `dart` command, run `dart -h` -from the command line, or see the [dart tool][] page. -::: - -[dart tool]: {{site.dart-site}}/tools/dart-tool diff --git a/src/_includes/docs/dart-tool.md b/src/_includes/docs/dart-tool.md deleted file mode 100644 index 5b7642db2e2..00000000000 --- a/src/_includes/docs/dart-tool.md +++ /dev/null @@ -1,36 +0,0 @@ -:::note -Downloading the Flutter SDK -also downloads a compatible version of Dart. -If you've downloaded the Dart SDK separately, -make sure that the Flutter version of `dart` is -first in your path, as the two versions might not be compatible. -The following command tells you whether the `flutter` and `dart` -commands originate from the same `bin` directory and are -therefore compatible. - -```console -$ which flutter dart -/path-to-flutter-sdk/bin/flutter -/usr/local/bin/dart -``` - -As shown above, the two commands don't come from -the same `bin` directory. Update your path to use -commands from `/path-to-flutter-sdk/bin` before -commands from `/usr/local/bin` (in this case). -After updating your shell for the change to take effect, -running the `which` command again -should show that the `flutter` and `dart` commands -now come from the same directory. - -```console -$ which flutter dart -/path-to-flutter-sdk/bin/flutter -/path-to-flutter-sdk/bin/dart -``` - -To learn more about the `dart` command, run `dart -h` -from the command line, or see the [dart tool][] page. -::: - -[dart tool]: {{site.dart-site}}/tools/dart-tool diff --git a/src/_includes/docs/get-started/setup-next-steps.html b/src/_includes/docs/get-started/setup-next-steps.html new file mode 100644 index 00000000000..3a05a7accf6 --- /dev/null +++ b/src/_includes/docs/get-started/setup-next-steps.html @@ -0,0 +1,97 @@ + diff --git a/src/_includes/docs/help-link.md b/src/_includes/docs/help-link.md deleted file mode 100644 index e84cd4b03f8..00000000000 --- a/src/_includes/docs/help-link.md +++ /dev/null @@ -1,6 +0,0 @@ -

- - - Help - -

diff --git a/src/_includes/docs/install/compiler/android.md b/src/_includes/docs/install/compiler/android.md deleted file mode 100644 index 3bd0f148c75..00000000000 --- a/src/_includes/docs/install/compiler/android.md +++ /dev/null @@ -1,345 +0,0 @@ - -## Configure Android development - -{% case include.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 - -{% render docs/help-link.md, location:'android-studio', section:'#android-setup' %} - -To create Android apps with Flutter, verify that the following Android -components have been installed. - -* **Android SDK Platform, API 35** -* **Android SDK Command-line Tools** -* **Android SDK Build-Tools** -* **Android SDK Platform-Tools** -* **Android Emulator** - -If you haven't installed these, or you don't know, continue with the following procedure. - -Otherwise, you can skip to the [next section][check-dev]. - -[check-dev]: #check-your-development-setup - -{% tabs "android-studio-experience" %} -{% tab "First time using Android Studio" %} - -1. Launch **Android Studio**. - - The **Welcome to Android Studio** dialog displays. - -1. Follow the **Android Studio Setup Wizard**. - -1. Install the following components: - - * **Android SDK Platform, API 35** - * **Android SDK Command-line Tools** - * **Android SDK Build-Tools** - * **Android SDK Platform-Tools** - * **Android Emulator** - -{% endtab %} -{% tab "Current Android Studio User" %} - -1. Launch **Android Studio**. - -1. Go to the **Settings** dialog to view the **SDK Manager**. - - 1. If you have a project open, - go to **Tools** > **SDK Manager**. - - 1. If the **Welcome to Android Studio** dialog displays, - click the **More Options** icon that follows the **Open** button - and click **SDK Manager** from the dropdown menu. - -1. Click **SDK Platforms**. - -1. Verify that **Android API 35** has been selected. - - If the **Status** column displays **Update available** or **Not installed**: - - {:type="a"} - 1. Select **Android API 35**. - - 1. Click **Apply**. - - 1. When the **Confirm Change** dialog displays, click **OK**. - - The **SDK Quickfix Installation** dialog displays with a - completion meter. - - 1. When the install finishes, click **Finish**. - - After you installed the latest SDK, - the **Status** column might display **Update available**. - This means some additional system images might not be installed. - You can ignore this and continue. - -1. Click **SDK Tools**. - -1. Verify that the following SDK Tools have been selected: - - * **Android SDK Command-line Tools** - * **Android SDK Build-Tools** - * **Android SDK Platform-Tools** - * **Android Emulator** - -1. If the **Status** column for any of the preceding tools displays - **Update available** or **Not installed**: - - {:type="a"} - 1. Select the needed tools. - - 1. Click **Apply**. - - 1. When the **Confirm Change** dialog displays, click **OK**. - - The **SDK Quickfix Installation** dialog displays with a - completion meter. - - 1. When the install finishes, click **Finish**. - -{% endtab %} -{% endtabs %} - -### Configure your target Android device - -{% tabs "android-emulator-or-not" %} -{% tab "Virtual device" %} - -#### Set up the Android emulator - -{% render docs/help-link.md, location:'android-emulator', section:'#android-setup' %} - -{% case include.devos %} -{% when 'Windows','Linux' -%} -{% assign images = '**x86 Images**' -%} -{% when 'macOS' -%} -{% assign images = '**x86 Images** if your Mac runs on an Intel CPU or **ARM Images** if your Mac runs on an Apple CPU' -%} -{% endcase -%} - -To configure your Flutter app to run in an Android emulator, -follow these steps to create and select an emulator. - -1. Enable - [VM acceleration]({{site.android-dev}}/studio/run/emulator-acceleration#accel-vm) - on your development computer. - -1. Start **Android Studio**. - -1. Go to the **Settings** dialog to view the **Device Manager**. - - 1. If you have a project open, - go to **Tools** > - **Device Manager**. - - 1. If the **Welcome to Android Studio** dialog displays, - click the **More Options** icon that follows the **Open** button - and click **Device Manager** from the dropdown menu. - -1. Click **Virtual**. - -1. Click **Create Device**. - - The **Virtual Device Configuration** dialog displays. - -1. Select either **Phone** or **Tablet** under **Category**. - -1. Select a device definition. You can browse or search for the device. - -1. Click **Next**. - -1. Click {{images}}. - -1. Click one system image for the Android version you want to emulate. - - {:type="a"} - 1. If the desired image has a **Download** icon to the right - of the **Release Name**, click it. - - The **SDK Quickfix Installation** dialog displays with a - completion meter. - - 1. When the download completes, click **Finish**. - -1. Click **Next**. - - The **Virtual Device Configuration** displays its - **Verify Configuration** step. - -1. To rename the Android Virtual Device (AVD), change the value in the - **AVD Name** box. - -1. Click **Show Advanced Settings** and scroll to **Emulated Performance**. - -1. From the **Graphics** dropdown menu, select **Hardware - GLES 2.0**. - - This enables [hardware acceleration][] and improves rendering performance. - -1. Verify your AVD configuration. If it is correct, click **Finish**. - - To learn more about AVDs, check out - [Managing AVDs]({{site.android-dev}}/studio/run/managing-avds). - -1. In the **Device Manager** dialog, click the **Run** icon to the right - of your desired AVD. - The emulator starts up and displays the default canvas for your - selected Android OS version and device. - -[hardware acceleration]: {{site.android-dev}}/studio/run/emulator-acceleration - -{% endtab %} -{% tab "Physical device" %} - -#### Set up your target Android device - -{% render docs/help-link.md, location:'android-device', section:'#android-setup' %} - -To configure your Flutter app to run on a physical Android device, -you need a [supported version of Android][supported-version]. - -1. Enable **Developer options** and **USB debugging** on your device - as described in the - [Android documentation]({{site.android-dev}}/studio/debug/dev-options). - -1. [Optional] To leverage wireless debugging, - enable **Wireless debugging** on your device as described in the - [Android documentation]({{site.android-dev}}/studio/run/device#wireless). - -{%- if include.devos == 'Windows' %} - -1. Install the [Google USB Driver]({{site.android-dev}}/studio/run/win-usb). - -{% endif %} - -1. Plug your device into your {{include.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.devos == 'Windows' %} - - In PowerShell, run: - - ```console - c:\> flutter devices - ``` - - {% elsif devos == 'macOS' %} - - In the Terminal, run: - - ```console - $ flutter devices - ``` - - {% endif %} - - By default, Flutter uses the version of the Android - SDK where your `adb` tool is based. - To use a different Android SDK installation path with Flutter, - set the `ANDROID_SDK_ROOT` environment variable - to that installation directory. - -{% endtab %} -{% endtabs %} - -[supported-version]: /reference/supported-platforms - -{% if include.attempt == 'first' %} - -### Agree to Android licenses - -{% render docs/help-link.md, location:'android-licenses', section:'#android-setup' %} - -Before you can use Flutter and after you install all prerequisites, -agree to the licenses of the Android SDK platform. - -1. Open an elevated console window. - -1. Run the following command to enable signing licenses. - - ```console - {{prompt}} flutter doctor --android-licenses - ``` - - If you accepted the Android Studio licenses at another time, - this command returns: - - ```console - [========================================] 100% Computing updates... - All SDK package licenses accepted. - ``` - - You can skip the next step. - -1. Before agreeing to the terms of each license, - read each with care. - -{% if include.devos == 'macOS' %} - -#### Troubleshooting licensing issues - -
-How to fix the error of finding Java install - -You might have an issue with the Android SDK locating the Java SDK. - -```console -$ flutter doctor --android-licenses - -ERROR: JAVA_HOME is set to an invalid directory: /Applications/Android\ Studio.app/Contents/jre/Contents/Home - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation. - -Android sdkmanager tool was found, but failed to run -(/Users/atsansone/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager): "exited code 1". -Try re-installing or updating your Android SDK, -visit https://flutter.dev/to/macos-android-setup for detailed instructions. -``` - -The `flutter doctor` command returns this error because of how the `JAVA_HOME` -variable was set. When you add the path to `JAVA_HOME`, you can add a backslash -to the space between `Android` and `Studio` or enclose the entire path in -matching quotes. You cannot do _both_. - -Look for your `JAVA_HOME` path in your appropriate shell resource file. - -Change it from: - -```bash -export JAVA_HOME="/Applications/Android\ Studio.app/Contents/jre/Contents/Home" -``` - -to: - -```bash -export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/Contents/Home" -``` - -Do not include the backslash between `Android` and `Studio`. - -To load this updated environment variable, reload your shell. -This example uses the `zsh` resource file. - -```console -source ~/.zshrc -``` - -
- -{% endif %} - -{% endif %} diff --git a/src/_includes/docs/install/compiler/xcode.md b/src/_includes/docs/install/compiler/xcode.md deleted file mode 100644 index 8709eb120c5..00000000000 --- a/src/_includes/docs/install/compiler/xcode.md +++ /dev/null @@ -1,374 +0,0 @@ - -## Configure iOS development - -{% assign prompt1='$' %} - -### Install and configure Xcode - -{% if include.attempt=="first" %} - -To develop Flutter apps for {{include.target}}, install Xcode to compile to native bytecode. - -1. Open the **App Store** and sign in. - -1. Search for `Xcode`. - -1. Click **Install**. - - The Xcode installer takes up 6+ GB of storage. - The download might take some time. - -1. To configure the command-line tools to use the installed version of Xcode, - use the following commands. - - ```console - {{prompt1}} sudo sh -c 'xcode-select -s /Applications/Xcode.app/Contents/Developer && xcodebuild -runFirstLaunch' - ``` - - Use this path for the latest version of Xcode. - If you need to use a different version, specify that path instead. - -1. Sign the Xcode license agreement. - - ```console - {{prompt1}} sudo xcodebuild -license - ``` - -{% else %} - -This section presumes you have installed and configured Xcode when you -installed Flutter for - -{%- case include.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 include.target=='iOS' %} - -### Configure your target iOS device - -With Xcode, you can run Flutter apps on an iOS device or on the simulator. - -{% tabs "ios-simulator-or-not" %} -{% tab "Virtual device" %} - -#### Configure your iOS simulator - -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. - - ```console - {{prompt1}} xcodebuild -downloadPlatform iOS - ``` - -1. To start the Simulator, run the following command: - - ```console - $ open -a Simulator - ``` - -{% endtab %} -{% tab "Physical device" %} - -#### Set up your target physical iOS device - -To deploy your Flutter app to a physical iPhone or iPad, -you need to do the following: - -- Create an [Apple Developer][] account. -- Set up physical device deployment in Xcode. -- Create a development provisioning profile to self-sign certificates. -- Install the third-party CocoaPods dependency manager - if your app uses Flutter plugins. - -##### Create your Apple ID and Apple Developer account - -You can skip this step for now. You don't actually need -an Apple Developer account until you are ready to distribute -your app to the App Store. - -If you only need to _test_ deploying your app, -complete the first step and move on to the next section. - -1. If you don't have an [Apple ID][], create one. - -1. If you haven't enrolled in the [Apple Developer][] program, enroll now. - - To learn more about membership types, - check out [Choosing a Membership][]. - -[Apple ID]: https://support.apple.com/en-us/HT204316 - -##### Attach your physical iOS device to your Mac {:#attach} - -Configure your physical iOS device to connect to Xcode. - -1. Attach your iOS device to the USB port on your Mac. - -1. On first connecting your iOS device to your Mac, - your iOS device displays the **Trust this computer?** dialog. - -1. Click **Trust**. - - ![Trust Mac][] - -1. When prompted, unlock your iOS device. - -##### Enable Developer Mode on iOS 16 or later - -Starting with iOS 16, Apple requires you to enable **[Developer Mode][]** -to protect against malicious software. -Enable Developer Mode before deploying to a device running iOS 16 or later. - -1. Tap on **Settings** > - **Privacy & Security** > - **Developer Mode**. - -1. Tap to toggle **Developer Mode** to **On**. - -1. Tap **Restart**. - -1. After the iOS device restarts, unlock your iOS device. - -1. When the **Turn on Developer Mode?** dialog appears, tap **Turn On**. - - The dialog explains that Developer Mode requires reducing the security - of the iOS device. - -1. Unlock your iOS device. - -##### Enable developer code signing certificates - -To deploy to a physical iOS device, you need to establish trust with your -Mac and the iOS device. -This requires you to load signed developer certificates to your iOS device. -To sign an app in Xcode, -you need to create a development provisioning profile. - -To provision your project, follow the Xcode signing flow. - -1. Launch Xcode. - -1. Go to **Xcode** > - **Settings...** - - 1. Go to **Xcode** > - **Settings...** - 1. Click **Accounts**. - 1. Click **+**. - 1. Select **Apple ID** and click **Continue**. - 1. When prompted, enter your **Apple ID** and **Password**. - 1. Close the **Settings** dialog. - - Development and testing supports any Apple ID. - -1. Go to **File** > **Open...** - - You can also press Cmd + O. - -1. Navigate to your Flutter project directory. - -1. Open the default Xcode workspace in your project: `ios/Runner.xcworkspace`. - -1. Select the physical iOS device you intend to deploy to in the device - drop-down menu to the right of the run button. - - It should appear under the **iOS devices** heading. - -1. In the left navigation panel under **Targets**, select **Runner**. - -1. In the **Runner** settings pane, click **Signing & Capabilities**. - -1. Select **All** at the top. - -1. Select **Automatically manage signing**. - -1. Select a team from the **Team** dropdown menu. - - Teams are created in the **App Store Connect** section of your - [Apple Developer Account][] page. - If you have not created a team, you can choose a _personal team_. - - The **Team** dropdown displays that option as **Your Name (Personal Team)**. - - ![Xcode account add][] - - After you select a team, Xcode performs the following tasks: - - 1. Creates and downloads a Development Certificate - 1. Registers your device with your account, - 1. Creates and downloads a provisioning profile if needed - -If automatic signing fails in Xcode, verify that the project's -**General** > -**Identity** > -**Bundle Identifier** value is unique. - -![Check the app's Bundle ID][] - -##### Enable trust of your Mac and iOS device {:#trust} - -When you attach your physical iOS device for the first time, -enable trust for both your Mac and the Development Certificate -on the iOS device. - -You should have enabled trust of your Mac on your iOS device when -you [attached the device to your Mac](#attach). - -##### Enable developer certificate for your iOS devices - -Enabling certificates varies in different versions of iOS. - -{% tabs "ios-versions" %} -{% tab "iOS 14" %} - -1. Open the **Settings** app on the iOS device. - -1. Tap on **General** > - **Profiles & Device Management**. - -1. Tap to toggle your Certificate to **Enable** - -{% endtab %} -{% tab "iOS 15" %} - -1. Open the **Settings** app on the iOS device. - -1. Tap on **General** > - **VPN & Device Management**. - -1. Tap to toggle your Certificate to **Enable**. - -{% endtab %} -{% tab "iOS 16 or later" %} - -1. Open the **Settings** app on the iOS device. - -1. Tap on **General** > - **VPN & Device Management**. - - :::note - If you can't find **VPN & Device Management** - in **Settings**, run your app on your iOS device once, then try again. - ::: - -1. Under the **Developer App** heading, you should find your certificate. - -1. Tap your Certificate. - -1. Tap **Trust "<certificate>"**. - -1. When the dialog displays, tap **Trust**. - -{% endtab %} -{% endtabs %} - -If the **codesign wants to access key...** dialog displays: - -1. Enter your macOS password. - -1. Tap **Always Allow**. - -#### Set up wireless debugging on your iOS device (Optional) - -To debug your device using a Wi-Fi connection, follow this procedure. - -1. Connect your iOS device to the same network as your macOS device. - -1. Set a passcode for your iOS device. - -1. Open **Xcode**. - -1. Go to **Window** > - **Devices and Simulators**. - - You can also press Shift + Cmd + 2. - -1. Select your iOS device. - -1. Select **Connect via Network**. - -1. Once the network icon appears next to the device name, - unplug your iOS device from your Mac. - -If you don't see your device listed when using `flutter run`, -extend the timeout. The timeout defaults to 10 seconds. -To extend the timeout, change the value to an integer greater than 10. - -```console -$ flutter run --device-timeout 60 -``` - -:::note Learn more about wireless debugging -* To learn more, check out - [Apple's documentation on pairing a wireless device with Xcode][]. -* To troubleshoot, check out [Apple's Developer Forums][]. -* To learn how to configure wireless debugging with `flutter attach`, - check out [Debugging your add-to-app module][]. -::: - -[Check the app's Bundle ID]: /assets/images/docs/setup/xcode-unique-bundle-id.png -[Choosing a Membership]: {{site.apple-dev}}/support/compare-memberships -[Trust Mac]: /assets/images/docs/setup/trust-computer.png -[Xcode account add]: /assets/images/docs/setup/xcode-account.png -[Developer Mode]: {{site.apple-dev}}/documentation/xcode/enabling-developer-mode-on-a-device -[Apple's Developer Forums]: {{site.apple-dev}}/forums/ -[Debugging your add-to-app module]: /add-to-app/debugging/#wireless-debugging -[Apple's documentation on pairing a wireless device with Xcode]: https://help.apple.com/xcode/mac/9.0/index.html?localePath=en.lproj#/devbc48d1bad -[Apple Developer]: {{site.apple-dev}}/programs/ -[Apple Developer Account]: {{site.apple-dev}}/account - -{% endtab %} -{% endtabs %} - -{% endif %} - -{% if include.attempt=="first" %} - -### Install CocoaPods - -If your apps depend on [Flutter plugins][] with native {{include.target}} code, -install [CocoaPods][cocoapods]. -This program bundles various dependencies across -Flutter and {{include.target}} code. - -To install and set up CocoaPods, run the following commands: - -1. Install `cocoapods` following the - [CocoaPods install guide][cocoapods]. - - ```console - $ sudo gem install cocoapods - ``` -1. Launch your preferred text editor. - -1. Open the Zsh environmental variable file `~/.zshenv` in your text editor. - -1. Copy the following line and paste it at the end of your `~/.zshenv` file. - - ```bash - export PATH=$HOME/.gem/bin:$PATH - ``` - -1. Save your `~/.zshenv` file. - -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 diff --git a/src/_includes/docs/install/flutter-doctor.md b/src/_includes/docs/install/flutter-doctor.md deleted file mode 100644 index 745fa7516cc..00000000000 --- a/src/_includes/docs/install/flutter-doctor.md +++ /dev/null @@ -1,88 +0,0 @@ - -## Check your development setup - -{% render docs/help-link.md, location:'win-doctor' %} - -{% assign compiler = '' %} - -{% case include.devos %} -{% when 'Windows' -%} - {% assign terminal='PowerShell' %} - {% assign prompt='PS C:\>' %} -{% when 'macOS' -%} - {% assign terminal='your Terminal' %} - {% assign prompt='$' %} -{% else -%} - {% assign terminal='a shell' %} - {% assign prompt='$' %} -{% endcase -%} - -{% case include.target %} -{% when 'macOS','Windows','Linux' %} -{% assign work-target = include.target | append: ' desktop' %} -{% when 'desktop' %} -{% assign work-target = include.devos | append: ' desktop' %} -{% else %} -{% assign work-target = include.target | append: ' on ' | append: include.devos %} -{% endcase %} -{% case work-target %} -{% when 'macOS desktop','Web on macOS','iOS on macOS' %} -{% assign compiler = 'Xcode' %} -{% when 'Android on Windows','Android on macOS','Android on Linux' %} -{% assign compiler = 'Android Studio' %} -{% when 'Linux desktop','Web on Linux' %} -{% assign compiler = 'one of the Linux libraries' %} -{% when 'Windows desktop','Web on Windows' %} -{% assign compiler = 'Visual Studio' %} -{% endcase %} - -### Run Flutter doctor - -The `flutter doctor` command validates that all components of a -complete Flutter development environment for {{include.devos}}. - -1. Open {{terminal}}. - -1. To verify your installation of all the components, - run the following command. - - ```console - {{prompt}} flutter doctor - ``` - -As you chose to develop for {{include.target}}, -you do not need _all_ components. -If you followed this guide, the command should output -`[✓]` for the tooling and platforms you set up. - -### Troubleshoot Flutter doctor issues - -When the `flutter doctor` command returns an error, it could be for Flutter, -VS Code, {{compiler}}, the connected device, or network resources. - -If the `flutter doctor` command returns an error for any of these components, -run it again with the verbose flag. - -```console -{{prompt}} flutter doctor -v -``` - -Check the output for other software you might need to install -or further tasks to perform. - -If you change the configuration of your Flutter SDK or its related components, -run `flutter doctor` _again_ to verify the installation. - -## Start developing {{work-target}} apps with Flutter - -**Congratulations.** -Having installed all prerequisites and the Flutter SDK, -you can start developing Flutter apps for {{work-target}}. - -To continue on your learning journey, consult the following guides: - -- [Learn how to write your first Flutter app][codelab] -- [Flutter fundamentals docs][fundamentals] - -[codelab]: /get-started/codelab/ -[fundamentals]: /get-started/fundamentals/ diff --git a/src/_includes/docs/install/flutter-sdk.md b/src/_includes/docs/install/flutter-sdk.md deleted file mode 100644 index 8f5ed82605b..00000000000 --- a/src/_includes/docs/install/flutter-sdk.md +++ /dev/null @@ -1,18 +0,0 @@ - -## Install the Flutter SDK - -To install the Flutter SDK, you can use the VS Code Flutter extension -or download and install the Flutter bundle yourself. - -{% tabs "vs-code-or-download" %} -{% tab "Use VS Code to install" %} - -{% include docs/install/flutter/vscode.md os=include.os terminal=include.terminal target=include.target %} - -{% endtab %} -{% tab "Download and install" %} - -{% include docs/install/flutter/download.md os=include.os terminal=include.terminal target=include.target %} - -{% endtab %} -{% endtabs %} diff --git a/src/_includes/docs/install/flutter/download.md b/src/_includes/docs/install/flutter/download.md deleted file mode 100644 index c7deeff6189..00000000000 --- a/src/_includes/docs/install/flutter/download.md +++ /dev/null @@ -1,247 +0,0 @@ - -### Download then install Flutter {:.no_toc} - -{% assign osl = include.os | downcase | replace: "chromeos","linux" %} -{% case include.os %} -{% when 'Windows' -%} - {% assign unzip='Expand-Archive .\\' %} - {% assign path='C:\\user\\{username}\\dev' %} - {% assign flutter-path='C:\\user\\{username}\\dev\\flutter' %} - {% assign prompt='PS C:\\>' %} - {% assign prompt2=path | append: '>' %} - {% assign diroptions='`%USERPROFILE%` (`C:\\Users\\{username}`) or `%LOCALAPPDATA%` (`C:\\Users\\{username}\\AppData\\Local`)' %} - {% assign dirinstall='`%USERPROFILE%\\dev\\`' %} - {% assign dirdl='%USERPROFILE%\\Downloads' %} - {% assign ps-dir-dl='$env:USERPROFILE\\Downloads\\' %} - {% assign ps-dir-target='$env:USERPROFILE\\dev\\' %} - {% capture uz -%} - {{prompt}} Expand-Archive ` - -Path {{ps-dir-dl}}flutter_sdk_v1.0.0.zip ` - -Destination {{ps-dir-target}} - {%- endcapture %} -{% when "macOS" -%} - {% assign diroptions='`~/development/`' %} - {% assign dirinstall='`~/development/`' %} - {% assign unzip='unzip' %} - {% assign path='~/development/' %} - {% assign flutter-path='~/development/flutter' %} - {% assign prompt='\$' %} - {% assign dirdl='~/Downloads/' %} - {% capture uz -%} - {{prompt}} {{unzip}} {{dirdl}}flutter_sdk_v1.0.0.zip \ - -d {{path}} - {%- endcapture %} -{% else -%} - {% assign diroptions='`~/development/`' %} - {% assign dirinstall='`~/development/`' %} - {% assign unzip='tar' %} - {% assign path='~/development/' %} - {% assign flutter-path='~/development/flutter' %} - {% assign prompt='\$' %} - {% assign dirdl='~/Downloads/' %} - {% capture uz -%} - {{prompt}} {{unzip}} -xf {{dirdl}}flutter_sdk_v1.0.0.zip -C {{path}} - {%- endcapture %} -{% endcase -%} - -To install Flutter, -download the Flutter SDK bundle from its archive, -move the bundle to where you want it stored, -then extract the SDK. - -1. Download the following installation bundle to get the latest - {{site.sdk.channel}} release of the Flutter SDK. - - {% if include.os=='macOS' %} - - | Intel Processor | Apple Silicon | - |------------------------------------------------------------------|---------------------------------------------------------------------------------------| - | [(loading...)](#){:.download-latest-link-{{osl}} .filled-button} | [(loading...)](#){:.download-latest-link-{{osl}}-arm64 .apple-silicon .filled-button} | - - {% else %} - - [(loading...)](#){:.download-latest-link-{{osl}} .filled-button} - - {% endif -%} - - For other release channels, and older builds, check out the [SDK archive][]. - - The Flutter SDK should download to the {{include.os}} - default download directory: `{{dirdl}}`. - {% if include.os=='Windows' %} - If you changed the location of the Downloads directory, - replace this path with that path. - To find your Downloads directory location, - check out this [Microsoft Community post][move-dl]. - {% endif %} - -1. Create a folder where you can install Flutter. - - Consider creating a directory at {{diroptions}}. - {% if include.os == "Windows" -%} - - :::warning - Don't install Flutter to a directory or path that meets - one or both of the following conditions: - - * The path contains special characters or spaces. - * The path requires elevated privileges. - - As an example, `C:\Program Files` meets both conditions. - ::: - - {% endif %} - -1. Extract the file into the directory you want to store the Flutter SDK. - - ```console - {{uz}} - ``` - - When finished, the Flutter SDK should be in the `{{flutter-path}}` directory. - -[SDK archive]: /install/archive -[move-dl]: https://answers.microsoft.com/en-us/windows/forum/all/move-download-folder-to-other-drive-in-windows-10/67d58118-4ccd-473e-a3da-4e79fdb4c878 - -{% case include.os %} -{% when 'Windows' %} - -### Update your Windows PATH variable {:.no_toc} - -{% render docs/help-link.md, location:'win-path', section:'#unable-to-find-the-flutter-command' %} - -To run Flutter commands in PowerShell, -add Flutter to the `PATH` environment variable. -This section presumes that you installed the Flutter SDK in -`%USERPROFILE%\dev\flutter`. - -1. Press Windows + Pause. - - If your keyboard lacks a Pause key, - try Windows + Fn + B. - - The **System > About** dialog displays. - -1. Click **Advanced System Settings** - > **Advanced** - > **Environment Variables...** - - The **Environment Variables** dialog displays. - -1. In the **User variables for (username)** section, - look for the **Path** entry. - - {:type="a"} - 1. If the entry exists, double-click on it. - - The **Edit Environment Variable** dialog displays. - - {:type="i"} - - 1. Double-click in an empty row. - - 1. Type `%USERPROFILE%\dev\flutter\bin`. - - 1. Click the **%USERPROFILE%\dev\flutter\bin** entry. - - 1. Click **Move Up** until the Flutter entry sits at the top of the list. - - 1. Click **OK** three times. - - 1. If the entry doesn't exist, click **New...**. - - The **Edit Environment Variable** dialog displays. - - {:type="i"} - 1. In the **Variable Name** box, type `Path`. - - 1. In the **Variable Value** box, - type `%USERPROFILE%\dev\flutter\bin` - - 1. Click **OK** three times. - -1. To enable these changes, - close and reopen any existing - command prompts and PowerShell instances. - -{% when 'macOS' %} - -### Add Flutter to your `PATH` {:.no_toc} - -To run Flutter commands in the terminal, -add Flutter to the `PATH` environment variable. -This guide presumes your [Mac runs the latest default shell][zsh-mac], `zsh`. -Zsh uses the `.zshenv` file for [environment variables][envvar]. - -1. Launch your preferred text editor. - -1. If it exists, open the Zsh environmental variable file `~/.zshenv` - in your text editor. If it doesn't, create `~/.zshenv`. - -1. Copy the following line and paste it at the end of your `~/.zshenv` file. - - ```bash - export PATH=$HOME/development/flutter/bin:$PATH - ``` - -1. Save your `~/.zshenv` file. - -1. To apply this change, restart all open terminal sessions. - -If you use another shell, -check out [this tutorial on setting your PATH][other-path]. - -[zsh-mac]: https://support.apple.com/en-us/102360 -[envvar]: https://zsh.sourceforge.io/Intro/intro_3.html -[other-path]: https://www.cyberciti.biz/faq/unix-linux-adding-path/ - -{% else %} - -### Add Flutter to your `PATH` {:.no_toc} - -To run Flutter commands in a shell, -add Flutter to the `PATH` environment variable. - -1. Check which shell starts when you open a new console window. - This would be your _default shell_. - - ```console - $ echo $SHELL - ``` - - This differs from another command that tells you which shell runs - in your current console. - - ```console - $ echo $0 - ``` - -1. To add Flutter to your `PATH`, expand the entry for your default shell, then - choose the command. - -{% for shell in shells %} - -
- Show {{shell.name}} command - - ```console - $ {{shell.set-path}} - ``` - - {% if shell.name == 'shell' %} - :::note - If the above doesn't work, you might be using a non-login shell. - In that case, add the same line to ~/.bashrc: `console $ echo - 'export PATH="~/development/flutter/bin:$PATH"' >> ~/.bashrc `. - To ensure consistency across all shell types, source ~/.bashrc from - ~/.bash_profile by adding the following to ~/.bash_profile: ` if [ -f - ~/.bashrc ]; then source ~/.bashrc fi `. - {% endif %} - -
- -{% endfor %} - -1. To apply this change, restart all open terminal sessions. - -{% endcase %} diff --git a/src/_includes/docs/install/flutter/vscode.md b/src/_includes/docs/install/flutter/vscode.md deleted file mode 100644 index 78d6a2840ca..00000000000 --- a/src/_includes/docs/install/flutter/vscode.md +++ /dev/null @@ -1,110 +0,0 @@ -{%- if include.os=='macOS' -%} -{% assign special = 'Command' %} -{% else %} -{% assign special = 'Control' %} -{%- endif %} - -### Use VS Code to install Flutter {:.no_toc} - -To install Flutter using these instructions, -verify that you've installed -[Visual Studio Code][] and the [Flutter extension for VS Code][]. - -#### Prompt VS Code to install Flutter - -1. Launch VS Code. - -1. To open the **Command Palette**, - press {{special}} + Shift + P. - -1. In the **Command Palette**, type `flutter`. - -1. Select **Flutter: New Project**. - -1. VS Code prompts you to locate the Flutter SDK on your computer. - - {:type="a"} - 1. If you have the Flutter SDK installed, click **Locate SDK**. - - 1. If you don't have the Flutter SDK installed, - click **Download SDK**. - - This option sends you the Flutter install page if you haven't - installed Git {% if include.os == "Windows" %}for Windows {% endif %}as - directed in the [development tools prerequisites][]. - -1. When prompted **Which Flutter template?**, ignore it. - Press Esc. - You can create a test project after checking your development setup. - -#### Download the Flutter SDK - -1. When the **Select Folder for Flutter SDK** dialog displays, - choose where you want to install Flutter. - - VS Code places you in your user profile to start. - Choose a different location. - - {% if include.os == "Windows" -%} - Consider `%USERPROFILE%` or `C:\dev`. - - :::warning - Don't install Flutter to a directory or path that meets - one or both of the following conditions: - - * The path contains special characters or spaces. - * The path requires elevated privileges. - - As an example, `C:\Program Files` meets both conditions. - ::: - - {% else -%} - Consider `~/development/` - {% endif %} - -1. Click **Clone Flutter**. - - While downloading Flutter, VS Code displays these pop-up notifications: - - ```console - Downloading the Flutter SDK. This may take a few minutes. - ``` - - ```console - Initializing the Flutter SDK. This may take a few minutes. - ``` - - The download and installation take a few minutes. - If you suspect that the download has hung, click **Cancel**, - then start the installation again. - - When the Flutter installation succeeds, - VS Code displays this pop-up notification: - - ```console - Do you want to add the Flutter SDK to PATH so it's accessible - in external terminals? - ``` - -1. Click **Add SDK to PATH**. - - When successful, a notification displays: - - ```console - The Flutter SDK was added to your PATH - ``` - -1. VS Code might display a Google Analytics notice. - - If you agree, click **OK**. - -1. To enable `flutter` in all {{include.terminal}} windows: - - 1. Close, then reopen all {{include.terminal}} windows. - 1. Restart VS Code. - - {:type="a"} - -[development tools prerequisites]: #development-tools -[Visual Studio Code]: https://code.visualstudio.com/docs/setup/mac -[Flutter extension for VS Code]: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter diff --git a/src/_includes/docs/install/next-steps.md b/src/_includes/docs/install/next-steps.md deleted file mode 100644 index ba1e4b3ad47..00000000000 --- a/src/_includes/docs/install/next-steps.md +++ /dev/null @@ -1,30 +0,0 @@ -## Manage your Flutter SDK - -To learn more about managing your Flutter SDK installation, -consult the following resources. - -* [Upgrade Flutter][upgrade] -{%- if include.target != 'Web' %} -* [Add web as a build target](/platform-integration/web/setup) -{%- endif %} -{%- if include.target != 'Android' %} -* [Add Android compilation tools](/platform-integration/android/setup) -{%- endif %} -{%- if include.devos == 'macOS' %} -{%- if include.target != 'iOS' %} -* [Add iOS compilation tools](/platform-integration/ios/setup) -{%- endif %} -{%- if include.target != 'desktop' %} -* [Add macOS compilation tools](/platform-integration/macos/setup) -{%- endif %} -{%- endif %} -{%- if include.devos == 'Windows' and include.target != 'desktop' %} -* [Add Windows desktop compilation tools](/platform-integration/windows/setup) -{%- endif %} -{%- if include.devos == 'Linux' and include.target != 'desktop' %} -* [Add Linux compilation tools](/platform-integration/linux/setup) -{%- endif %} -* [Uninstall Flutter][uninstall] - -[upgrade]: /install/upgrade -[uninstall]: /install/uninstall diff --git a/src/_includes/docs/install/reqs/linux/base.md b/src/_includes/docs/install/reqs/linux/base.md deleted file mode 100644 index 2f2c75f75e4..00000000000 --- a/src/_includes/docs/install/reqs/linux/base.md +++ /dev/null @@ -1,122 +0,0 @@ -## Software requirements - -To write and compile Flutter code for {{include.target}}, -you must have the following version of {{include.os}} and the listed -software packages. - -### Operating system - -{% if include.os == 'Linux' %} -{%- capture supportedOs %} -Debian 11 or later -and Ubuntu 22.04 or later LTS -{% endcapture -%} -{% else %} -{% assign supportedOs = 'ChromeOS' %} -{% endif %} - -Flutter supports {{supportedOs}}. - -### Development tools {:.no_toc} - -To develop Flutter on {{include.os}}: - -{% if include.os == "ChromeOS" %} - -1. Enable [Linux][] on your Chromebook. - -{% endif %} - -1. Install the following packages: - [`curl`][curl], [`git`][git], [`unzip`][unzip], [`xz-utils`][xz], [`zip`][zip], `libglu1-mesa` - - ```console - $ sudo apt-get update -y && sudo apt-get upgrade -y; - $ sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa - ``` - -{% case include.target %} -{% when 'desktop' -%} - -1. To develop {{include.os}} desktop apps, use the - following command to install these packages: - [`clang`][clang], - [`cmake`][cmake], - [`ninja-build`][ninjabuild], - [`pkg-config`][pkg-config], - [`libgtk-3-dev`][gtk3], - [`libstdc++-12-dev`][libstdc] - - ```console - $ sudo apt-get install \ - clang cmake git \ - ninja-build pkg-config \ - libgtk-3-dev liblzma-dev \ - libstdc++-12-dev - ``` - -[clang]: https://clang.llvm.org/ -[cmake]: https://cmake.org/ -[gtk3]: https://www.gtk.org/docs/installations/linux#installing-gtk3-from-packages -[ninjabuild]: https://ninja-build.org/ -[pkg-config]: https://www.freedesktop.org/wiki/Software/pkg-config/ -[libstdc]: https://packages.debian.org/sid/libstdc++-12-dev - -{% when 'Android' -%} - -1. To develop Android apps: - - {:type="a"} - 1. Install the following prerequisite packages for Android Studio: - - ```console - $ sudo apt-get install libc6:amd64 libstdc++6:amd64 lib32z1 libbz2-1.0:amd64 - ``` - - 1. Install [Android Studio][] to - debug and compile Java or Kotlin code for Android. - Flutter requires the full version of Android Studio. - -{% when 'Web' -%} - -1. Install [Google Chrome][] to debug JavaScript code for web apps. - -{% endcase -%} - -The developers of the preceding software provide support for those products. -To troubleshoot installation issues, consult that product's documentation. - -[Linux]: https://support.google.com/chromebook/answer/9145439 -[curl]: https://curl.se/ -[git]: https://git-scm.com/ -[unzip]: https://linux.die.net/man/1/unzip -[xz]: https://tukaani.org/xz/ -[zip]: https://linux.die.net/man/1/zip -[Android Studio]: https://developer.android.com/studio/ -[Google Chrome]: https://www.google.com/chrome/dr/download/ - -## Configure a text editor or IDE - -You can build apps with Flutter using any text editor or -integrated development environment (IDE) combined with -Flutter's command-line tools. - -Using an IDE with a Flutter extension or plugin provides code completion, -syntax highlighting, widget editing assists, debugging, and other features. - -Popular options include: - -* [Visual Studio Code][vscode] with the [Flutter extension for VS Code][]. -* [Android Studio][] with the [Flutter plugin for IntelliJ][]. -* [IntelliJ IDEA][] with the [Flutter plugin for IntelliJ][]. - -:::recommend -The Flutter team recommends installing -[Visual Studio Code][vscode] and the [Flutter extension for VS Code][]. -This combination simplifies installing the Flutter SDK. -::: - -[IntelliJ IDEA]: https://www.jetbrains.com/help/idea/installation-guide.html -[vscode]: https://code.visualstudio.com/docs/setup/linux -[Flutter extension for VS Code]: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter -[Flutter plugin for IntelliJ]: https://plugins.jetbrains.com/plugin/9212-flutter diff --git a/src/_includes/docs/install/reqs/macos/base.md b/src/_includes/docs/install/reqs/macos/base.md deleted file mode 100644 index 1f38d40ceb7..00000000000 --- a/src/_includes/docs/install/reqs/macos/base.md +++ /dev/null @@ -1,100 +0,0 @@ -{% case include.target %} -{% when 'mobile-ios' %} -{% assign v-target = "iOS" %} -{% when 'mobile-android' %} -{% assign v-target = "Android" %} -{% else %} -{% assign v-target = include.target %} -{% endcase %} - -## Software requirements - -To write and compile Flutter code for {{v-target}}, -install the following packages. - -### Operating system - -Flutter supports developing on macOS 13 (Ventura) or later. -This guide presumes your Mac runs the `zsh` as your [default shell][zsh-mac]. - -Some Flutter components require the -[Rosetta 2 translation process][need-rosetta]. -If you're developing on an [Apple Silicon][] (ARM) Mac, -install [Rosetta 2][rosetta]: - -```console -$ sudo softwareupdate --install-rosetta --agree-to-license -``` - -[zsh-mac]: https://support.apple.com/en-us/102360 -[Apple Silicon]: https://support.apple.com/en-us/HT211814 -[rosetta]: https://support.apple.com/en-us/HT211861 -[need-rosetta]: {{site.repo.this}}/pull/7119#issuecomment-1124537969 - -### Development tools - -Download and install the following packages. - -{% case include.target %} -{% when 'desktop','iOS' %} - -* [Xcode][] to debug and compile native Swift or Objective-C code. - The Xcode installation also includes Git to manage Flutter versions - and your own source code versioning. -* [CocoaPods][] to compile and enable Flutter plugins in your native apps. - -{% when 'Android' %} - -* [Android Studio][] to debug and compile Java or Kotlin code for Android. - Flutter requires the full version of Android Studio. -* [Git][] to manage Flutter versions and your own source code versioning. - To check if you have `git` installed, - type `git version` in your Terminal. - If you need to install `git`, run `xcode-select --install`. - -{% when 'Web' -%} - -* [Google Chrome][] to debug JavaScript code for web apps. -* [Git][] to manage Flutter versions and your own source code versioning. - To check if you have `git` installed, - type `git version` in your Terminal. - If you need to install `git`, run `xcode-select --install`. - -{% endcase %} - -The developers of the preceding software provide support for those products. -To troubleshoot installation issues, consult that product's documentation. - -[Git]: https://formulae.brew.sh/formula/git -[Android Studio]: https://developer.android.com/studio/ -[Xcode]: {{site.apple-dev}}/xcode/ -[CocoaPods]: https://cocoapods.org/ -[Google Chrome]: https://www.google.com/chrome/ - -### Text editor or integrated development environment - -You can build apps with Flutter using any text editor or -integrated development environment (IDE) combined with -Flutter's command-line tools. - -Using an IDE with a Flutter extension or plugin provides code completion, -syntax highlighting, widget editing assists, debugging, and other features. - -Popular options include: - -* [Visual Studio Code][] with the [Flutter extension for VS Code][]. -* [Android Studio][] with the [Flutter plugin for IntelliJ][]. -* [IntelliJ IDEA][] with both - the [Flutter plugin for IntelliJ][] and the [Android plugin for IntelliJ][]. - -:::recommend -The Flutter team recommends installing -[Visual Studio Code][] and the [Flutter extension for VS Code][]. -This combination simplifies installing the Flutter SDK. -::: - -[IntelliJ IDEA]: https://www.jetbrains.com/help/idea/installation-guide.html -[Visual Studio Code]: https://code.visualstudio.com/docs/setup/mac -[Flutter extension for VS Code]: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter -[Flutter plugin for IntelliJ]: https://plugins.jetbrains.com/plugin/9212-flutter -[Android plugin for IntelliJ]: https://plugins.jetbrains.com/plugin/22989-android diff --git a/src/_includes/docs/install/reqs/windows/base.md b/src/_includes/docs/install/reqs/windows/base.md deleted file mode 100644 index eea44c32747..00000000000 --- a/src/_includes/docs/install/reqs/windows/base.md +++ /dev/null @@ -1,79 +0,0 @@ -## Software requirements - -To write and compile Flutter code for {{include.target}}, -you must have the following version of Windows and the listed -software packages. - -### Operating system - -Flutter supports developing on 64-bit versions of Windows 10 and 11. - -### Development tools - -Download and install the Windows version of the following packages: - -* [Git for Windows][] to manage Flutter versions and - your own source code versioning. - -{% if include.target == 'desktop' -%} - -* [Visual Studio 2022][] to debug and compile native C++ Windows code. - Make sure to install the **Desktop development with C++** workload. - This enables building Windows apps, including all of its default components. - **Visual Studio** is an IDE separate from **[Visual Studio _Code_][]**. - -{% elsif include.target == 'Android' -%} - -* [Android Studio][] to debug and compile Java or Kotlin code for Android. - -{% elsif include.target == 'Web' -%} - -* [Google Chrome][] to debug JavaScript code for web apps. - -{% else -%} - -* [Visual Studio 2022][] with the **Desktop development with C++** workload - or [Build Tools for Visual Studio 2022][]. - This enables building Windows apps, including all of its default components. - **Visual Studio** is an IDE separate from **[Visual Studio _Code_][]**. -* [Android Studio][] to debug and compile Java or Kotlin code for Android. -* The latest version of [Google Chrome][] to debug JavaScript code for web apps. - -{% endif -%} - -The developers of the preceding software provide support for those products. -To troubleshoot installation issues, consult that product's documentation. - -[Android Studio]: https://developer.android.com/studio/ -[Visual Studio 2022]: https://learn.microsoft.com/visualstudio/install/install-visual-studio?view=vs-2022 -[Build Tools for Visual Studio 2022]: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022 -[Google Chrome]: https://www.google.com/chrome/dr/download/ -[Visual Studio _Code_]: https://code.visualstudio.com/ - -## Configure a text editor or IDE - -You can build apps with Flutter using any text editor or -integrated development environment (IDE) combined with -Flutter's command-line tools. - -Using an IDE with a Flutter extension or plugin provides code completion, -syntax highlighting, widget editing assists, debugging, and other features. - -Popular options include: - -* [Visual Studio Code][] with the [Flutter extension for VS Code][]. -* [Android Studio][] with the [Flutter plugin for IntelliJ][]. -* [IntelliJ IDEA][] with the [Flutter plugin for IntelliJ][]. - -:::recommend -The Flutter team recommends installing -[Visual Studio Code][] and the [Flutter extension for VS Code][]. -This combination simplifies installing the Flutter SDK. -::: - -[IntelliJ IDEA]: https://www.jetbrains.com/help/idea/installation-guide.html -[Visual Studio Code]: https://code.visualstudio.com/docs/setup/windows -[Flutter extension for VS Code]: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter -[Flutter plugin for IntelliJ]: https://plugins.jetbrains.com/plugin/9212-flutter -[Windows PowerShell]: https://docs.microsoft.com/powershell/scripting/install/installing-windows-powershell -[Git for Windows]: https://gitforwindows.org/ diff --git a/src/_includes/header.html b/src/_includes/header.html index 17f34ddff8a..93e1653cae8 100644 --- a/src/_includes/header.html +++ b/src/_includes/header.html @@ -86,7 +86,7 @@ - Get started + Get started