Delphi and iOS File Size

I created a small application in Delphi XE4 for iOS. I have 7 forms on it. And everything's good.

But I'm a little shocked by the file size! Its 44 MB on the simulator. The same application I made for Android was almost 2 MB. It has a background image that is 320kb in jpg format. I have not tested it on an iPhone yet!

What is a normal size application if you create on Xcode with ListBox, texts, buttons in forms?

Is there a way to reduce the file size by changing any settings in Delphi?

+6
source share
3 answers

A sound of about 15 MB is the smallest executable size with Delphi for iOS (in Release mode without debugging information). You can try disabling RTTI generation if you do not need it. But not with much hope.

It is much larger than ObjectiveC "native", but it inserts all the Delphi RTL and FireMonkey libraries to complete the entire rendering, so it is larger.

A " plain Objective Pascal " executable file using iOS built-in controls compiled with FPC should be smaller. Or when compiled with Oxygene for Cocoa ", it should be much smaller.

But do not look only at the size of the executable file, think about the memory used at runtime and the overall speed. You may need to compare it with the HTML5 apps built into PhoneGap. FireMonkey may be slower when rendering on the screen, but inline code with ARC memory processing should be more powerful than JavaScript.

Do not forget that your smartphone has a lot of memory now .;)

Unfortunately, it is not possible to share some code with external libraries (.so) in iOS, so you cannot use something like Delphi packages to reduce the size of the executable.

Of course, Apple has always done everything possible to get developers to use their own tools and language. Like Microsoft, especially for Windows 8. Delphi for iOS does not claim to be better than XCode + Objective-C, but should be cross-platform so that you can share as much code as possible with your server or Windows / Mac OSX applications: you cannot use your Objective-C code outside the Mac world ... but you can share your Delphi code between platforms, even if the user interface needs to be rewritten for mobile phones. That's why a fairer comparison would be with JavaScript / PhoneGap, MonoDroid / MonoTouch or AppCelerator .

Some data retrieved from StackOverflow:

One problem: AFAIK - the size limit for downloading 3G in the AppStore is about 20 MB.

+17
source

To add to Arno's answer:

You can use your own controls instead of Firemonkey.
Babak Yagoboi wrote a library to allow Delphi to use its own OS controls.

See here for iOS: http://sourceforge.net/projects/dpfdelphiios/files/?source=navbar
And here for Android: http://sourceforge.net/projects/dpfdelphiandroid/

Firemonkey displays using 100% Delphi code, built-in controls use the internal code in your phone ROM.

0
source

We have an iOS application with 6 forms and many controls. The release of ipa-watches is a little over 11 mb and includes all the necessary application icons (a total of 28 units of measure a little over 1 mb).

In my opinion, this is not so important, so I do not see a problem here.

0
source

Source: https://habr.com/ru/post/949844/


All Articles