I have a huge Xcode project, using CocoaPods with more than 150 dependencies. The indexing time and building time without Xcode building cache is a nightmare, Xcode is less responsive. All of these causes prevents us from effective development. So we are going to use Pre-compiling in our project.
What this CocoaPods plugin mainly does are:
- download source code to
Pods/_prebuild/xxxfolder - Build static frameworks in a temperate folder
Pods/buildfolder - Generate static frameworks and finally store them in
Pods/_prebuild/generatedFrameworksfolder - After building completed, delete the source code in the
Pods/_prebuild/xxx, and generate thexxxfolder in thePodsfolder, which contains a symbolic link to thestatic frameworkinPods/_prebuild/generatedFrameworksfolder. Besides, you can preserve the source code in thePods/_prebuild/folder, if you usekeep_source_code_for_prebuilt_frameworksin thePodfile.
But, once the dependencies are converted into binary files. It is very difficult for developers to debug when development.
A naive solution is to use
pod "ExpectoPatronum", :binary => true | falseand dopod installagain.cocoapods-binaryprovides this optional to determine if this pod should be source code or should be converted into binary.It seems this plugin is from a Chinese unicorn, Mei Tuan. And, instead of using the solution 1 to switch between source code and binary, they use a more tricky way to convert the binary into source code.
Currently, I am trying to find more solutions to switch between source code and binary when using pre-compiling in CocoaPods . Would you like to shed some light on it? Thank you.