XCode 8 Stuck on Running 2 of 4 Custom Shell Scrip

2020-04-11 13:47发布

问题:

Xcode is taking about 7 minutes to run my build my app on my phone. I am having this problem with 3 different apps all with Fabric and CocoPods installed. I have turned Optimization to none. The only common cocopod is Alimo fire. Below are my custom shell scripts:

It is becoming a huge pain to test anything on my device. I can run errands and be back home before it finishes building. I have on a mac pro so system resources are not the issue. Thanks!

Edit 1

It looks like the [CP] Embed Pods Framewords is taking the longest

回答1:

It had over 1200 appleid certificates, so it was taking a while to sign the cocopods. To fix:

  1. Open keychain

  2. Click Certificates

  3. Search appleid

  4. Select all CMD-A

  5. Press delete

Reference: XCode 7.3.1 hangs on "copying swift standard libraries"



回答2:

  • To narrow down which step is slow, when building open the build via Report Navigator (Cmd-8).
  • Have you tried restarting Xcode?
  • Try excluding your build's DerivedData folder from Time Machine.
  • Are you up to date on cocoapods?


回答3:

I had the exact same problem.

To fix it check the box for "Run script only when installing" in Target - Build Phases - Run script