1

I was wandering if there is a way to make Xcode run the command "pod install" automatically, when the "The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." error happens. Im tired of doing it manually every time.

PS. Here is the guide from Apple, but I crash on the:

  1. In the Shell text field, enter your script code.

Because I don't know what exaclty I should write as the script code. Thanks in advance!

etaaaaaaa
  • 31
  • 4
  • 2
    Tried this script ?? https://gist.github.com/stephanecopin/a52503b85bf23d3ab3a34610ecd2c9b3 – RTXGamer Mar 17 '22 at 12:39
  • 1
    Perhaps use `pod update` instead of `pod install` – Paul Beusterien Mar 17 '22 at 13:32
  • 1
    Instead of creating a script, you should rather ask yourself why it happens so often. This error should really be rare. So it's something with your workflow / the way you include pods in podfile that triggers this. As for the error itself, it doesn't have 1 solution. It has a few reasons, and each requires a different solution. See this for example: https://stackoverflow.com/questions/21366549/error-the-sandbox-is-not-in-sync-with-the-podfile-lock-after-installing-re So again, concentrate on eliminating the cause of the error, not trying to work around it. – timbre timbre Mar 17 '22 at 13:49
  • 1
    It happens because I switch between branches that have different setup, so it's okay really. I just want it to happen automatically – etaaaaaaa Mar 17 '22 at 18:15

0 Answers0