On my current project I am asked not to commit my Pods
directory, and at the same time, guys want me to 'add some script' to XCode build phases which will run 'pod install' automatically before each installation if needed.
The goal is not to run pod install
manually in terminal after you clone the repo.
I have spend a day trying to solve this and I've found a couple of references with no much detail:
iOS using pod install as Pre-action run script for building the project
CocoaPods version control, must use pod install when cloning repo
I've also found out that for CI the same problem is solved by setting actions in .yml file:
Travis-CI is unable to open file
Do you know what this kind of script could look like?
Maybe it would be best if this could be separated in 2 different questions.
But now that we are here already, to avoid the pods directory on your repository, add this line to your .gitignore file:
Pods/
For your second question regarding running pod install. On Xcode:
Add the script:
cd ${PROJECT_DIR}
test -e Pods || pod install && sleep 30
Description of the script: