I want to know, is it possible to build Pods only once? Because building them each time without any changes takes too much time.
Is there any solution for building Pods only once and reducing build time with it?
You could try precompiling Pods with https://github.com/leavez/cocoapods-binary as described here https://guides.cocoapods.org/plugins/pre-compiling-dependencies.html
You append binary => true in your podfile to the pods you want to precompile, which switches them to compile frameworks.
plugin 'cocoapods-binary'
use_frameworks!
target "HP" do
pod "ExpectoPatronum", :binary => true
end
But I find XCode does a pretty good job of caching what's needed.
Xcode should be caching some build information in derived data after the first build. However, other than that, there's not much to be done. I would suggest a faster computer or less dependencies :)
If this is a real pain in the neck and you don't mind getting rid of cocoa pods, you can alway import the compiled frameworks manually. That would pretty much get rid of any build lag from your pods, but you'd also have a hard time keeping the pods up to date.