https://kotlinlang.org logo
p

Prateek Grover

08/09/2020, 1:48 AM
Kotlin Native Framework Size problem I am creating a Kotlin Native framework for iOS without using cocoapods plugin. Here is the minimal code to show the problem. https://github.com/kerry/kn-library The problem is that it creates a framework of 17MB size on disk. Can someone explain if this is normal?
a

Anders

08/09/2020, 12:48 PM
You are inspecting the framework built for debug, which includes embedded debugging symbols and information that suck up a lot of the space.
p

Prateek Grover

08/09/2020, 12:48 PM
whats the expected size of “Release” framework?
a

Anders

08/09/2020, 12:49 PM
57 MB for debug and 4 MB for release in my project
p

Prateek Grover

08/09/2020, 12:50 PM
Let me check…and that 4mb also gets shrinked when creating archive, right? Whats the final increase in download size you get?
a

Anders

08/09/2020, 12:52 PM
I don't have measurements on that. But it is more or less as bulky as some large Swift dependencies like ReactiveCocoa or RxSwift
p

Prateek Grover

08/09/2020, 12:53 PM
got it. thanks
a

Anders

08/09/2020, 12:53 PM
Also I think K/N by default generates bitcode
So that inflates the archive size a bit too
8 Views