4

I've got a large project that uses Cocoapods, whose compilation time is > 60 seconds. A large amount of this compilation time goes towards compiling third party SDK's: Facebook and Parse. This is because they contain the most source files.

I find myself running pod install quite often, especially when I want to refactor my application and maintain create test app targets as well as unit test targets that require third party dependencies.

Building the project after pod install causes all the SDK's get rebuilt again, even though nothing's changed about them. When done repeatedly this wastes lots of time during a refactoring process.

How can I force Cocoapods to make use of binary frameworks of those dependencies which I've already downloaded on disk, to avoid compilation?

fatuhoku
  • 4,815
  • 3
  • 30
  • 70
  • See this link for minimizing time spent on recompilation. Reason is because pch gets touched during a `pod install` apparently. https://github.com/CocoaPods/CocoaPods/issues/3991 – fatuhoku Nov 25 '15 at 00:29

3 Answers3

2

You can use CocoaPods Rome to generate binary frameworks which you can install yourself manually.

orta
  • 4,225
  • 1
  • 26
  • 34
  • Interesting. Will using dynamic frameworks in this way help me solve diamond dependency problems like the one described here: http://stackoverflow.com/questions/27727455/class-x-is-implemented-in-both-framework-and-application-one-of-the-two-will? – fatuhoku Nov 21 '15 at 14:26
  • I think so, but I'm not an expert in this area I'm afraid. Dynamic frameworks should allow for multiple classes with the same symbols in the runtime. – orta Nov 21 '15 at 16:06
  • how is this different from `CocoaPods Binary`? – mfaani Feb 17 '21 at 17:45
2

I've had similar problems and developed my own utility Rugby. In the current version, Rugby can cache all (or just some of them) pods dependencies and remove their targets from the Pods project.

Also, Rugby doesn't change Podfile. You can use pod install && rugby for working with cache or just pod install for working with sources. It's without changes in git.

Rugby was written using Swift and I regularly support this open source project.

Best regards

SwiftyFinch
  • 445
  • 2
  • 12
1

You can use CocoaPods Binary to pre-compile your Pods during pod install.

Ded77
  • 218
  • 2
  • 6