Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/mobile: the size of simple iOS framework is quite large (question/optimization) #15223
gomobile is great, and we've done some cool things with it so far.
We build a single aar and framework from our code, but I have a question. Is it possible to send in some optimizations (perhaps to remove unused symbols)? The size (particularly of the framework), more than doubles our app size. The compiled size of the framework is about 32Mb. Being that this cannot be statically linked in to the ios app and is sent as a deployed framework, there is no last mile optimization linking to shrink the total app package down.
Is there a recommended way to reduce the size? Thanks!
So after further investigation, it's not really a problem. I can just link against the static artifact and not be forced to embed the framework. Ideally, it wouldn't have inaccessible symbols, but this is certainly workable as-is. Thanks!
When I link against the library, clang optimizes out the unused symbols, so it ends up adding about 8Mb to the app.