Mobile application apk and IPA size is too large - titanium

I developed a titanium mobile application using appcelerator and its working fine. The problem is with the size of the apk and the IPA file. The application contains hardly 100 lines of code but the apk size is 6MB and IPA size is 4.5MB. When I Google about it I saw some suggestions of optimizing the code so I tried with that also now my code contains nearly 70 lines but still the size remains the same in both apk and IPA. And then I just ran a simple hello world application to do cross check then it was shocking that small hello world application also generated 5.4MB apk. How could this possible.
What is happening here with respect to size?

What you are seeing here, is a result of using Titanium. Titanium comes with a lot of extra code to make it work, including a JavaScript parser and more.
Once you build for deployment it will become smaller, but still be around 3-4 MB's (in my experience).
The plus side is, in your case, if you have 1000 lines of code, the size of the application will still be around the same size as this code is relatively nothing.
I noticed myself you can get the APK smaller, by unzipping it, and re-zipping it yourself. Apparently Titanium doesn't zip properly. As you might now, a .apk is in fact a .zip. So change extension, unpack, and repack yourself. That should make the APK smaller.

First of all, sorry I cannot comment at your post because my reputation level is still low. However a valuable tip to reduce the APK total size (only the APK) is to restrict the build's architecture of Android.
The Titanium SDK still building for all archs available, included armv5/armv6 that was very old devices, a short list can be checked at here. The trick is to restrict your build adding the <abi> at your tiapp.xml like this:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest></manifest>
<abi>armeabi-v7a</abi>
</android>
Edited
Keep attention, if you are using Genymotion emulator remember to remove the restriction before build, that was the emulator isn't armeabi-v7a

Related

React native init project is very large in size

Here is the versions I am using
The problem is the project I created using react-native init AddisMereja is of size 20MB.
It does not have anything.
I believe you are talking about the size of the apk file that is generated. If so you can try using app bundle and submit the app bundle to google play store which will handle it according to users device as the apk that is generated by default contains apps for different architectures but you will end up using only one of them.
This blog post by Krzysztof Magiera explains the process better.
Your app size is descries after make a release apk Or sign apk.

iOS - How Crashlytics handles missing dSYMSs

I have a question concerning dSYMS and how Crashlytics handles them.
My application contains different targets and the whole project is compiled with bitcode enabled because of the Watchkit App and Watchkit App Extension targets.
I then followed the Missing dSYMs Documentation in order to manually upload my missing dSYMs.
It worked, the Required missing dSYMs are now striped on my dashboard.
But I was wondering, how exactly does it work? This version of my application is on the AppStore for 1 month.
Will I get crash reports only from today, the date I uploaded my dSYMs ?
Should I manually upload for every releases?
I don't really understand the process.
Mike from Fabric here.
dSYMs contain the symbols for your app needed to provide fully symbolicated stack traces. When you build locally in Xcode, the dSYMs are on your local machine and so the Fabric run script build phase can upload them.
With Bitcode enabled, Apple is recompiling your app on their servers which creates new dSYMs. Since it's happening on their services, Fabric has no way to upload these automatically. Apple does provide the dSYMs through Xcode or iTunesConnect. Since we can't access those dSYMs (we would need your Apple developer credentials and we don't want to have them), you do need to get the dSYMs from Apple and upload them to Fabric for each release through Apple or Testflight. You can also use the upload-symbols script to upload them in bulk. The upload-symbols script will also work from CI machines.
When a crash comes into Fabric, we look if we have the dSYM needed to symbolicate the crash. If we don't, we will alert you via the dashboard and your Fabric app settings page. If a crash has a missing dSYM, we will store it for 7 days. If the missing dSYM is not uploaded in this time, then we will drop the crash and not process it. If the missing dSYM is uploaded, then the crash is enqueued to be processed and it can take between a few minutes to a few hours to process and display.
With that said, the best way to handle this is to use the upload-symbols script to get the symbols to us even if there isn't a reported missing dSYM yet, so that we have the symbols when a crash happens. If we have the dSYM when the crash is reported, the crash will be processed within a few seconds (on average).
An alternate approach is to use fastlane's refresh_dsyms command to get the dSYMs and upload them.

Converting Titanium apk to bar receive severe warnings

I've a Titanium application that works on Android. Now, I want to make the Blackberry version.
I've tried to create a bar file in Titanium, but I use a lot of Titanium properties that are only for Android and iOS. So, the app crash.
I know you can repackage an apk to bar using command line tools. I've used it and it works. It converts the apk to bar, and I able to load it in a device (Q5). My problem is when I use apk2bar command, I receive a lot of warnings with different levels (a lot of severe warnings).
Severe warnings is because Titanium use native access.
I don't understand why the result of the conversion is succeed with these warnings, and why I can install it on device without any problem/error/crash.
Is there a way to remove something from Titanium and remove these warnings?
If I upload this .bar to Blackberry word, will it work?
Thanks!
Vila,
Those levels of warnings are there to let the developer know about potential issues. This does not mean that your application will not work.
Native libraries are supported in latest BlackBerry Android Runtime so you should not have issues, but don't forget to bundle them with your application.
Also, be sure to be using the latest dev tool to convert your APK to BAR FILE.
https://developer.blackberry.com/android/tools/
Find here also the API support to ensuer you will not have issues with your app features
https://developer.blackberry.com/android/apisupport/

Adobe Air iOS app - blank white screen

We have a fairly large air app, and for some reason, when we package it for iOS, it does not launch correctly. Just a plain white screen. When we launch it in debug mode (or even using Fast packaging), it works fine. Only with the export release build it simply launches a plain white screen and does nothing.
Anybody seen anything similar? Any idea if there is an error of some sort, any way to find out what the error is?
SO it turns out after hours of struggling with this is the issue was loading swf files. We had some embedded Image assets that were swf files, which works great in debug mode, but fails spectacularly in release mode. Given that the app we are working on is a behemoth that takes over 30 minutes to build a release version (on a very powerful box), this was quite a pain to nail down. We finally converted swfs to fxg and the error went away
I've just experienced a similar white screen issue when building an AIR iOS app (in any mode). The app builds and launches with no errors but just displays a white screen after the launch image has disappeared.
This issue was different to the one above but I want to post this here for future reference.
It turns out that this was due to incorrect read/write permissions on the source files. i.e. I had copied the source files onto another computer and then logged into that computer as a different user.
The solution was to simply re-copy the source files onto the computer whilst logged in as the correct user.

How can I compress Titanium Application Size after building it?

I built a Login application in which I have 3 Windows
Log In Windows
Registration Windows
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?
Here are several things you can try:
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.
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.
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.
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
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.
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.
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
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.