Skip to content
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

Automatically run pod install when a template ships with a Podfile #368

Closed
grabbou opened this issue May 6, 2019 · 7 comments · Fixed by #373
Closed

Automatically run pod install when a template ships with a Podfile #368

grabbou opened this issue May 6, 2019 · 7 comments · Fixed by #373

Comments

@grabbou
Copy link
Member

grabbou commented May 6, 2019

New React Native template has CocoaPods integration and other templates might soon have it too.

Unfortunately, the drawback is that you need to run pod install yourself after initing a project.

We want to improve this workflow and make CLI run pod install automatically for users when CocoaPods is available or attempt installing.

Since this code is only going to be run when platform is Mac, we can assume gem is available and run sudo gem install cocoapods as per the docs.

We can also allow users to skip that step where we only print an information that they should install CocoaPods afterwards in order to run iOS application.

@lucasbento
Copy link
Member

Any idea on how we would let the user skip the step of installing cocoapods and running pod install?

@grabbou
Copy link
Member Author

grabbou commented May 6, 2019

A --skip-pods flag? Why would you want to skip it tho?

@lucasbento
Copy link
Member

We can also allow users to skip that step where we only print an information that they should install CocoaPods afterwards in order to run iOS application.

Just asked because of this :P

@grabbou
Copy link
Member Author

grabbou commented May 6, 2019

Ah, sorry! I meant something like this:

CocoaPods was not found on your laptop. Do you want to install it? [y/n]

(and you can go with n if you don't want to do it).

@Vyazovoy
Copy link

Vyazovoy commented May 7, 2019

I would discourage using sudo installation option for Cocoapods as it is rarely used. Usually people use Ruby installed with a help of rbenv instead of system one. Either way providing instructions how to install Cocoapods instead of installing it by cli looks like more wise approach. As end user suppose to know what is Cocoapods if they are going to use it as an iOS dependency manager.

@thymikee
Copy link
Member

thymikee commented May 7, 2019

Agreed, we should leave installation of CocoaPods to the user, as there are multiple ways it can be installed. The best we can do is to propose a bunch of solutions and link to official CP docs.

@lucasbento
Copy link
Member

IMO it's not harmful to ask the user if the CLI should automatically install it or not, the approach suggested is the one recommended in the docs, for me it just looks a bit weird to ask for user's password when doing it as it uses sudo (you can see on #373).

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

Successfully merging a pull request may close this issue.

4 participants