Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NativeScript limitations

I´m evaluating differents mobile frameworks, and I think that nativescript is a good option. But I don't know if exists limitations on the development process. For example I had limitations on the styling (and that's not so important), but I want to know if in the future I can have a limitation and can´t use some native feature or external library. Thanks!

like image 289
Matías González Avatar asked Oct 24 '16 18:10

Matías González


People also ask

Is NativeScript better than ionic?

NativeScript is faster than Ionic because it connect directly with native APIs. NativeScript directly injects IOS and Android APIs into Javascript Virtual Machines. It simplifies development and allows for accessing native APIs directly.

Is flutter better than NativeScript?

Nativescript and Flutter are both technologies that allow you to build cross-platform mobile apps. They both have their pros and cons, but in general, Nativescript is more potent while Flutter is flexible and easier to use.

Which is better NativeScript vs react native?

React Native is by far the most popular cross-platform mobile development framework, winning over other similar frameworks, e.g., Xamarin, Flutter, Ionic, or NativeScript.

Is NativeScript faster than react native?

However, NativeScript has one trick up its sleeve: it uses Google's V8 on Android. React Native, on the other hand, uses Apple's JavaScriptCore on iOS and Hermes on Android. Thanks to Google's V8, NativeScript apps tend to have significantly better startup performance than React Native apps.


3 Answers

I have been using NativeScript since v0.90. I have written multiple apps and over 40 plugins for NativeScript, so I am very familiar with the ins and outs of the platforms.

This post is features as of v6.50.

I can think of only a couple limitations;

  • Tooling sometimes leaves a lot to be desired, however using the IDE's supported make this better than the Native CLI in a lot of cases.
  • Sometimes errors aren't always propagated back from the app to the screen/ide -- so you have to do things like "adb logcat" to see the full error log to see the error that got filtered out by the CLI.
  • Native Services (i.e. background services) --- This is much better written as native code. The NS runtimes take memory while running; so a service you typically want as small of a memory footprint as possible -- I would not use anything but Java/ObjC for a background service.
  • OpenGL on android needs to run in a separate thread, NS by default switches you back to the main thread when returning from any native calls; this basically kills direct NS opengl calls. However, it is actually better to create any OpenGL stuff in Java or Kotlin anyways; and then have NS call into your native code that handles all the rendering, so this is more of a minor annoyance.

Beyond that I can't think of any "real" limitations; you have full access to the native platform and can actually style any control as long as you know how to do it via native calls; if for some reason the control doesn't support the normal css styling. I & others have used many Android and iOS libraries in our apps. You can easily reuse native android/ios components you have full access to anything out there that is available to a native iOS or Android app.

You can look at https://plugins.nativescript.rocks for a list of all the plugins in the NativeScript community.

like image 91
Nathanael Avatar answered Oct 17 '22 16:10

Nathanael


I have been developing with Nativescript for some time now, and while finished product (application) is more than decent, the process of development is really painful. The primary reason for that are frequent bugs in Nativescript platform itself, and it's official plugin for VSCode.

I am currently working on Nativescript 2.0.0 and have been trying to update to newer versions since they came out, but there were always some errors, ether with Node, or with Gradle for Android, and that is just one of many problem examples I face with the platform. I wish they improve it in the near future.

like image 4
Xoyce Avatar answered Oct 17 '22 15:10

Xoyce


For now native apis are fully accessible from JS but if you want you can do some library in native languages and call them from JS code too, about external libraries it depends if you mean native libraries or JS ones, but there quite many options/plugins done in JS code using some native libraries but in case not as JS plugin you can do it yourself with native libraries

like image 2
Marek Maszay Avatar answered Oct 17 '22 17:10

Marek Maszay