CocoaPods offers a helpful guide to avoid repeatedly building dependencies. It explains how to use the cocoapods-binary extension during pod install execution. This extension links prebuilt xcframework or static library binaries to your project instead of actual source codes for each dependency.
Furthermore, it provides granularity, allowing you to specify which dependencies you want to link as binaries and which you still want to keep as source code.
- Add
plugin 'cocoapods-binary'
to the top of yourPodfile
. - Add
:binary => true
to those dependencies you want to link as a prebuilt binary. - Run
pod install
again.