Sencha 2.0 App file size issue - - sencha-touch

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.

Related

Capture logs (errors, warnings) in exported/deployed OSX app

I am exporting my app as a .app and testing it on different OSX versions and machines. Is there any way to capture warnings, errors, etc. to a log?
The application is not crashing so a crash log is not being generated.
The best way to capture these is using something similar to TestFairy (framework for android / ios beta testing), I suggest you take a look at that, to see what functionalities it provides and the search for something similar on mac os.
Found these two for Mac :
hockeyapp
plccrashreporter

Render camera preview in Chrome using Native Client SDK

I'm trying to write ppapi plugin for Chrome which will use webcam (show preview and write file). I have installed NaCl sdk with pepper_35.
There available examples in /examples/api/ folder: media_stream_audio and media_stream_video.
The audio example works fine - requests access to microphone and shows some kind of preview.
The "media_stream_video" example must show web-camera video preview, but when I load example on the local web server (with make serve command), there appears red rect, and Chrome asks for the web camera access. When I click “allow” - webcam indicator lights-up, chrome show that web page uses the web camera, and I see the camera settings icon. But the preview doesn't work, there still red rectangle instead.
I checked this on Windows 8.1, Windows 7 and Mac OS X, with five different webcams, and have no idea what can be wrong.
Maybe someone already encountered with the same problem?
Installing the pepper_37(dev) version of NaCl SDK solved the problem. Looks like it is unstable version currently, but it works.

Trouble port PhoneGap project to Windows Phone

Porting www.canterburymaps.govt.nz to PhoneGap has been successful for Android and iOS, but Windows Phone (8) is causing issues.
The site works if viewed through IE, but when hosted within Cordova the Windows Phone app loads but there's issues with the functionality. We've discovered it's failing on the JavaScript "dojo.require" e.g.
dojo.require('dijit.layout.BorderContainer');
It doesn't seem to matter which library is passed in, so it seems to be an issue with the dojo.require function itself.
I've found this example online - http://dotnetspeak.com/2013/05/using-esri-arcgis-in-phonegap-applications - and have followed step 3 to change the root url in dojo, but this doesn't seem to help.
Anyone have any ideas what the issue might be?
Please mention the version numbers of both Dojo and PhoneGap.
If you are not using the latest available for both, can you try upgrading?
You mentioned that you tried changing the root URL, but did you try to configure the Dojo loader in sync mode (vs async)? Say data-dojo-config="async: 0, ..." in the script tag which loads dojo.js. Does it work better?

How to optimize Sencha Touch 2.0 performance on iPad?

I am trying to optimize the performance of a Sencha Touch 2.0 app on iPad device.
Please point out some way for doing this.
Is any tools are available for iPad to test the performance of web app??
Thanks.
For your first question, this link may help:
PhoneGap 1.4 wrapping Sencha Touch 2.X - What about performance?
About performance inspection, you can just use Developer Tools of your iPad's Safari. Here is a good tutorial to get started: https://developer.apple.com/technologies/safari/developer-tools.html
Are you going to deploy the app as an iPad native or are you going to use it within the web browser?
Whatever the case, if you are going to deploy as native, it will automatically be optimised and no unnecessary files will be loaded.
If you are going to use it within a web browser, I suggest deploying it as production and not loading the whole source.
This can be achieved by navigating to your sencha touch 2 app and running the following sdk command:
sencha app build production
Then you should load that page within your browser.

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.