-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[WIP] Introduce single 'Set up iOS development' page #11963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Visit the preview URL for this PR (updated for commit e68848a): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much @sfshaza2! Will be nice to go directly to this page.
I left some initial comments but I haven't looked at the staged version yet.
Since these instructions did not install for Android | ||
or desktop development, you can ignore Flutter doctor's | ||
error reports for those components for now. | ||
|
||
If the `flutter doctor` command returns other errors, | ||
run it again with the verbose flag. | ||
|
||
```console | ||
$ flutter doctor -v | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could simplify this by calling out specifically entries to look for in terms of iOS development.
Perhaps the Xcode entry of flutter doctor
and for the existence of an iOS devices in flutter devices
?
Co-authored-by: Parker Lougheed <[email protected]>
Co-authored-by: Parker Lougheed <[email protected]>
Co-authored-by: Parker Lougheed <[email protected]>
Co-authored-by: Parker Lougheed <[email protected]>
Co-authored-by: Parker Lougheed <[email protected]>
Co-authored-by: Parker Lougheed <[email protected]>
|
||
Learn how to set up your development environment | ||
to run, build, and deploy Flutter apps for iOS devices. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing the Rosetta instructions for Apple Silicon (ARM) Macs:
sudo softwareupdate --install-rosetta --agree-to-license
#7119 (comment)
flutter/flutter#69157 (getting closer to done)
```console | ||
$ sudo sh -c 'xcode-select -s /Applications/Xcode.app/Contents/Developer && xcodebuild -runFirstLaunch' | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part doesn't require sudo, but xcodebuild -license
does. The three commands are:
$ xcode-select -s /Applications/Xcode.app
$ xcodebuild -runFirstLaunch
$ sudo xcodebuild -license
I also think xcodebuild -downloadPlatform iOS
is required for both physical devices and simulator, so you can add it to the Xcode section instead of in the "Virtual device" section.
{% tabs "ios-simulator-or-physical-device" %} | ||
{% tab "Simulator" %} | ||
|
||
### Configure your iOS Simulator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have never needed to do a single step in the "Configure your iOS Simulator" section. It was added in #9054 which links to #8990, which seems unrelated...
@vashworth any idea why we would need to keep the "use a 64-bit device" or "high-screen density" parts?
Current page is:
https://docs.flutter.dev/get-started/install/macos/mobile-ios#configure-your-ios-simulator
This PR is staged at https://flutter-docs-prod--pr11963-get-st-9rrn1yhn.web.app/platform-integration/ios/setup-ios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also not never needed this. Maybe we could move this to the troubleshooting page? https://docs.flutter.dev/install/troubleshoot
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why .gem/bin
would be needed on your PATH
, I don't have this set, and it's not in the CocoaPods instructions...
cc @vashworth again to fact check me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These CocoaPods installation steps won't work on a brand new macbook: CocoaPods requires a higher Ruby version than the one that's preinstalled on macOS.
Could we instead just link to the CocoaPods installation guide? None of these CocoaPods installation steps are specific to Flutter.
Here's the error you'll get today:
> sudo gem install cocoapods
ERROR: Error installing cocoapods:
The last version of drb (>= 0) to support your Ruby & RubyGems was 2.0.6. Try installing it with `gem install drb -v 2.0.6` and then running the current command again
drb requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.
Example user report: CocoaPods/CocoaPods#12640
If you have installed Xcode, ensure that | ||
it's up to date and continue to the next step. | ||
(After setting up the command-line tools | ||
and accepting the license, as shown here.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just skip this content? I think this reads better without it :)
Note that the behavior of the iOS Simulator can vary | ||
from an actual physical device. It's easier to get | ||
the Simulator up and running than a physical device, | ||
which requires more setup. | ||
For that reason, we recommend starting with the Simulator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of this?
Note that the behavior of the iOS Simulator can vary | |
from an actual physical device. It's easier to get | |
the Simulator up and running than a physical device, | |
which requires more setup. | |
For that reason, we recommend starting with the Simulator. | |
We recommend starting with the iOS Simulator as | |
it's easier to get setup than a physical iOS device. | |
However, you should also test your app on an actual | |
physical device. |
error reports for those components for now. | ||
|
||
If the `flutter doctor` command returns other errors, | ||
run it again with the verbose flag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To configure Xcode's command-line tools, | ||
use the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of this?
To configure Xcode's command-line tools, | |
use the following command: | |
Configure Xcode's command-line tools: |
|
||
Use the following steps: | ||
|
||
1. To install the iOS Simulator, run the following command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider:
1. To install the iOS Simulator, run the following command. | |
1. To install the iOS Simulator, run the following command: |
Alternatively:
1. To install the iOS Simulator, run the following command. | |
1. Install the iOS Simulator: |
The dialog explains that Developer Mode requires reducing | ||
the security of the iOS device. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this? It feels a bit self-explanatory. It's also quite similar to this section's intro on line 135.
[Get started with Flutter]: /get-started/install | ||
[up to date]: /install/upgrade | ||
|
||
[up to date]: /install/upgrade |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this is repeated from line 21
|
||
--- | ||
|
||
## Install CocoaPods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move the CocoaPods section to be before the iOS simulator / physical device section? That order might feel more natural: I configure my Mac then I configure my target device. Currently these are mixed since the CocoaPods step is after the target device section.
you might need to install or further tasks to perform. | ||
|
||
**Congratulations.** | ||
You can now start developing Flutter apps for iOS! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this cheery ending :)
Part of the updating installation work.
Fixes #11953
Staged: https://flutter-docs-prod--pr11963-get-st-9rrn1yhn.web.app/platform-integration/ios/setup-ios