64

Is it possible to create a native ios app with node.js, and is so does anyone have any examples?

JustSid
  • 25,168
  • 7
  • 79
  • 97
Hello World
  • 1,273
  • 2
  • 10
  • 8
  • 9
    I really don't understand the down votes here: It's a legitimate question. It so happens that the answer is "no", but... – Mark Bessey May 06 '12 at 01:43

8 Answers8

4

I search for this constantly, and although many of these answers are quite right in citing that V8 isn't iOS compatible, it seems that running a nodelike environment within iOS isn't all that impossible.

The first option I discovered was called "Neunode" (hasn't been updated in a year). Here are some reference links if you want more:


Nodelike / Node.app Project

Nodelike is the core framework of the Node.app project, which has the goal to implement a roughly Node.JS-compatible interface using JavaScriptCore.framework on iOS 7 and OS X Mavericks.

Example: Interpreter

an example project implementing a Node.JS interpreter as an iOS app, utilising the Nodelike framework.

Edit:

It is still "not viable for serious projects" but checkout updates at: https://github.com/node-app/Nodelike


Overall, The Node.app Project looks promising, be sure to checkout their website

electblake
  • 2,027
  • 18
  • 25
3

Yes! You can run Node applications on iOS devices. Node.JS fork JXcore has implemented SpiderMonkey JavaScript engine in addition to Google's V8. The source code repository is available from Github

Nuray Altin
  • 1,294
  • 12
  • 19
1

No. But you can write native applications in Javascript (which is the same language as Node - which is server run javascript) by using a tool like Unity.

Also, welcome to SO!

K2xL
  • 9,730
  • 18
  • 64
  • 101
1

No you can't create a native iOS app using Node.js. Unless you find a means of installing Node.js, which would be very custom and would require rooting the phone.

May I ask what you're trying to achieve? I could point you in the right direction. Unless you're just curious as to whether Node would work on iOS.

Jack
  • 15,614
  • 19
  • 67
  • 92
  • 4
    Yup. Node.js requires V8 which requires exectuable pages which aren't possible in an unjailbroken environment – JustSid May 05 '12 at 15:19
  • I been exploring options for creating a native ios on windows, and I saw http://www.rhomobile.com/, and I was looking for an alterative solution with node.js. – Hello World May 05 '12 at 15:27
  • So you're trying to create a Node application which allows you to write JavaScript code and compile it to run on iOS? – Jack May 05 '12 at 16:58
1

There is a relatively new project trying to archive this: http://nodeapp.org/

It is under active development and already supports most basic stuff and filesystem access.

Sam Rijs
  • 11
  • 1
0

I should mention you can compile node.js into an arm-emu-arm mode and it runs on iOS without issue. It could "hypothetically" be accepted by Apple's app store, but there's several hundreds of reasons why no person (let alone app store) would accept a node app yet.

Trevor
  • 610
  • 7
  • 10
0

As Nuray Altin have mentioned, you can do it with JXcore and its plugin for Cordova. Here is an article on that subject: Develop an iOS Application with Node.js and Cordova.

It goes step by step through the process (compiling JXcore from sources, installing Apache Cordova, creating an app etc.)

infografnet
  • 3,749
  • 1
  • 35
  • 35
0

You can't run a proper Node.js environment inside a native iOS App, due to sandbox limitations.

Having said that, there are several projects that enable you tu embed/run Node.js applications inside a native (iOS/Android) App.

This is maybe the most popular project: http://jxcore.io/

This is a sample iOS project that use JXcore: https://github.com/jxcore/jxcore-ios-sample

nickshoe
  • 53
  • 2
  • 9