How can I compress Titanium Application Size after building it? - titanium

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.

Related

How to fix optimazition error publish in play store

my apk is 1.4MB but error is "This APK results in unused code and resources being sent to users. Your app could be smaller if you used the Android App Bundle. By not optimizing your app for device configurations, your app is larger to download and install on users' devices than it needs to be. Larger apps see lower install success rates and take up storage on users' devices."
how to fix this error
It's only a warning, not an error.
For an app that small I wouldn't worry.
It's not something that's made its way into the Ionic ecosystem yet but I heard that if you open up your project in Android Studio and then do the build through there you can create an app bundle.
I'm not totally sure that its fully tested for Ionic so you might have issues with this, but Android have published a full guide:
https://developer.android.com/guide/app-bundle#get_started
This is what they say:
Download Android Studio 3.2 or higher—it's the easiest way
to add dynamic feature modules and build app bundles.
Add support for Dynamic Delivery
by including a base module, organizing code and resources for configuration
APKs, and, optionally, adding dynamic feature modules.
Build an Android App Bundle using Android Studio.
If you're not using the IDE, you can instead build an app bundle from the
command line.
Test your Android App Bundle by using it to generate APKs that
you deploy to a device.
Enroll into app signing by Google Play.
Otherwise, you can't upload your app bundle to the Play Console.
Publish your app bundle to Google Play.

Missing dSYM files in Crashlytics Today extension (Bitcode disabled)

The title of this question basically says it all. I enabled Crashlytics in my Today extension, and for some reasons, the dSYMs are not being uploaded, even though I'm not using Bitcode.
I tried uploading them manually (from ~/Library/Developer/Xcode/Derived Data/Timelines-evxmjnxmpmcivkavmpijzakaxkrp/Build/Products/Debug-iphoneos/Timelines.app.dSYM), but the web interface doesn't really give me any feedback. It shows this screen:
No matter how long I wait, once I refresh the page, it goes back to the 'upload dSYMS' screen.
I think the problem might be that the UUIDs of the missing dSYMs don't really match those that I found locally.
Some notes on my setup:
Xcode 8.2
Today extension running on iOS 10.2
Bitcode is not enabled.
Fabric and Crashlytics integration was done using CocoaPods.
Archive wasn't uploaded to App Store. I'm just testing it locally on my devices. But since the entry for crash reports was created in the web interface, I assume the automatic upload should work anyway.
My question basically is: how exactly can I upload the dSYMs manually? And, second one: how can I make the automatic upload of dSYMs work? Thank you.
It is described here completely ==> fabric.io.
As it said you can download it from activity tab in itunesconnect and then upload it to crashlytics website.

Mobile application apk and IPA size is too large

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

Sencha 2.0 App file size issue -

I have developed a small Sencha Touch 2.0 app. Here is the url:
http://apps.swarnendude.com/sencha/iphonetest/iphoneTest.html?url=http://apps.innofied.com/sencha/gts
The app works in perfectly fine in Android 2.3, iPad, iPhone, Blackberry Playbook. But the app crashes while I test in Blackberry Torch (OS: 6.0) giving this error:
"The page you requested could not be loaded. It is too large for this device"
The production version of the file sizes are:
sencha-touch.js: 90.5Kb
app-all.js: 401.4Kb
app-all.css: 151.5Kb
Other resources: 10Kb
So, total around 650Kb. I think the sizes can be reduced more but I am not getting any other options. I am using the least css configs in SASS file and in JS too (only which are required). Is there anyone getting the same problem? Any solution?
It seems that you attempted to minimize your app, so in this case, there's not much you could do.
I'm using Blackberry Bold and occasionally see this when I use native browser. But in some cases, Opera Mini and Bolt Browser are good suggestions to pass those errors.

iPhone simulator: Is it possible to restore a real iPhone backup to it?

as the question says, I have a backup of an actual iPhone. Now I want a "copy" of the content in my simulator. The reason is that my real iPhone contains third party application data that I want to have in my simulator too.
Is that possible?
Thanks,
Norbert
Definitely not possible, because apps have to be compiled specifically to run on the simulator and iPhone, and such builds are not compatible with each other as they are built to run on different processors.
Edit to add: you can copy data/content (and you can, for Apple-supplied apps like the Address Book that are provided by Apple for the simulator) but unless you have a version of the app compiled for the simulator that can run, the content is obviously no use.
You can try to trick the Simulator by putting files there:
~/Library/Application Support/iOS Simulator
You can also put the files you need in your application project or have a look at Apple Documentation about Application Data1