nccros.blogg.se

Bundle files together uncompressed
Bundle files together uncompressed










bundle files together uncompressed
  1. BUNDLE FILES TOGETHER UNCOMPRESSED HOW TO
  2. BUNDLE FILES TOGETHER UNCOMPRESSED PDF
  3. BUNDLE FILES TOGETHER UNCOMPRESSED CODE

I tried to be smart and transformed a PNG of a photo in JPG… but Xcode generated a PNG anyway, and the app gained 2 MB, so I reversed that 😬.

BUNDLE FILES TOGETHER UNCOMPRESSED PDF

  • I transformed some files from PNG to PDF.
  • I used iOS Image Extractor and DaisyDisk to inspect the Assets.car file and found some more things that could be improved: App size: 21,2 MB compressed, 32,2 MB uncompressedįrom 71,8 MB down to 21,2 MB 🤯 for the iPhone 14 Pro. The resultĪfter several hours of reprocessing the images, I was anxious to see the result. I knew what I had to do, even though I really didn't want to do it because it would be a painstaking job. As you can see below, on the left side, the PDF with a base size set at 80pt x 60pt, and on the right at 800pt x 600pt. That's what convinced me that I was not dreaming.

    BUNDLE FILES TOGETHER UNCOMPRESSED CODE

    I commented out the code that resizes the images.an export: I archived my build, exported with app thinning, and opened the Assets.car to look for my file.there might be some caching involved and somehow the build was still using the old asset.it would be slow to render (tested on an iPhone 6s, scaling wasn't noticeable).And since it's a vector file, I can display a cow that fits the whole screen, and the quality will be the same. That's 1.5 MB less with just one file 🤯. I was curious and gave it another shot at 80pt x 60pt App size: 70,3 MB compressed, 80,8 MB uncompressed App size: 70,9 MB compressed, 81,5 MB uncompressed I went back to my file and resized the Artboard to 400pt x 300pt instead of 800pt x 600pt. Unfortunately, just like with Assets.car, the bundle is duplicated in all targets that need it as this image of my notification extension shows. I then tried another approach that was suggested to me: I created a "CowsKit" Swift Package with just that asset. The version generated by Xcode alone weighted 3.9 MB 🤯. App size: 78,1 MB compressed, 88,9 MB uncompressed Since Xcode 12 added support for SVG files, I thought I'd give it a try.

    bundle files together uncompressed

    That's a LOT more pixels that the app needs.

    bundle files together uncompressed

    This is unnecessarily huge, especially since the will now have a resolution of 2400px x 1800px. That's because in my Affinity Designer file, the Artboard size is set to 800圆00 points, and this means that Xcode will generate the with a size of 800px x 600px. It has lots of details, which is certainly why it was difficult to compress it. This is why some people stopped using PDFs.īy inspecting the Assets.car file I could see that the heaviest images belonged to this cow: Thanks to my friend Axel I learned to open the Assets.car files using iOS Images Extractor.Īll my cows are Universal PDFs, but Xcode generates 3 PNG out of them. Thus, any file weighs 3 times more for the iPhone app than the file alone. The Assets are shared between the app, widget, and notification, but the Assets.car file is duplicated for each of them. I added lots of cows since then, and also two extensions (Widget and Notifications), but it didn't feel right. That's a lot for an app that was around 8 MB when I first shipped it (if I remember well…). The latest results were this on an iPhone 14 Pro: App size: 71,8 MB compressed, 82,4 MB uncompressed

    BUNDLE FILES TOGETHER UNCOMPRESSED HOW TO

    Last summer I noticed that my app had gained weight, but I wasn't sure what caused it and how to investigate.Īfter playing with Single Size icons, I became familiar with the process of exploring the app size and so I decided to dig further.












    Bundle files together uncompressed