NativeScript Angular Basic app size on Android is > 160 MB - nativescript

Basic HelloWorld Nativescript-Angular app size > 160 MB when it is pushed to a android phone.
Basic HelloWorld Native-Android app size is < 4 MB when it is pushed to a android phone.
Why is Nativescript-Angular app is so big and what can be done to reduce its size..?
Steps to reproduce:
tns create HelloWorld --ng
Connect Phone
tns run android
Settings -> Search for "Application manager" -> Tap "Application Manager"
Tap HelloWorld application.
Tap storage to see the size of the app.

This is very much normal here as Native-script works with node_modules and while building app, it's dependency are added in build.
The NativeScript Android Runtime consists of several major parts that provide the core functionality. These include:
Аn embedded version of Google’s JavaScript virtual machine - V8 - to run JavaScript.
A C++ layer that tells V8 what to do with all the Android APIs.
A Java layer that performs the glue behind the native C++/JavaScript to Android APIs (and vice-versa).
The first two layers are native libraries (compiled to machine code) and they are CPU architecture dependent, a.k.a ABI (Application Binary Interface), unlike Java and JavaScript which are dynamically (JIT) compiled
To Optimize the perfomance and bundle size you can use the snapshot plugin. That is only for release buils.You need to provide the --env.snapshot flag along with the other release arguments:
tns build android --bundle --env.snapshot --release

Related

Flutterfire cli not showing windows and linux as an option for platform to support

I cannot compile my flutter app since it is not configured for windows, or rather it is not configured Firebase for windows, so the app starts but fails. And I don't understand why when I run flutterfire configure it shows what follows.
firebaser here
The FlutterFire libraries work by wrapping the native SDKs for Firebase's primary supported platforms: iOS (now also macOS), Android and Web. While Flutter allows you to build Windows and Linux desktop apps, Firebase does not have SDKs for those platforms. Even on its products where Firebase offers some limited support (through its C++/Unity SDKs), the FlutterFire libraries don't wrap those SDKs at the moment.
If you want to use Firebase in your Flutter app for Windows and/or Linux, you'll have to either wrap the REST APIs of the Firebase products you want to use yourself, or use a library that wraps the REST API already. An example of this is the firedart library that provides basic support for Authentication and Firestore, but there are probably others.

Getting "Failure [INSTALL_FAILED_NO_MATCHING_ABIS]" when tries to install apk on Xamarin Android Player

When I try to install apk on Xamarin Android Player I'm getting next error:
Failure [INSTALL_FAILED_NO_MATCHING_ABIS]
I use:
Xamarin Android Player
Nexus 5 Lollipop Android 5.1.0 - API 22
USB Debugging is allowed and it displays in attached devices list (adb devices)
INSTALL_FAILED_NO_MATCHING_ABIS : This error says that you try to install an app that has native libraries and they don't match with your CPU architecture. Make sure to compile the app for the CPU architecture (armeabi-v7a/Intel) of the test device. E.g if the app is compiled for arm and the deployment device has Intel this error will be shown.

iOS9, bitcode in enterprise app

Please confirm:
Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store.
From Bitcode (iOS, watchOS).
It is App Store who compiles and links the apps, so how about enterprise app?
I like this iOS9 feature as user could download the required slices to device for updating app quickly with least file size. Bitcode is enabled by default in Xcode 7, but for enterprise app, we upload the app updates to our enterprise server and our client users download it from our server via links. No app store is in this process.
Is that OK for enterprise app with Bitcode enabled? If so, who will own the compile & link duty?
It is absolutely fine if your app contains bitcode even if you do not distribute it over the AppStore, however the app becomes bigger - it contains slices with object code and bitcode for each CPU architecture (more details on this topic can be found here: Bitcode Demystified).
I'd recommend to disable bitcode since there is no AppStore phase in your distribution model and nobody can take care of it.
If you still want to achieve this goal (smaller app size), then you can emulate App Thinning on your own: build a few versions of your app - one for each CPU architecture, upload to your server and put some smart service in front of the server, which will check user's device (via User-Agent) and redirect to a correct binary.
I didn't try this option, but it should work, the only extra-thing you need - table/mapping between device version and CPU.

Dalvik Virtual Machine build target

I am new to Android platform and Dalvik VM. I have some questions about debugging the Dalvik VM.
How to debug Dalvik VM on an emulator?
I build Android by using full-eng as the target
source build/envsetup.sh
lunch full-eng
I am wondering how to build and debug a DVM targeted on host X86 machine instead of Android emulator or real device. I did some search online and find the target is called sim-eng. My Android version (JellyBean) does not have this lunch target option:
You're building on Darwin
Lunch menu... pick a combo:
1. full-eng
2. full_x86-eng
3. vbox_x86-eng
4. full_grouper-userdebug
5. mini_armv7a_neon-userdebug
6. mini_armv7a-userdebug
7. full_wingray-userdebug
8. full_crespo-userdebug
9. full_maguro-userdebug
10. full_panda-userdebug
Does anyone know how to build/debug on host target??
The sim-eng target hasn't been supported for several releases. It was never officially supported at all, really, so having a fully-working simulator build in AOSP was pretty rare.
The good news is that Dalvik VM is used by the Android build system, so if you can build the full Android tree for any target, you'll have a working copy on the desktop for free. In recent versions of Android (4.0 Ice Cream Sandwich and later), a copy of the dalvik script will be installed in your path (source), and can be executed directly.
dalvik -help foo

How to Test Performance of Titanium app

many devloper are now developing the iphone app ..in titanium platform . how to check the performance of the app and how to find the memory leaks and other constraits
We can Check the performance and Memory leaks of titanium app . using simple steps
We our app get built.go to built folder and side that you will find the iphone inside you can see xcode project... Open that in Xcode Now you can test the app
please go through the docs given below :
https://wiki.appcelerator.org/display/guides/Managing+Memory+and+Finding+Leaks

Resources