Tag Archives: NativeScript

NativeScript Quick Start


via NativeScript Quick Start.

Welcome to the NativeScript quick-start guide. In this guided tutorial you’ll use NativeScript, a cross-platform JavaScript framework for building native mobile apps, to build an iOS and Android app from scratch.

Note: If you’d prefer a video introduction to NativeScript, check out our getting started guide on YouTube.

Tracing NativeScript Applications


via Tracing NativeScript Applications.

Tracing is the process of logging diagnostic information about your application at runtime. It is an incredibly useful form of debugging to developers because it can reveal a great of information about your application’s internal workings. This holds especially true for the non-visual parts of an application like network and file I/O. Tracing gives developers the ability to observe an application at runtime in order to identify issues.

Under the Curtains of for NativeScript for iOS


via Under the Curtains of <HTMLView /> for NativeScript for iOS | Jason Zhekov’s blog.

We just released version 1.2 of NativeScript which among many new features included a new <HTMLView /> element. I’ll show you what stands behind it with nothing but plain JavaScript running on the iOS runtime.

We are going to start with the iOS “Hello, World!” template and we will replace the contents of the label from NSString with NSAttributedString. On iOS the <HTMLView /> element uses NSAttributedString to render itself. You can read more about it in the Apple docs, but in short “it manages character strings and associated sets of attributes (for example, font and kerning) that apply to individual characters or ranges of characters in the string”.

How to analyze the app package and native visual UI tree of a NativeScript application


via How to analyze the app package and native visual UI tree of a NativeScript application.

Applications written with web means such as JavaScript and CSS are usually taken as web or hybrid. With NativeScript we enable these web ​skills allowing you to write in your favorite language (JavaScript or TypeScript – the choice is yours) achieving great, fast-performingnative apps. But, in the dawn of NativeScript and even now when it’s v1, we have been encountering non-believers who wonder “Are the NativeScript apps real native apps as they execute on the device? Or, they are hybrid after all :)”

With this blog post I would like to reveal the truth for the non-believers by dissecting a NativeScript app at runtime and displaying what UI elements are actually created and executed on iOS and Android. Well, I can tell you from now – ​these objects are the native UI components of the respective platform. But if you still don’t believe me, read on.

I don’t want to display too complex graphs of objects, but just to present the general idea, so for this purpose I am going to dissect the sample Photo Album app from our Quick Start tutorial. I slightly changed the Photo Album repo to load two images by default instead of taking them from the camera, so that we can see right away how the images are represented in each platform.

Building a Native App with JavaScript Using NativeScript


via Building a Native App with JavaScript Using NativeScript.

There are many options available for utilizing HTML, CSS and JavaScript to create cross platform applications and I have covered many of them before. In this article I will look at NativeScript from Telerik that claims to be easier to create for cross platform apps than many existing options.

From their official documentation.

NativeScript enables developers to build native apps for iOS, Android and Windows Universal while sharing the application code across the platforms. When building the application UI, developers use our libraries, which abstract the differences between the native platforms.

Open Source framework for building cross-platform truly native iOS, Android and Windows mobile apps using JavaScript.


via NativeScript/NativeScript · GitHub.

What is NativeScript

With NativeScript you can use your JavaScript and CSS skills to write native mobile applications for iOS,Android and (very soon) Windows Phone. There is no WebView involved in rendering the app, as the UI is rendered by the native platform’s rendering engine. Because of that, the app’s entire UX is native.

NativeScript enables you to use a complete stack of cross-platform APIs to write your application code or, if you need to, you can directly access all platform-specific native APIs using JavaScript only. That’s right—you can access all native APIs, not only the ones we thought would be useful!

We did not want to create just yet another ecosystem around a native cross-platform framework. We wanted to integrate and play well with all existing JavaScript and native iOS/Android/Windows ecosystems. That is why we also support using existing JavaScript libraries, as well as existing native Objective-C, Java and .NET libraries. We want to stress that you don’t need to know Objective-C, Java or .NET in order to reuse these libraries—their entire APIs are available in JavaScript with no changes.

Because of the features listed above you get some important functionality right out of the box. The first is that NativeScript applications support the same accessibility models as native apps. This is important for anyone creating apps that need to meet certain accessibility standards before going live. This is also very useful when you start implementing functional or unit tests for your app. Several existing cross-platform tools like Appium already work directly with NativeScript and provide accessibility automation.

The second major feature you get out of the box is 0-day support for new native platforms. Because NativeScript exposes unmodified native APIs and UI components, you can use the latest native APIs and new UI components when Apple, Google or Microsoft updates their mobile platforms.

So let’s summarize what NativeScript enables you as of today:

  • Build 100% native cross-platform apps, with a declarative UI, and the ability to implement platform-specific UIs.
  • Share 100% of your code or use platform-specific APIs, depending on the app you’re building.
  • Code in standards-based ECMAScript 5 JavaScript. ES6 support is coming soon.
  • Use standards-based CSS syntax for styling.
  • Use rich data binding and existing UI patterns to easily build complex user interfaces.
  • Reuse any native library available in Objective-C, Java or .NET.
  • Reuse any JavaScript library that is not browser-dependent.
  • Reuse the QA tools for accessibility automation to write tests.
  • Use the latest native platform features to create an amazing native user experience.
  • Code in any IDE of your choice to implement your applications’ code using the NativeScript CLI.
  • Use the Telerik Platform, AppBuilder and the full Visual Studio integration to get a rich development experience. Paid support is also available.

We hope this gives you a good idea about what you can expect from NativeScript.

To learn more about NativeScript, you can check the following resources: