Skip to content

Commit 05c3efc

Browse files
authored
1 parent e72b6d9 commit 05c3efc

File tree

9 files changed

+198
-96
lines changed

9 files changed

+198
-96
lines changed

firebase.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@
146146
{ "source": "/platform-integration/c-interop", "destination": "/platform-integration", "type": 301 },
147147
{ "source": "/platform-integration/ios-app-clip", "destination": "/platform-integration/ios/ios-app-clip", "type": 301 },
148148
{ "source": "/platform-integration/ios/splash-screen", "destination": "/platform-integration/ios/launch-screen", "type": 301 },
149+
{ "source": "/platform-integration/macos/install-macos", "destination": "/platform-integration/macos/setup", "type": 301 },
150+
{ "source": "/platform-integration/macos/install-macos/:rest*", "destination": "/platform-integration/macos/setup", "type": 301 },
149151
{ "source": "/platform-integration/platform-adaptations", "destination": "/ui/adaptive-responsive/platform-adaptations", "type": 301 },
150152
{ "source": "/platform-integration/platform-views", "destination": "/platform-integration/android/platform-views", "type": 301 },
151153
{ "source": "/platform-integration/web-images", "destination": "/platform-integration/web/web-images", "type": 301 },

src/_data/sidenav.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@
561561
- title: macOS
562562
permalink: /platform-integration/macos
563563
children:
564-
- title: Add macOS as build target
565-
permalink: /platform-integration/macos/install-macos
564+
- title: Set up macOS development
565+
permalink: /platform-integration/macos/setup
566566
- title: Build a macOS app
567567
permalink: /platform-integration/macos/building
568568
- title: Bind to native code

src/_includes/docs/install/next-steps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ consult the following resources.
3232
{%- endcase %}
3333
{%- case next-step.add-xcode %}
3434
{%- when 'Y' %}
35-
* [Add macOS compilation tools](/platform-integration/macos/install-macos/install-macos-from-{{mod-target}})
35+
* [Add macOS compilation tools](/platform-integration/macos/setup)
3636
{%- endcase %}
3737
{%- case next-step.add-linux-tools %}
3838
{%- when 'Y' %}

src/content/install/with-vs-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ the Flutter team recommends you first try out
250250
<a class="text-button" href="/platform-integration/ios/install-ios">Target iOS</a>
251251
</li>
252252
<li class="macos-only">
253-
<a class="text-button" href="https://github.com/platform-integration/macos/install-macos">Target macOS</a>
253+
<a class="text-button" href="https://github.com/platform-integration/macos/setup">Target macOS</a>
254254
</li>
255255
<li class="windows-only">
256256
<a class="text-button" href="/platform-integration/windows/setup">Target Windows</a>

src/content/platform-integration/macos/install-macos/index.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/content/platform-integration/macos/install-macos/install-macos-from-android.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/content/platform-integration/macos/install-macos/install-macos-from-ios.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/content/platform-integration/macos/install-macos/install-macos-from-web.md

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
---
2+
title: Set up macOS development
3+
description: >-
4+
Configure your development environment to
5+
run, build, and deploy Flutter apps for macOS devices.
6+
---
7+
8+
Learn how to set up your development environment
9+
to run, build, and deploy Flutter apps for the macOS desktop platform.
10+
11+
:::note
12+
If you haven't set up Flutter already,
13+
visit and follow the [Get started with Flutter][] guide first.
14+
15+
If you've already installed Flutter,
16+
ensure that it's [up to date][].
17+
:::
18+
19+
[Get started with Flutter]: /get-started/install
20+
[up to date]: /install/upgrade
21+
22+
## Set up tooling {: #set-up-tooling}
23+
24+
With Xcode, you can run Flutter apps on macOS as well as
25+
compile and debug native Swift and Objective-C code.
26+
27+
1. <h3>Install Xcode</h3>
28+
29+
If you haven't done so already,
30+
[install and set up the latest version of Xcode][xcode].
31+
32+
If you've already installed Xcode,
33+
update it to the latest version using the
34+
same installation method you used originally.
35+
36+
1. <h3>Set up Xcode command-line tools</h3>
37+
38+
To configure the Xcode command-line tools to use
39+
the version of Xcode you installed,
40+
run the following command in your preferred terminal:
41+
42+
```console
43+
$ sudo sh -c 'xcode-select -s /Applications/Xcode.app/Contents/Developer && xcodebuild -runFirstLaunch'
44+
```
45+
46+
If you downloaded Xcode elsewhere or need to use a different version,
47+
replace `/Applications/Xcode.app` with the path to there instead.
48+
49+
1. <h3>Agree to the Xcode licenses</h3>
50+
51+
After you've set up Xcode and configured its command-line tools,
52+
agree to the Xcode licenses.
53+
54+
1. Open your preferred terminal.
55+
56+
1. Run the following command to review and sign the Xcode licenses.
57+
58+
```console
59+
$ sudo xcodebuild -license
60+
```
61+
62+
1. Read and agree to all necessary licenses.
63+
64+
Before agreeing to the terms of each license,
65+
read each with care.
66+
67+
Once you've accepted all the necessary licenses successfully,
68+
the command should output how to review the licenses.
69+
70+
1. <h3>Install CocoaPods</h3>
71+
72+
To support [Flutter plugins][] that use native macOS code,
73+
install the latest version of [CocoaPods][].
74+
75+
Install CocoaPods following the
76+
[CocoaPods installation guide][].
77+
78+
If you've already installed CocoaPods,
79+
update it following the [CocoaPods update guide][].
80+
81+
{: .steps}
82+
83+
[xcode]: https://developer.apple.com/xcode/
84+
[Flutter plugins]: /packages-and-plugins/developing-packages#types
85+
[CocoaPods]: https://cocoapods.org/
86+
[CocoaPods installation guide]: https://guides.cocoapods.org/using/getting-started.html#installation
87+
[CocoaPods update guide]: https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods
88+
89+
## Validate your setup {: #validate-setup}
90+
91+
1. <h3>Check for toolchain issues</h3>
92+
93+
To check for any issues with your macOS development setup,
94+
run the `flutter doctor` command in your preferred terminal:
95+
96+
```console
97+
$ flutter doctor -v
98+
```
99+
100+
If you see any errors or tasks to complete
101+
under the **Xcode** section,
102+
complete and resolve them, then
103+
run `flutter doctor -v` again to verify any changes.
104+
105+
1. <h3>Check for macOS devices</h3>
106+
107+
To ensure Flutter can find and connect to your macOS device correctly,
108+
run `flutter devices` in your preferred terminal:
109+
110+
```console
111+
$ flutter devices
112+
```
113+
114+
If you set everything up correctly,
115+
there should be at least one entry with the platform marked as **macos**.
116+
117+
1. <h3>Troubleshoot setup issues</h3>
118+
119+
If you need help resolving any setup issues,
120+
check out [Install and setup troubleshooting][].
121+
122+
If you still have issues or questions,
123+
reach out on one of the Flutter [community][] channels.
124+
125+
{: .steps}
126+
127+
[Install and setup troubleshooting]: /install/troubleshoot
128+
[community]: {{site.main-url}}/community
129+
130+
## Start developing for macOS {: #start-developing}
131+
132+
Congratulations!
133+
Now that you've set up macOS desktop development for Flutter,
134+
you can continue your Flutter learning journey while testing on macOS
135+
or begin expanding integration with macOS.
136+
137+
<div class="card-grid link-cards">
138+
<div class="card filled-card list-card">
139+
<div class="card-leading">
140+
<img src="/assets/images/decorative/pointing-the-way.png" height="160" aria-hidden="true" alt="Dash helping you explore Flutter learning resources.">
141+
</div>
142+
<div class="card-header">
143+
<span class="card-title">Continue learning Flutter</span>
144+
</div>
145+
<div class="card-content">
146+
<ul>
147+
<li>
148+
<a class="text-button" href="/get-started/codelab">Write your first app</a>
149+
</li>
150+
<li>
151+
<a class="text-button" href="/get-started/fundamentals">Learn the fundamentals</a>
152+
</li>
153+
<li>
154+
<a class="text-button" href="https://www.youtube.com/watch?v=b_sQ9bMltGU&list=PLjxrf2q8roU23XGwz3Km7sQZFTdB996iG">Explore Flutter widgets</a>
155+
</li>
156+
<li>
157+
<a class="text-button" href="/reference/learning-resources">Check out samples</a>
158+
</li>
159+
<li>
160+
<a class="text-button" href="/resources/bootstrap-into-dart">Learn about Dart</a>
161+
</li>
162+
</ul>
163+
</div>
164+
</div>
165+
<div class="card filled-card list-card">
166+
<div class="card-leading">
167+
<img src="/assets/images/decorative/flutter-on-desktop.svg" height="160" aria-hidden="true" alt="An outline of Flutter desktop support.">
168+
</div>
169+
<div class="card-header">
170+
<span class="card-title">Build for macOS</span>
171+
</div>
172+
<div class="card-content">
173+
<ul>
174+
<li>
175+
<a class="text-button" href="/deployment/macos">Build and deploy to macOS</a>
176+
</li>
177+
<li>
178+
<a class="text-button" href="/platform-integration/macos/c-interop">Bind to native macOS code</a>
179+
</li>
180+
<li>
181+
<a class="text-button" href="/platform-integration/macos/platform-views">Embed native macOS views</a>
182+
</li>
183+
<li>
184+
<a class="text-button" href="/deployment/flavors-ios">Set up app flavors</a>
185+
</li>
186+
<li>
187+
<a class="text-button" href="/packages-and-plugins/swift-package-manager/for-app-developers">Use Swift Package Manager</a>
188+
</li>
189+
</ul>
190+
</div>
191+
</div>
192+
</div>

0 commit comments

Comments
 (0)