News for hackers. Stuff that matters.
Re:Xcode 14 unintentionally increases app size by stock_toaster on Thursday November 10, 2022 @09:13PM (#33556525)
Launch images (png) for every supported screen size? Sound/media files? Libraries? I’m sure it starts to add up.
Re:Xcode 14 unintentionally increases app size by outcoldman on Thursday November 10, 2022 @09:30PM (#33556645)
I used to have an app built for some AWS services (mac, ios). First decision to use some AWS libraries added size to the binary, it grew from 1MB to 70MB, I wrote simple AWS library myself just for my needs and that resulted in the binary of 2-3MB.

Most of those apps use a lot of common libraries that add a lot of size to the binaries.

Re:Xcode 14 unintentionally increases app size by version_five on Thursday November 10, 2022 @09:52PM (#33556783)
I'm working on a machine learning project where we're trying to package something up, and bringing in all the packages that get installed by default with the framework we're using adds gigabytes to the size of the application, almost all of which is probably not necessary. The challenge is it's bloat on top of bloat, without an obvious way to pare it down, so it becomes a separate engineering effort to try and make something small and efficient. Under a certain size and for many applications, it's more cost effective just not to worry about it and keep the bloat
Re:Xcode 14 unintentionally increases app size by kelseyfrog on Thursday November 10, 2022 @10:14PM (#33556908)
I found myself in the same situation a few years ago. We hacked together a dubious version of treeshaking using 'python -v' and got the thing small enough to run on an aws lambda which saved a bunch of money. Fun times.
Re:Xcode 14 unintentionally increases app size by csande17 on Thursday November 10, 2022 @09:29PM (#33556634)
Haven't launch screens used resizable Storyboard layouts for several years now?
Re:Xcode 14 unintentionally increases app size by drEv0 on Friday November 11, 2022 @01:27AM (#33557887)
They have. I believe Xcode even warns if a project is not using the resizable option.
Re:Xcode 14 unintentionally increases app size by causi on Friday November 11, 2022 @12:44AM (#33557674)
Launch images (png)

I'm flatly amazed that sort of thing isn't some kind of bitmap/vector hybrid format. Like a high resolution central logo and then rules for defining the background, like "blue fading to white at the edges".

Re:Xcode 14 unintentionally increases app size by interpol_p on Friday November 11, 2022 @01:00AM (#33557758)
iOS has not required launch images for every size for some time now (since iOS 8 in 2014). It requires instead a piece of UI called a launch storyboard [1], which scales using the standard UI layout system to the different sizes

However custom images can still be set for every possible size, if you really want

[1] https://developer.apple.com/documentation/xcode/specifying-y...

Re:Xcode 14 unintentionally increases app size by Lukas_Skywalker on Friday November 11, 2022 @04:28AM (#33558692)
Android has an interesting solution to this called 9-patch-files [1]. They basically add a 1px-margin around the image. By coloring the margin in different colors, you tell the OS what areas to stretch and what should be kept as-is based on the screen size.

[1] https://developer.android.com/studio/write/draw9patch

Re:Xcode 14 unintentionally increases app size by hulitu on Friday November 11, 2022 @01:09AM (#33557797)
> Launch images (png)

PNG files (if not generated from a jpg) are quiet small.

Re:Xcode 14 unintentionally increases app size by dagmx on Friday November 11, 2022 @01:17AM (#33557840)
They're not. You're likely thinking of indexed color PNGs, but full color depth PNGs are quite large. A JPG/HEIC/AVIF image will be significantly smaller.

The source of the PNG doesn't matter.