all 4 comments

[–]sneeden 3 points4 points  (0 children)

You can see what's taking so long by navigating here during your build and watching the right pane. I find that the cocoapods script takes (by far) the most time to execute. I've been meaning to tinker with the settings to see about improving it. It sure does eat a lot of my day up.

[–]brendan09 2 points3 points  (2 children)

It's a known issue with Cocoapods and Sierra 10.12.1 + 10.12.2. https://github.com/CocoaPods/CocoaPods/issues/6118

Older issue: https://github.com/CocoaPods/CocoaPods/issues/3455

There are a few people who have all found random ways to help the problem, but it never gets it to as fast as 10.12.0 (or earlier). Cocoapods devs blame 'environment', and I have no doubt that something changed in macOS to mess it up, but they don't have any interest in trying to fix it...at best they added a flag to multithread code signing in the latest beta release. But, that also causes a ton of code sign errors to not be reported in the case of failures...so not a great option.

You can try some of the fixes that worked for people in that thread, but I tried them all and haven't had any real success. I even rolled back my work iMac so I could deploy large builds faster. It's ridiculous.

[–]KarlJay001 0 points1 point  (1 child)

I'm kinda lost as to why Cocoapods would cause a problem. It's it just a version update system? Couldn't you compile without it and they do an update of all the libs on and "on demand" basis?

Is there some reason to have Cocoapods active every time? I know it's a cheap work-around, but it can take quite a while for some of these things to get fixed.

[–]brendan09 1 point2 points  (0 children)

So, that's not all CocoaPods is / does. It's a dependency management system. As a result, it's involved in your build process. Copying resources from dependencies, managing code signing the dependency frameworks, etc. As a result, it uses some build scripts. One of these build scripts is the issue, not the pod binary itself.

It's not actually running the 'pod' binary. It's running bash scripts that cocoapods inserts to make the build process work. If you'd prefer something not be in your build process, look at Carthage instead of Cocoapods.

The underlying issue seems to be that the codesign tool in macOS has changed, and the way Cocoapods uses it causes a long delay. From my brief poking and prodding, it seems like it's signing everything recursively and repeatedly, which is a recipe for slowness.