During WWDC 2016 session 406 - Optimizing App Startup Time frameworks came across and can have a big influence in the application launch performance. (discussed at 28 minutes during the session)
In the example they've showed how merging your frameworks (A, B, C, D, E, F etc.) into just one or two frameworks (ABC, DEF) could improve launch time drastically.
Is there any possible way around to manage doing this with CocoaPods?
I believe someone has already built a plugin to do that, but I don't think its something we want to support out of the box as it can cause many hard to debug issues
I don't think there's a plugin available, it would probably make a good one for those who want more power. 馃憤 The current plugin API as of 0.39 should be enough with the pre-install hooks.
An alternative to this, which I think would have rather significant usability issues from a developer's perspective (unless there's a way for a single framework to export multiple modules, so the combined frameworks still look independent), is to enable building Objective-C libraries as static libs, removing their startup cost. I think there would still be a cost for the Objective-C class initialization, but that price is paid either way.
Given I'd like to implement something like this, whats a good start for digging around?
This issue: https://github.com/artsy/eigen/issues/586 contains reference implementations and technical details about how pieces can come together.
Here is someone's POC that tries to do that https://github.com/johnno1962/Accelerator
(I have not verified this solution yet)
I'm currently building a plugin that does that: https://github.com/Ruenzuo/cocoapods-amimono
Does anybody know if using Swift package manager solves this issue?
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:
any news?
Zero news. You have to do this manually or extend cocoapods via a plugin to accomplish this.
Given Xcode now supports static Swift libraries, once that functionality lands in CocoaPods it seems like this idea would be entirely unnecessary.
CocoaPods 1.4 has been released. Does it now improves the launch time?
Cocoapods 1.5 has been released with support for swift static libraries.
But this still is an issue for Framework developers (namely written in swift). Namely, I'm trying to include a dependency into my own framework so that it's packaged into a single unit. I tried cocoapods-packager, the cocoapods-static-swift-framework plugin, and couldn't succeed with either. Upon trying to use the build framework, having the error Missing required module '<dependency>'
.
I recently worked on a plugin that tries to do merge cocoapods, using a MergeFile. Give it a go: https://github.com/grab/cocoapods-pod-merge
Most helpful comment
I'm currently building a plugin that does that: https://github.com/Ruenzuo/cocoapods-amimono