NativeScript | ⚡ Empowering JavaScript with native platform APIs | Mobile library
kandi X-RAY | NativeScript Summary
kandi X-RAY | NativeScript Summary
NativeScript empowers you to access native APIs from JavaScript directly. The framework currently provides iOS and Android runtimes for rich mobile development and can be utilized in a number of diverse use cases.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of NativeScript
NativeScript Key Features
NativeScript Examples and Code Snippets
run npm install @nativescript/core
import { Label } from "@nativescript/core";
import { ApplicationSettings, ImageSource } from '@nativescript/core';
Community Discussions
Trending Discussions on NativeScript
QUESTION
When i do the build "tns debug ios --env.aot" i get below build errors
ERROR in ./node_modules/nativescript-orientation/orientation.js 16:11-51 Module not found: Error: Can't resolve 'tns-core-modules/ui/core/view' in '/Users/admin/project/node_modules/nativescript-orientation'
ERROR in ./node_modules/nativescript-orientation/orientation.js 17:15-60 Module not found: Error: Can't resolve 'tns-core-modules/ui/core/view-base' in '/Users/admin/project/node_modules/nativescript-orientation'
ERROR in ./node_modules/nativescript-orientation/orientation.js 18:12-48 Module not found: Error: Can't resolve 'tns-core-modules/ui/enums' in '/Users/admin/project/node_modules/nativescript-orientation'
ERROR in ./node_modules/nativescript-orientation/orientation.js 19:12-48 Module not found: Error: Can't resolve 'tns-core-modules/ui/frame' in '/Users/admin/project/node_modules/nativescript-orientation'
ERROR in ./node_modules/nativescript-orientation/orientation.js 20:11-51 Module not found: Error: Can't resolve 'tns-core-modules/ui/page' in '/Users/admin/project/node_modules/nativescript-orientation'
i think these errors are due to the outdated package ,or am i missing anything?
"nativescript-orientation": "2.2.5"
this is orientation.js
in the nativescript 8.2 everything is moved to @nativescript/core and there is no tns-core-modules. Any idea how can i make this work with the native script new version?
...Package.json
ANSWER
Answered 2022-Mar-27 at 21:37I fixed it by removing the third party plugin and setting it like this
QUESTION
I am new to NativeScript and Webpack and i have migrated my native script app from 6.5.1 to 8.2 version, and i am using nativescript-orientation-free plugin ,i am getting build errors as this plugin still refers to tns-core-modules which is no longer supported in Native Script 8 and i am getting below errors
ERROR in ./node_modules/nativescript-orientation-free/orientation.js 17:12-48 Module not found: Error: Can't resolve 'tns-core-modules/ui/enums' in '/Users/admin/Development/project/node_modules/nativescript-orientation-free'
ERROR in ./node_modules/nativescript-orientation-free/orientation.js 18:12-48 Module not found: Error: Can't resolve 'tns-core-modules/ui/frame' in '/Users/admin/Development/project/node_modules/nativescript-orientation-free'
we do not want to use this paid version pro-plugins-nativescript-orientation
can you please let me know how can i fix this issue? is there anything i can do in the webpack.config.js ? I am stuck here.
...ANSWER
Answered 2022-Mar-13 at 22:42You have my sympathies. (A quote from the movie Alien.)
Migrating a NativeScript app from 6.5 to 8.x can be wildly frustrating due to all the breaking changes. Make sure you watch this video: Migrating Legacy NativeScript 6 Project to 8.
When Migrating my app I found I had to migrate several of the plugins I used. Patch-package is your friend! To answer your question, you'll need to revise the links you circled. Sometimes this is easy, sometimes this requires investigation.
These three should work:
QUESTION
I'm trying to use @nativescript-community/ui-mapbox plugin in my nativesctipt app.
After adding the plugin to my application
...ANSWER
Answered 2022-Mar-15 at 10:33I had the same problem, I found out that this problem occurs in @nativescript-community/ui-mapbox
version 6.2.15
.
What I did was just install 6.2.9
, and everything works fine now.
QUESTION
In order to learn about the engine I'm trying my hand at a very simple project - proceduraly generating a sphere using the editor and the gdnative Rust bindings. I'm trying to follow up this tutorial which uses GDScript and convert the code to Rust.
I'm having trouble figuring out how to access a property defined in the editor. I've been reading the docs and searching around the web for a week now but there is something that escapes me and I'm not able to arrive at an understanding of how to proceed about it.
What I want to do, is access the mesh
property, of type ArrayMesh, much like in the tutorial that I linked above, and attach to it the arrays that I generated for the vertices - basically bind those arrays to the ArrayMesh. Here is my scene:
ANSWER
Answered 2021-Nov-30 at 22:57The method add_surface_from_arrays
is defined in ArrayMesh
. Given the error you got, you are trying to call it on a MeshInstance
.
We can confirm that with the source code, since you get owner: &MeshInstance
and you are calling owner.add_surface_from_arrays(…)
.
Usually you would create an ArrayMesh
and call add_surface_from_arrays
on it passing an array with the vertex data. Afterwards you should be able to call set_mesh
on the MeshInstance
passing the ArrayMesh
.
QUESTION
I am trying to build a plugin around a native iOS/Android SDK. I would like to know to finally generate a my-plugin.tgz file so that I can use it locally without publishing it. I have done this with Nativescript 6.x, but I would like to know how to do this with the new workflow in Nativescript 7.x.
Thank You.
...ANSWER
Answered 2021-Sep-02 at 00:59After running the build
command from npm start
, you will get a dist
directory with a structure like this
QUESTION
I'm new to Svelte Native. I was following the Quick Start steps on docs. Installing nativescript
and creating the new Svelte-Native app with npx degit halfnelson/svelte-native-template myapp
were no issue.
But, after I've cd myapp
and then ran ns preview
(immediate continuation of the screenshot above):
Note: I did tns
preview
on the second attempt because I saw that on the screenshot on the docs, just to test it out and see whether it will work (but it didn't, too).
So should I just wait 'til the Preview service has been enabled? If not, I don't know how to configure local builds and use "ns run " instead. How will I do that?
...ANSWER
Answered 2021-Oct-11 at 02:39I also posted an issue about this here. And thankfully, the NativeScript team answered my question. I'd like to post this here in case anyone runs into same trouble.
The Playground and the Preview app has been disabled until further notice, the implementation is in progress for a better user experience.
With
ns run
you can deploy your app to your iOS/Android device or simulator. To configure your local builds you should install Xcode or install Android Studio.You can read more info on the Environment Setup.
Once you have Xcode installed, you can do this:
ns run ios
Or on AndroidStudio:
ns run android
QUESTION
I used nativescript-imagepicker (related website) and I implement all the things exactly as were in the document and sample codes.
I also set the permission code in the AndroidManifest.xml, that fixed for the API 29 and upper, but unfortunately I get this error after choosing a photo from the device gallery:
Asset 'content://com.android.providers.downloads.documents/document/..._photos.jpg' cannot be found.
Code:
...ANSWER
Answered 2021-Sep-22 at 21:05hi I found your answer after a long time on search.imagepicker return image address in content://
format so imagesource cant find out it.you must convert content://
format to file://
format.so change your code same below
QUESTION
For some reason I get this error when I'm building on iOS on my mac.
...ANSWER
Answered 2021-Sep-14 at 17:03Maybe is a problem with your version of @nativescript/webpack, if you migrated to NativeScript 8.1 you should update your version of @nativescript/webpack to 5.0.0 as pointed here
QUESTION
I got an error while decrypting the encrypted data. My goal is to encrypt a pdf file in PHP and decrypt it in nativescript to display the pdf natively in the app. I'm posting this as a last resort because I've read similar posts regarding my issue but none work for me. The data is encrypted in PHP using openssl and will be decrypted in nativescript using cryptoJs for AES decryption and jsrsasign for RSA decryption of the key and the IV. I pretty much appreciate anything that would help me. There might be something wrong with how I did it but I'm not sure what it is. Here's my progress so far.
Encryption in PHP (RSA+AES).
...Already tested in decrypting the data successfully in PHP. So it's safe to assume that it can be decrypted.
ANSWER
Answered 2021-Sep-09 at 03:54I solved the problem! (Technically though I was asking the wrong question). I realized it was because I parse the secretkey and IV using UTF-8 encoding when in fact I should have use Latin1. I checked the encoding of the data and it was ISO-8859-1 in which I recently learned that is also known as Latin1. So I change this chunk of code
QUESTION
This error appears after upgrading to nativescript 8.
my project structure is:
...ANSWER
Answered 2021-Aug-31 at 08:16it's in your webpack.config.ts
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install NativeScript
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page