12

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.

1

6 Answers 6

10

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.)

Sign up to request clarification or add additional context in comments.

Comments

6

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/

3 Comments

beware that the active development of JXCore have stopped. also, JXCore worked for Node 0.10 and maybe 0.12.
Unfortunately JXCore is no longer maintained (see the notice in their readme)
• 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 stackoverflow.com/questions/26155435/… (my Q comment there).
2

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.

Comments

2

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.

Comments

0

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.

1 Comment

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.
-5

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

1 Comment

Actually, electron.atom.io (cross platform desktop app framework) uses the nodejs runtime, so its not only for serverside webapps ;)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.