Home » Android » How to run Nodejs runtime on android or ios mobile devices

How to run Nodejs runtime on android or ios mobile devices

Posted by: admin June 15, 2020 Leave a comment

Questions:

I am trying to develop one chrome-cast app for iOS/android using Ionic Framework and for that I need few NodeJS packages in my app. It is working from my desktop but I’m not sure how it will run on mobile devices where there is no Node run time available. So the first question is how to install or provide NodeJS run-time on iOS/Android devices and later if it is possible to package with iOS/Android app package.

How to&Answers:

NodeJS is meant for developing server-side and desktop applications. NodeJS is an extended version of Chrome’s V8 JavaScript engine. Therefore, there is no such thing as providing NodeJS run time on mobile devices.

However, your Ionic Application is capable of understanding JavaScript codes since it runs on WebView. There are NodeJS packages that work on browsers as well that are not Node specific (Eg. Bootstrap, AngularJS, lodash, etc. ). For those sorts of packages, it is possible to pack/include the package with your Ionic app (to both iOS and Android). Also, there are some NodeJS packages that you use for building your Ionic Applications (Eg. Sass, Gulp, etc. ). Therefore, it really depends on what kind of NodeJS package you’re using and whether or not it can run on the browser.

Answer:

You can use Node.js for Mobile Apps.

At its core, the project provides a native library for embedding Node.js into native Android and iOS applications; but it also comes with plugins for React Native and Cordova.

Pre-built binaries for the library are available for Android armeabi-v7a, x86, arm64-v8a, x86_64, and for iOS 64-bit.

More information, including some documentation, is available on the project website.

(Full disclosure: I work for the company that develops Node.js for Mobile Apps.)

Answer:

You can use JXCore to run Node.js with Express on mobile devices with PhoneGap, here is a link of a tutorial and more details about JXCore: https://www.sitepoint.com/how-to-run-node-js-with-express-on-mobile-devices/

Answer:

You can run Node on iOS and Android with LiquidCore.

LiquidCore enables Node.js virtual machines to run inside Android and iOS apps. It provides a complete runtime environment, including a virtual file system and native MySQL support.

LiquidCore is a full port of node 8.9+ and supports all the bells and whistles. On iOS, its magic comes from a translation layer called V82JSC, which does exactly what it sounds like. V8 calls are translated at runtime to Apple’s own JavaScriptCore which allows Node to be compiled with changing virtually no code in Node. This enables newer versions of Node to be ported quickly and with fewer bugs.

Answer:

Best way to run NodeJS (and other things like Python, gcc, etc) on Android is through Termux which gives you a full-on Linux terminal. I’m surprised nobody has put the link here yet. (no affilications with me)

It also gives you APIs to access GPS and send notifications which you can call through your NodeJS script.

I have used it to run various nodejs apps on my Android phone, including this one.

Answer:

Someone tried running Node-Chakracore (MS Edge Browser Engine) on iOS. You can find the article on Microsoft blog. And here is the link to YouTube video.