Subito-it / PodBuilder

A tool to precompile CocoaPods pods
Other
284 stars 28 forks source link

[Question] What are the differences between this and cocoapods-binary? #9

Closed rogerluan closed 4 years ago

rogerluan commented 4 years ago

Hey, this is a nice initiative. But in the README there's no word comparing this against other similar alternatives such as https://github.com/leavez/cocoapods-binary so I'm wondering if there're benefits. I currently use cocoapods-binary and it's quite helpful.

Appreciate your time!

tcamin commented 4 years ago

Though question because I never used cocoabinary before 😅. From what I can see from the commit history both project began more or less at the same time and approached the prebuilding from slightly different perspectives. CocoaBinary is completely integrated in the CocoaPods flow while PodBuilder is on a separate tool that proxies CocoaPods. At first It is definitely more difficult to do the switch however, from what I can see in the docs, it is much flexible as is allows a fine grain customization allowing to do things like podspec value overriding, custom build settings per pod and some advance things like pre build ed frameworks debug.

If you’ve been using CocoaBinary it would be nice if you could give PodBuilder a try (make sure to use latest beta!) and report back the pros/cons of both solutions.

rogerluan commented 4 years ago

I like that it is completely customizable using a json file, although I don't think I'm willing to spend too much time testing this, cuz cocoapods-binary took us a long time to get right in our project (our project has too many dependencies, some of them can't be precompiled). Also the community around cocoapods-binary is much larger, so if both solutions are equivalent in terms of speed, I'd choose cocoapods-binary 😅

Nonetheless, this is a great project to be studied! I like the different approaches to solve the same problem, and I feel like a configuration file is a way more intuitive way to manipulate such critical settings without modifying the main Podfile.

Thanks for taking time to write back!

dcristolovean commented 4 years ago

For me,there's a significant difference between this and cocoapods-binary... This one WORKS :) I never could get cocoapods-binary to work, seems it's abandoned anyway, but I managed to make this one work. (Not for Firebase thou, there's a hell of complications with that one).

rogerluan commented 4 years ago

Well we were able to use cocoapods-binary in our project (we use nearly 40 pods), including Firebase:

pod 'Firebase/Core', :binary => true
pod 'Firebase/Crashlytics', :binary => true
pod 'Firebase/RemoteConfig', :binary => true

🤷‍♂️

dcristolovean commented 4 years ago

Then you've been lucky, I never could get it to work. And the fact that it seems completely abandoned as a project, made me search for something else.
I also have a rather complex project with many Pods and many targets and cocoapodsbinary made a complete mess of it.

rogerluan commented 4 years ago

Yea I must admit we had trouble setting it up, but once we figured it out, it worked well.

It's always interesting to see 2 initiatives solving the same problem in different ways, without knowing about each other 🙌

I'm interested in knowing more though. @dcristolovean do you know if you can easily manipulate the binaries generated? Like, are they all contained in a specific directory I can easily access, or does it hidden somewhere in Xcode build folders/derived data?

dcristolovean commented 4 years ago

The binaries reside in a /Frameworks/Rome folder. I can commit them to git, then checkout the entire project in Bitrise for automatic builds. I still have some Pods that can't be pre-compiled, so I also commit those and Bitrise compiles them everytime.

I had a total build time of 40-60 mins in Bitrise per target (huge !) and manage to get it down to a reliable 35 (+/-). Firebase would've gotten it down even more, but I wasted to much time trying to make it work without luck.... I estimate with all my Pods precompiled I could've gone down to less than 25 mins per target, but 35 is still good.

rogerluan commented 4 years ago

That's awesome! Our project takes like 55-65mins to build, but CI is rebuilding the pods every time because I couldn't figure out a way to reuse the cache reliably (while reducing the time - when I do that, the time of the binary builds decrease ofc, but the regular app build doubles the time, idk why lol 🤷‍♀️ )

I might give this lib a try 🙏 it's just so painful to migrate these things from a lib to the other 😓

dcristolovean commented 4 years ago

It shouldn't be hard, I mean podbuilder just creates a /Frameworks where it puts stuff. If you want to get rid of it... just delete it and run pod install. (the Original Podfile that you need to put back is in this Frameworks folder too, so just put it back in the root folder and that's it). Also the developer answers fairly quick and seems to be maintaining this project for now :)

tcamin commented 4 years ago

I might give this lib a try 🙏 it's just so painful to migrate these things from a lib to the other 😓

If you do make sure to use the beta version.

It shouldn't be hard, I mean podbuilder just creates a /Frameworks where it puts stuff. If you want to get rid of it

This is exactly the way the tool was conceived. It should be trivial to get rid of it.

Firebase would've gotten it down even more, but I wasted to much time trying to make it work without luck

We still weren't able to figure out what was going on with Firebase with @dcristolovean. We use it successfully with no major issue.

rogerluan commented 4 years ago

If you do make sure to use the beta version.

beta version of this lib, or cocoapods? I don't see "betas" in https://github.com/Subito-it/PodBuilder/releases, do you mean 1.9.3 (latest release)?

dcristolovean commented 4 years ago

use "-pre" when installing pod builder

rogerluan commented 4 years ago

Will do, thanks!