Closed Lelelo1 closed 3 years ago
To setup native access (interacting with native elements or apis in ts) - it's needed to:
npm install @nativescript/types --save-dev
and then add reference.d.ts
in the root folder:
...like given in the NativeScript docs: https://docs.nativescript.org/core-concepts/accessing-native-apis-with-javascript
Then the ios namespaces can then be accessed and device id gotten by:
And android namespaces like:
How to access the native apis?