Skip to content

Commit

Permalink
Refactor macOS Getting Started (#9736)
Browse files Browse the repository at this point in the history
Total refactor of macOS install.

Fixes #2461
Fixes #2529
Fixes #4995
Fixes #5374
Fixes #7475
Fixes #7647
Fixes #9520

---------

Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
  • Loading branch information
atsansone and sfshaza2 authored Dec 21, 2023
1 parent 301025e commit 534aa3f
Show file tree
Hide file tree
Showing 44 changed files with 1,181 additions and 407 deletions.
4 changes: 3 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ youtube-site: https://youtube.com

appmin:
github_win: 2.4
github_mac: 2.4
vscode: 1.75
android_studio: '2022.3 (Giraffe) or later'
intellij_idea: '2022.3 or later'
Expand All @@ -71,7 +72,7 @@ devmin:
ubuntu: '18.04 LTS'
targetmin:
windows: 'Microsoft Windows 7'
macos: '10.13 (High Sierra)'
macos: '10.13 (Ventura)'
linux:
debian: 9
ubuntu: '18.04 LTS'
Expand All @@ -90,6 +91,7 @@ appnow:
powershell: 5.0
xcode: '15'
ios: '17'
cocoapods: '1.12'

########### Jekyll ###########

Expand Down
4 changes: 2 additions & 2 deletions src/_includes/docs/install/compiler/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
</div>
{% comment %} End: Tab panes. {% endcomment -%}

### Agree to Android Licenses
### Agree to Android licenses

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

Expand Down Expand Up @@ -162,7 +162,7 @@ agree to the licenses of the Android SDK platform.
<details markdown="1">
<summary>How to fix the error of finding Java install</summary>

You may have an issue with the Android SDK locating the Java SDK.
You might have an issue with the Android SDK locating the Java SDK.

```terminal
$ flutter doctor --android-licenses
Expand Down
104 changes: 104 additions & 0 deletions src/_includes/docs/install/compiler/xcode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
## Configure iOS development

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

### Configure Xcode

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

1. To configure the Xcode command-line tools to use the installed version,
run the following commands.

```terminal
{{prompt1}} sudo sh -c 'xcode-select -s /Applications/Xcode.app/Contents/Developer && xcodebuild -runFirstLaunch'
```

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.

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

{% endif %}

1. Sign the Xcode license agreement.

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

Try to keep to the current version of Xcode.

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

### Configure your target iOS device

With Xcode, you can run Flutter apps on an iOS device or on the simulator.

{% comment %} Nav tabs {% endcomment -%}
<ul class="nav nav-tabs" id="ios-devices-vp" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="virtual-tab" href="#virtual" role="tab" aria-controls="virtual" aria-selected="true">Virtual Device</a>
</li>
<li class="nav-item">
<a class="nav-link" id="physical-tab" href="#physical" role="tab" aria-controls="physical" aria-selected="false">Physical Device</a>
</li>
</ul>

{% comment %} Tab panes {% endcomment -%}
<div class="tab-content">

<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 %}

</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 %}

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

{% endif %}

### Install CocoaPods

If your apps depend on [Flutter plugins][] with native {{os}} code,
install CocoaPods. Built using Ruby,
CocoaPods handles the bundling of various dependencies across Flutter
and {{os}} code.

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

1. Install Homebrew if necessary.

```terminal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

1. Install `ruby` using Homebrew.

```terminal
{{prompt1}} brew install ruby
```

1. Install `cocoapods` using Homebrew.

```terminal
{{prompt1}} brew install cocoapods
```

Using Homebrew reduces potential issues with chipsets and install permissions.

[Flutter plugins]: {{site.url}}/packages-and-plugins/developing-packages#types
[cocoapods]: https://formulae.brew.sh/formula/cocoapods
6 changes: 3 additions & 3 deletions src/_includes/docs/install/devices/android-emulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
{% include docs/help-link.md location='android-emulator' section='#android-setup' %}

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

To configure your Flutter app to run in the Android emulator,
Expand Down Expand Up @@ -40,7 +40,7 @@ follow these steps:

1. Click **Next**.

1. Click **{{images}} Images**.
1. Click {{images}}.

1. Click one system image for the Android version you want to emulate.

Expand Down
Loading

0 comments on commit 534aa3f

Please sign in to comment.