compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

Reduce ios app size.

Open begali opened this issue 1 year ago • 2 comments

I created KMP + compose multiplatform (android and ios) using this site and run for ios simulator from android studio. The app size for ios simulator are: debug version 40.5mb and release version 50.8mb. By the way I selected debug and release versions from android studio by editing device configurations and din't add any libraries. If I create KMP project without CM, then app size for ios is 1.7mb. How can we reduce app size for compose multipatform. What is the skia/skiko library size bundled with ios framework?

begali avatar May 23 '24 06:05 begali

face same probleam! my release ios app is 13mb+

hellomr3 avatar May 23 '24 09:05 hellomr3

There's an optimized property that reduces the app size. I don't know exactly what it does though and I've never found any documentation for it. I'm not sure if it's safe to use.

kotlin {
    iosArm64 {
        binaries{
            framework { 
                optimized = true
            }
        }
    }
}

or

kotlin {
    cocoapods {
        framework {
            optimized = true
        }
    }
}

brewin avatar May 23 '24 16:05 brewin

Release builds are already optimized so no need for that option

Thomas-Vos avatar May 25 '24 20:05 Thomas-Vos

iOS apps being about 10x as large as Android apps is quite normal. Just take a look at other (popular) iOS apps on the App Store. Personally I do not see current app sizes as an issue at all.

Thomas-Vos avatar May 25 '24 20:05 Thomas-Vos

It seems as a duplicate of #3632

MatkovIvan avatar May 27 '24 10:05 MatkovIvan

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

okushnikov avatar Aug 26 '24 13:08 okushnikov