Questions tagged [nativescript]

NativeScript is an open source framework created by Telerik that makes native mobile app development easier for web developers. It enables developers to use JavaScript or TypeScript (with or without Angular or Vue) to build native mobile applications for iOS and Android. NativeScript apps render native UI components styled by a subset of CSS. Modules provide cross-platform native API abstractions. 100% of native APIs are available via JavaScript.

NativeScript is an open source (ASLv2) framework created by Progress for building truly native mobile apps with JavaScript, TypeScript, Angular or Vue. Use web skills and get native UI and performance on iOS and Android. The Angular developers can share code between Web and Mobile applications via the Code Sharing CLI.

NativeScript apps use native UI components. The framework provides a subset of CSS to make styling simple and familiar for web developers. Modules provide cross-platform API abstractions so that a single codebase can run on multiple platforms. The framework provides 0-day access to 100% of native APIs via JavaScript via build-time metadata generation.

As of March 2019, NativeScript is in version 5.3.0. See the NativeScript roadmap for information about prior and planned versions of NativeScript.

The source can be found at the NativeScript GitHub repository and issues are tracked on the NativeScript GitHub issue tracker.

Documentation

Playground

Logo

NativeScript logo

7280 questions
20
votes
4 answers

Chrome Devtools opens as a search rather then the dev tools themselves

Trying to run a Nativescript debug session and every time I enter chrome-devtools://devtools/bundled/inspector.html?experiments=true&ws=localhost:41000 it opens a google search rather than the debug…
MrWrighty
  • 203
  • 1
  • 2
  • 4
20
votes
1 answer

How can I access Native api in NativeScript when I use Typescript

When I create two new apps with tns, one is the regular js version and one is with typescript. I get a strange error in the typescript version when I try to access a native library. When I create a loaded function with a console.log(pow(x,y)), it…
Aron
  • 1,179
  • 15
  • 29
20
votes
8 answers

How to find/watch the dimensions of a view in a NativeScript layout?

When my layout loads any view inside of it has a width and height of NaN, it also has a getMeasuredHeight() and getMeasuredWidth() of 0. At some point getMeasuredHeight() and getMeasuredWidth() (after the layout is laid out I guess) receive useful…
Michael Eden
  • 948
  • 1
  • 7
  • 18
19
votes
3 answers

Hybrid JavaScript Mobile Development - Apache Cordova vs Capacitor with Ionic vs NativeScript vs React Native

First of all, hope so this question is not too broad. Coming from front-end background I'm thinking to start learning one of JavaScript-related frameworks for mobile development. And here comes the first question, shall I go with Apache Cordova or…
17
votes
3 answers

Is there a way to "refresh" the terminal/iTerm without closing the current sessions?

I just updated my xcode command line tool in my iTerm2 and it seems like I need to restart my iTerm to put that to work, since when I try to use tns build ios command to build my nativescript project for iOS, it always echos back xcodebuild…
Hang Chen
  • 549
  • 1
  • 7
  • 18
17
votes
4 answers

How to set orientation in nativescript

Hello I would like to know how to set device orientation in nativescript. Specifically I want the application that I am writing to stay in the same orientation (portrait) at all times so that rotating the device does not cause it to go into…
xerotolerant
  • 1,955
  • 4
  • 21
  • 39
16
votes
3 answers

Angular 2 do not refresh view after array push in ngOnInit promise

I created a NativeScript app with angular 2, i have an array of objects that i expect to see in the frontend of the application. the behaviour is that if i push an object into the array directly inside the ngOnInit() it works, but if i create a…
15
votes
3 answers

How can I specify or get the resource id of a nativescript textfield

We are using nativescript with angular for our mobile app. I want to use the Google Play pre-launch report feature, but our app requires a password to be entered. Google Play allows specifying a password but you need a resource name so the testing…
14
votes
2 answers

Expected 2 arguments, but got 1.ts(2554) core.d.ts(8064, 47): An argument for 'opts' was not provided

Error Expected 2 arguments, but got 1.ts(2554) core.d.ts(8064, 47): An argument for 'opts' was not provided. Code is from NativeScript Marketplace https://play.nativescript.org/?template=play-ng&id=Hqp5UQ&v=3073 I've brought the code over verbatim…
Charlie Pope
  • 177
  • 1
  • 1
  • 8
14
votes
2 answers

ENOTEMPTY: directory not empty, rmdir

I am new in NativeScript, I tried to run my HelloWord app using NativeScript and Angular. I connected my android device and then i run command tns run android its how me following error. Error: ENOTEMPTY: directory not empty, rmdir…
14
votes
2 answers

NativeScript TextField [(ngModel)] does not work

I have a problem with data binding in TextField via ngModel I have model class export class Product { name: string description: string imageUrl: string } View: