Question

I built a Login application in which I have 3 Windows

  1. Log In Windows
  2. Registration Windows
  3. After Log in details window about the user

In this application, the database stores data about user. The app is intended to be multi-platform & run on iPhone or Android.

When I install in device than it take 12MB or more Size (application size 12MB or more size).

How can I compress it?

Was it helpful?

Solution

Here are several things you can try:

  1. Create a new Titanium project and deploy it to your device. This is likely the minimum size you can attain. Add this minimum size to the size of your Resources folder and the result should be around the same as 12mb. If so, there is little more you can do.

  2. Check your Resources folder and remove anything that you don't want included in your app, such as .psd files. The build folders you mentioned in your comments have little to do with the actual app size.

  3. Make sure you have not installed any modules. Check /Library/Application Support/Titanium/modules for any modules that shouldn't be there. I have 14 modules there by default, for example.

  4. If you are very desperate, you can attempt to hack in Xcode to remove classes that you aren't using. See the responses by the "professional" developer here http://developer.appcelerator.com/question/133971/why-are-the-size-of-titanium-showcase-apps-so-small#answer-233668 This won't be easy and should only be attempted as a last resort.

In general however, there is no need to try too hard to reduce the file size. From my experience, even after adding a lot more windows and functionality, the file size barely increases by a couple of MB.

Also, note that your release file size can be smaller than the app you are testing on your device. See http://developer.appcelerator.com/question/126632/android-apk-filesize

OTHER TIPS

From my experience with Android, if you are running the application on the device, vs. deploying the application, the app size is much larger. Try deploying and installing on device that way to see if it is any different. But Titanium already compresses the application.

Here are few questions which might become answer.

  1. Are you using Mac for both Android and iPhone deployment. If so, the Android App would be of larger size compared to the same App deployed from Windows.

  2. You might have splash screen, now go and check your folder here that you have any other JPEG files apart from the spash screen and ico file

    \build\android\res\drawable

  3. Which version of Titanium SDK are you using for building the Application? Try to compile the same Application using Titanium SDK 1.7.5, if you are using 1.8.1 and above.

Note: If you are trying to compile your App in Titanium SDK 1.7.5 for Mac, make sure you have XCode 4.2.1 for Lion and Not XCode 4.3.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top