Skip to content

[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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Conversation

sfshaza2
Copy link
Contributor

@sfshaza2 sfshaza2 commented May 1, 2025

@sfshaza2 sfshaza2 requested review from parlough, jmagman and a team as code owners May 1, 2025 01:18
@flutter-website-bot
Copy link
Collaborator

flutter-website-bot commented May 1, 2025

Visit the preview URL for this PR (updated for commit e68848a):

https://flutter-docs-prod--pr11963-get-st-9rrn1yhn.web.app

Copy link
Member

@parlough parlough left a 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.

Comment on lines +257 to +266
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
```
Copy link
Member

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?


Learn how to set up your development environment
to run, build, and deploy Flutter apps for iOS devices.

Copy link
Member

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)

Comment on lines +42 to +44
```console
$ sudo sh -c 'xcode-select -s /Applications/Xcode.app/Contents/Developer && xcodebuild -runFirstLaunch'
```
Copy link
Member

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
Copy link
Member

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

Copy link
Member

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

Comment on lines +231 to +239
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.
Copy link
Member

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.

Copy link
Member

@loic-sharma loic-sharma May 2, 2025

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

@sfshaza2 sfshaza2 changed the title [WIP] Testing new page [WIP] Introduce single 'Set up iOS development' page May 2, 2025
@sfshaza2 sfshaza2 marked this pull request as draft May 2, 2025 16:35
Comment on lines +32 to +35
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.)
Copy link
Member

@loic-sharma loic-sharma May 2, 2025

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 :)

Comment on lines +54 to +58
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.
Copy link
Member

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?

Suggested change
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.
Copy link
Member

@loic-sharma loic-sharma May 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to tell the user to just run flutter doctor --verbose immediately instead of trying flutter doctor first and then flutter doctor --verbose second?

These verbose output is quite readable:

image

Comment on lines +39 to +40
To configure Xcode's command-line tools,
use the following command:
Copy link
Member

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?

Suggested change
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider:

Suggested change
1. To install the iOS Simulator, run the following command.
1. To install the iOS Simulator, run the following command:

Alternatively:

Suggested change
1. To install the iOS Simulator, run the following command.
1. Install the iOS Simulator:

Comment on lines +149 to +150
The dialog explains that Developer Mode requires reducing
the security of the iOS device.
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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!
Copy link
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create new "Set up iOS development" page
5 participants