Contains the terminal .app unzip infoI built the iOS app. Total Xcode project size is under 100 MB only. After I built the app, I got the .app build size is nearly 300 MB. Why happen like that. It's also taking a long time (nearly 30 minutes) for build. How can I reduce the size of .app file and how can I make fast compile the application.
Asked
Active
Viewed 642 times
2
-
We need more information. Do you use build scripts? Fat Libs? ...? – shallowThought Apr 04 '17 at 08:58
-
Build script means. I used cocoa pods in application which are also have small sized library. – KAREEM MAHAMMED Apr 04 '17 at 09:07
-
Target->Build Script – shallowThought Apr 04 '17 at 09:11
-
I already some issues of similar types But they are saying that it is happening only in `x-code 8.3`. So which x-code you are using.? – dahiya_boy Apr 04 '17 at 09:17
-
Im using Xcode 8.2.1 @agent_stack, Did you found any solution? – KAREEM MAHAMMED Apr 04 '17 at 09:19
-
@shallowThought, I didnt fine Build Script under Target section. – KAREEM MAHAMMED Apr 04 '17 at 09:22
-
@KAREEMMAHAMMED Try with different System after cleaning the derived data otherwise you have to report to Apple thats all I can say. – dahiya_boy Apr 04 '17 at 09:24
-
Sorry. Its: Target-> Build Phases -> Build Script Phase (exists only if you or pods or someone added it). – shallowThought Apr 04 '17 at 09:30
-
@KAREEMMAHAMMED Can you check your ipa structure and check what is taking so much space? Just rename `app.ipa` to `app.zip` and uncompress it and see the content of folder and package. Also if it's in swift then dylibs can take some of the space. – Inder Kumar Rathore Apr 04 '17 at 09:40
-
@KAREEMMAHAMMED you can read my post similar to this here : http://stackoverflow.com/q/41907323/468724 – Inder Kumar Rathore Apr 04 '17 at 09:42
-
@KAREEMMAHAMMED In your terminal your can run `unzip -lv app.ipa` command to see the content and it's size. Then post the output in your question so that we've more idea about your problem – Inder Kumar Rathore Apr 04 '17 at 09:43
-
@InderKumarRathore i had done the unzip in terminal. Its a big list come. – KAREEM MAHAMMED Apr 04 '17 at 10:27
-
@KAREEMMAHAMMED please put that in a txt file and give it's dropbox/drive link in your question – Inder Kumar Rathore Apr 04 '17 at 10:31
-
@KAREEMMAHAMMED how are you calculating the size of your project? I mean can you show us your directory structure and its size? – Inder Kumar Rathore Apr 04 '17 at 11:08
-
@InderKumarRathore, Yes folder directory structure only. – KAREEM MAHAMMED Apr 04 '17 at 11:16
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/139841/discussion-between-inder-kumar-rathore-and-kareem-mahammed). – Inder Kumar Rathore Apr 04 '17 at 11:23
2 Answers
2
Your binary HealthNotes
is of 155.11 MB which is obviously your code. I couldn't find any suspicious in the app. May be you can find which files are not required by your project. As far as I can see that your ipa size is 107900607
or 102.9MB
see the last lines of your txt file. The 381102989
or 363.44MB
is your uncompressed size.
708 Defl:N 713 -1% 04-03-2017 18:49 e15402ec HealthNotes.app/Yes_UnCheck.png
1469 Defl:N 1472 -0% 04-03-2017 18:49 f552f434 HealthNotes.app/Yes_UnCheck@2x.png
-------- ------- --- -------
381102989 107900607 72% 1345 files
I can see below files file which are large. Do check them if they are required.
162649824 Defl:N 36082060 78% HealthNotes.app/HealthNotes
1230558 Defl:N 1074344 13% HealthNotes.app/Cross_Cover.pdf
9538912 Defl:N 2249073 76% HealthNotes.app/Frameworks/Charts.framework/Charts
3377536 Defl:N 1127251 67% HealthNotes.app/Frameworks/CorePlot.framework/CorePlot
2775376 Defl:N 727248 74% HealthNotes.app/Frameworks/CVCalendar.framework/CVCalendar
61679504 Defl:N 16278564 74% HealthNotes.app/Frameworks/FHIR.framework/FHIR
14698896 Defl:N 3921664 73% HealthNotes.app/Frameworks/libswiftCore.dylib
2983440 Defl:N 396294 87% HealthNotes.app/Frameworks/libswiftSwiftOnoneSupport.dylib
64744880 Defl:N 17168102 74% HealthNotes.app/Frameworks/SMART.framework/SMART
20873216 Defl:N 7869148 62% HealthNotes.app/mobilecharts.sqlite
Tips for Reducing app size
- Use TinyPng to compress your images
- Use image.xcasset so that app store can provide device based assets. Which will reduce the download size of the app.
- Remove unnecessary images/fonts/html/pdf/sqlite/etc from your project.

Inder Kumar Rathore
- 39,458
- 17
- 135
- 184
0
The app has lot of files which made the ipa large.
- Reduce Images usage
- Change jpeg to png
- Try decreasing png to small resolution
- Remove unused files
- Load images from web and cache it where possible

Vignesh S
- 39
- 4