Are there any apps to see what makes an iPhone app size large? - ios

My iPhone app has recently got a little larger than I'd like (nearing 100MB) and I'm not entirely sure what the cause of it is.
There are many apps for the Mac like DaisyDisk that let you see the make up of your Mac's storage, but is there something where I can see what's taking up so much space in, say, a .ipa file?

Bryan's answer is the way to go. Unzip your IPA (Rename it from .ipa to .zip), find the .app file in the unzipped folder, option click the .app file and view contents, press command J and check "calculate all file sizes", and then sort the results by file size. More than likely you have big media files in your app.
If you try this with iMovie, for example, you'll find the the largest folder in the app is called "Assets", and it's 261 MB.

Related

NSUserDefualts data is duplicated many times in the Preferences folder

We are storing a xml config file which contains several key-value pairs in UserDefualts. The size of the .plist after the data is stored into the USerDefualts file is in between 5-50MB based on the user config file.
Recently in one of our beta devices, we found that the app Preferences folder is of size 5GB which is 500 times more than the app size.
I downloaded the app .xcappdata for the beta device and found that the folder
AppData/Library/Preferences is 4.98GB
We have no idea why that folder is huge.
Inside that folder there are 800 of files with name in the format
(bundle-identifer).plist.1ESwPpG
1ESwPpG is the random string at the end of files.
And the size of each file shows 0 bytes.
There are two more additional files in this folder.
One is the app .plist (35MB) file and other one is com.apple.EmojiCache.plist (4KB).
Why the folder is over 4.5GB ?
I can delete the app and reinstall it which would solve the problem, it would be useful for us to know the cause of the issue.
I couldn't find much from https://forums.developer.apple.com/thread/69830.
and iOS app's Documents and Data becomes huge
Note: This app on the beta device hasn't been removed from the last 2-3 months. The app in the device is upgraded with every beta build.
Note: Deleting these files does reduce the folder size, but the file is showing 0 bytes when looked at file inspector window. Also the file shows nothing when opened by any text editor.
I see that the userdefault data .plist which is 35MB of size is duplicated many times which increase the folder size.
I'm wondering when exactly this happens.

Why is our app size increasing drastically with little change of function?

We have an app currently in the App Store, and its size is as follows according to iTunes connect:
iPhone 6: Download size 21.8MB, install size 28.5MB
Now this is not too bad. But with a newer version we have uploaded to iTunes connect, the sizes are like this:
iPhone 6: Download size 35.5MB, install size 73.1MB
And the original package compressed size is 114MB.
Now this is too large, even unacceptable. I have checked the .app file within the archive(which is 178MB), and surprisingly discovered that my code alone takes 55MB(which in debug mode is only 11MB), and swift standard libraries around 40MB.
The function of code of this version does not differ much with the previous: we added iPad support, added a few images(the asset is 7.8MB on both debug and release archive, which is not a problem), and updated our project to swift 3.
All the release sizes above are with whole module optimization turned on. Might there ba a configuration in my build settings that may leads to this huge size? If not, what else could I do to reduce the app's size as much as possible?(especially the 50MB codes)
Besides, WHAT is the cause of this? Is it swift 3 since we didn't change our code much?
We also face such kind of issue in our previous app. At that time we make below steps to check which part of application is taking more space.
1) Copy Final IPA file which was generated by Archive.
2) Rename "application.ipa" to "application.zip"
3) Unzip application.zip file.
4) Open unzip folder and find "application.app" file in "Payload" folder.
5) Right click on "application.app" file and select "Show Package Contents".
6) After click on that you will see the list of all the files added in your final application bundle.
From that file listing you can see which file is taking lager space and act accordingly.
Assets.car : it's for image assets added in your application.
Frameworks : all frameworks list which are added by you in your code.
file_name.nib : This file is for your xibs added in your project.
file_name.storyboardc : This file is for your Storyborad added in
your project.
Apart from that their will list of font, images, videos, bundles,
etc. files.
From these step you can get an idea that is the cause of build size.

Size of Xcode Project .ipa is WAY too big (1.6 GB)

I recently finished an app on Xcode and compressed it to a .zip file (or .ipa as I changed the ending later). However, I was shocked to see that the size of the .zip was 1.62 GB, which is incredibly large for an iOS app, and way too large to be accepted by iTunes Connect.
After looking over similar questions on Stack Overflow, I proceeded to remove all resources in my project to see if they were the cause of the problem. I took out any .PNG or .JPG image file, and also removed any .MP3 audio file. However, after compressing my app it was still at an absurd number - 1.56 GB!
I don't know what to do now, as I really need to submit this app but it is still way too big. I would appreciate any help on this issue. Thanks!
Edit: I had to create a completely new project in order to fix this issue, as I couldn't find what was making the size so big in the original project. I copied and pasted the storyboard, added all the image and audio files, and re-created the classes by copying and pasting the code.

app on ipad double archive size

Hi guys I have a media heavy app for the iPad and my archive is ~370mb. For what I'm doing, that isn't unreasonable. If i view the xcarchive in finder it is ~391MB, the .ipa is ~388mb, which roughly corresponds to the size of all my assets uncompressed.
So I double-checked the actual usage on my test device and it is 755 megs! This is similar to the "estimated app store" size shown in organizer.
I checked usage on several other test devices and it is the same.
I read the other posts about the organizer estimate tending to be inaccurate, but does that translate to the usage indication on the iPad itself? Shouldn't the iPad just report how much actual space is being used?
370 mb (double) of extra usage can't be anything to do with the executable not compressing, and this shouldn't be a result of PNGs being somehow expanded, I use a ton of jpegs because they are so much smaller.
And the whole compressed/uncompressed discussion feels like a red herring because if I simply get info on the uncompressed assets folder in finder, it is ... 355 mb. So I can't understand how compressing and then uncompressing a bunch of images would double their size.
My only theories are:
- The usage on the development iPad is for some reason no indication of final app size
All my jpegs are somehow being converted to PNGs inside the ipad itself ... ??? really how is that possible??
I have two video files, they could somehow be automatically converted to another format .. ??again, really?? that sounds impossible
the app has in-app purchase capability, it could be somehow allocating disk space in anticipation of future purchases?
I hate all of those theories because none of them make sense. Any of you ever run in to this before?
So write some code in your app that after launch uses nsfilemanager to walk your complete app on the device (or simulator)and tally the totals and log it. This way you will know exactly. Also recall that the file system uses discrete disk blocks of fixed size so 1 byte files actually consume more, but this is probably not your problem.
Also zipping media rarely results in space savings.
This is similar to the "estimated app store" size shown in organizer.
You can check out why by examining the contents of your archive:
Open Organizer, select Archives, select your app, right click on your archive, Show in Finder, right click on the file, Show Package Contents, open Products, open Applications, right click on your app bundle, Show Package Contents.
Also, Xcode might combine retina and non-retina images into a single multipage TIFF file. Check out this answer for more details.

Issue with the size of the .cod file

I need to add more png images to my app. When the size of the .cod file crosses 5mb it throws a runtime exception, and I cannot figure why, even with a debugger. If I remove some images I can run the app. I am using BlackBerry OS 4.7 with the storm. Later OS versions also have the same issue.
Hi Arhimed thanks for your
suggestion.How to do lazy resource
loading? When I am taking all the
images before main method I move the
images to SDCard.But it is throwing
same runtimeexception and I cannot
compile it.
Under the "lazy resource loading" I mean you could host your images somewhere in the internet. So on the first app start, being under a splash screen, you would download them to SDCard (or to Device Memory if Device Memory is big enough - it is fully up to you where to store the images). On a slow connection it could take minutes, so you definitely need to inform users about what is going on, so they don't think the app has hung.
Yes, Use OTA in Following command on Application folder.
cd application dir.....
ren appName.cod *.zip // this will divided one cod file to multiple part it.
and now you can extract this zip file on specific folder and also add it's .jad file

Resources