1
1
## Configure iOS development
2
2
3
3
{% assign prompt1='$' %}
4
- {% assign os = include.os %}
4
+ {% assign devos = include.devos %}
5
5
{% assign target = include.target %}
6
+ {% assign time = include.time %}
6
7
7
8
### Configure Xcode
8
9
9
- To develop Flutter apps for {{os}}, install Xcode to compile to native bytecode.
10
+ {% if time=="first" %}
11
+
12
+ To develop Flutter apps for {{target}}, install Xcode to compile to native bytecode.
10
13
11
14
1 . To configure the command-line tools to use the installed version of Xcode,
12
15
run the following commands.
@@ -18,25 +21,33 @@ To develop Flutter apps for {{os}}, install Xcode to compile to native bytecode.
18
21
To use the latest version of Xcode, use this path.
19
22
If you need to use a different version, specify that path instead.
20
23
21
- {% if target=="mobile-ios" %}
22
-
23
- 1. To install the iOS Simulator, run the following command.
24
+ 1. Sign the Xcode license agreement.
24
25
25
26
```terminal
26
- {{prompt1}} xcodebuild -downloadPlatform iOS
27
+ {{prompt1}} sudo xcodebuild -license
27
28
```
28
29
29
- {% endif %}
30
+ {% else %}
30
31
31
- 1. Sign the Xcode license agreement.
32
+ This section presumes you have installed and configured Xcode when you
33
+ installed Flutter for
32
34
33
- ```terminal
34
- {{prompt1}} sudo xcodebuild -license
35
- ```
35
+ {%- case target %}
36
+ {%- when 'iOS' %}
37
+ [macOS desktop][macos-install]
38
+ {%- when 'desktop' %}
39
+ [iOS][ios-install]
40
+ {%- endcase %}
41
+ development.
42
+
43
+ [macos-install]: /get-started/install/macos/desktop/#configure-ios-development
44
+ [ios-install]: /get-started/install/macos/mobile-ios/#configure-ios-development
45
+
46
+ {% endif %}
36
47
37
48
Try to keep to the current version of Xcode.
38
49
39
- {% if target=="mobile-ios" %}
50
+ {% if target=='iOS' %}
40
51
41
52
### Configure your target iOS device
42
53
@@ -57,25 +68,27 @@ With Xcode, you can run Flutter apps on an iOS device or on the simulator.
57
68
58
69
<div class="tab-pane active" id="virtual" role="tabpanel" aria-labelledby="virtual-tab" markdown="1">
59
70
60
- {% include docs/install/devices/ios-simulator.md os=include.os %}
71
+ {% include docs/install/devices/ios-simulator.md %}
61
72
62
73
</div>
63
74
64
75
<div class="tab-pane" id="physical" role="tabpanel" aria-labelledby="physical-tab" markdown="1">
65
76
66
- {% include docs/install/devices/ios-physical.md os=include.os %}
77
+ {% include docs/install/devices/ios-physical.md %}
67
78
68
79
</div>
69
80
</div>
70
81
{% comment %} End: Tab panes. {% endcomment -%}
71
82
72
83
{% endif %}
73
84
85
+ {% if time=="first" %}
86
+
74
87
### Install CocoaPods
75
88
76
- If your apps depend on [Flutter plugins][] with native {{os }} code,
89
+ If your apps depend on [Flutter plugins][] with native {{target }} code,
77
90
install [CocoaPods][cocoapods].
78
- This program bundles various dependencies across Flutter and {{os }} code.
91
+ This program bundles various dependencies across Flutter and {{target }} code.
79
92
80
93
To install and set up CocoaPods, run the following commands:
81
94
@@ -100,4 +113,7 @@ To install and set up CocoaPods, run the following commands:
100
113
1 . To apply this change, restart all open terminal sessions.
101
114
102
115
[ Flutter plugins ] : /packages-and-plugins/developing-packages#types
116
+
117
+ {% endif %}
118
+
103
119
[ cocoapods ] : https://guides.cocoapods.org/using/getting-started.html#installation
0 commit comments