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.
-
See this question on some viable alternatives (Aug 2017): [Compiling NodeJS as native library on Android](https://stackoverflow.com/q/45459909/8295283) – Arnold Schrijver Aug 07 '17 at 11:33
6 Answers
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.)

- 1,014
- 10
- 10
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/

- 140
- 9
-
beware that the active development of JXCore have stopped. also, JXCore worked for Node 0.10 and maybe 0.12. – Félix Brunet Jul 14 '17 at 15:11
-
Unfortunately JXCore is no longer maintained (see the notice in their readme) – Arnold Schrijver Aug 07 '17 at 11:29
-
• for JXcore, that Sitepoint link is readily useful tutorial but seemingly doesn't well give... •JXcore's current OVERALL & OFFICIAL details -that info is now at say via https://stackoverflow.com/questions/26155435/how-to-choose-between-node-js-and-jxcore#comment-104331505 (my Q comment there). – Destiny Architect Nov 26 '19 at 06:41
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.

- 1,755
- 2
- 19
- 25
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.

- 7,251
- 11
- 40
- 70
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.

- 7,702
- 18
- 63
- 111
-
Looks interesting and promising. Example app on YouTube video shows a very good example of NodeJs power on mobile app. Will wait for more solutions like that. – Gunjan Kumar Jul 29 '17 at 23:38
Updated 2020 answer
All node packages don't require node runtime to be present. Some can be run on browsers as well. Example. lodash.
If you are building an application using the Ionic framework, you should be able to install node packages without any issues. However, some of the packages require OS to run. In that case, you might wanna evaluate if it makes sense to delegate that responsibility to an API endpoint.
If you absolutely need a Node runtime on your mobile app, you can use this library (nodejs-mobile).
Related read: Running Node.Js on Android

- 4,890
- 3
- 35
- 46
-
4Actually, http://electron.atom.io (cross platform desktop app framework) uses the nodejs runtime, so its not only for serverside webapps ;) – Olle Kelderman Jul 22 '16 at 22:29