1

I wrote app in Qt 5.5 for ios. Executable has 78,6MB. I read that Apple App Store has limitations for apps: 4GB - executable + resources and 60MB for executable. My resources (images, fonts etc.) are embed into executable

myprofile.pro:

RESOURCES += qml.qrc \
    images.qrc \
    fonts.qrc \
    sounds.qrc \
    translations.qrc

Example access to image:

Image {
    width: screenWidth
    height: screenHeight
    source: "qrc:/res/images/bgd.png"
    fillMode: Image.PreserveAspectCrop
}

How to exclude resource from executable and how to access them?

marekk
  • 41
  • 4
  • You can always create a path in your project where you keep all resources and during the build phase you can copy them in the same directory as your executable. You would have to exclude qrc files from your project when doing so, because during build phase it automatically packages resources pointed by them into your executable. You will have to create a new build configuration for iOS in which you execute these tasks - http://www.qtcentre.org/threads/45047-Multiple-build-configurations-with-qmake – Catalin Sep 08 '15 at 07:23
  • All applications (might be in a corner somewhere an exception) on iOS keep their image files in the same directory. This may look messy, but on iOS you cannot directly access the files anyway. (Jailbreak only) – Blacktempel Sep 08 '15 at 08:43

1 Answers1

1

What you need is to exclude images and other resources from executable and create external resource file

http://doc.qt.io/qt-5/resources.html

You may look at this question:

How can I embed a Qt resource into a .dll file?

It describes exactly the same what you need but for HTML files, this doesn't matter actually.

Community
  • 1
  • 1
demonplus
  • 5,613
  • 12
  • 49
  • 68