Skip to content

feat: add manual Cocoapods installation info - #2204

Merged
thymikee merged 7 commits into
react-native-community:mainfrom
okwasniewski:feat/cocoapods-info
Dec 13, 2023
Merged

thymikee merged 7 commits into
react-native-community:mainfrom
okwasniewski:feat/cocoapods-info

Conversation

@okwasniewski

Copy link
Copy Markdown
Contributor

Summary:

This PR aims to:

  1. Add manual cocapods info when installation fails or user chooses "No" when prompted to install
  2. Fix CLI exiting the process when cocoapods installation goes wrong

CleanShot 2023-12-13 at 13 02 36@2x

Test Plan:

CI Green

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

Comment thread packages/cli/src/commands/init/init.ts
Comment thread packages/cli/src/commands/init/init.ts Outdated
Comment thread packages/cli/src/commands/init/init.ts Outdated
Comment thread packages/cli/src/commands/init/init.ts Outdated
Comment thread __e2e__/init.test.ts Outdated
Comment thread __e2e__/init.test.ts Outdated
Comment thread __e2e__/init.test.ts Outdated

@cipolleschi cipolleschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me.
I only left a couple of nits

@@ -196,6 +203,7 @@ async function createFromTemplate({
const installPodsValue = String(installCocoaPods);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you already have this variable in didInstallPods (line125)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed here: #2204 (comment)

didInstallPods is used for a slightly different purpose (also to check if the user didn't specify his choice) and mixing those two made the code more complex.

Comment thread packages/cli/src/commands/init/printRunInstructions.ts Outdated
Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>
@thymikee
thymikee merged commit 1bf0d85 into react-native-community:main Dec 13, 2023
thymikee pushed a commit that referenced this pull request Dec 13, 2023
* feat: add manual Cocoapods installation info

* feat: apply review comments

* fix: move logger.info out of nested if

* fix: hide banner in CI

* fix: check for Install cocoapods only on darwin

* test: check if cocoapods instruction is shown in another test

* Update packages/cli/src/commands/init/printRunInstructions.ts

Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>

---------

Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants