Support for desktop OSs (OSX, Windows, Linux)
This would be a killer feature. If you even made a layer for NW.js, that would be awesome.
Please vote for this issue in our ideas portal.
Please don't write a comment saying +1. Instead vote for it in the ideas portal or by hitting the quick reply buttons just below this post.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
How do I up-vote this?
+1 - Core dev team might want to take a look at the latest version of WinJS library for ideas.
This'd be pretty cool. And with windows 10 Chakra integration that'd be not too hard, I'd imagine. Maybe it'd also be a step for integrating with windows phone, too.
+1
Can somebody talk about the feasibility of doing this. It looks pretty doable based on the iOS runtime as there is a pretty clean layer for calling Objc-C.
Yes it is doable and relatively easy (in a matter of week) a POC app can be created that can show a running MacOS app written in {N} and accessing the native desktop APIs. The real effort will after that when the abstraction layer that will allow you to reuse the UI declarations between mobile and desktop should be written.
I wonder if some of you is interested in doing this POC or dealing with the abstraction layer? It is really not a top priority for the moment and I don't see it becoming a priority in the next 6 months for the core team.
I wish you keep mobile separated from desktop development. Please, keep the core lite. This can be somekind of optional plugin, dont you think?
+1
If desktop support is a lower priority than mobile, maybe it could be implemented on top of Qt?
Since they've already done the work of wrapping up a JS runtime and cross-platform UI abstraction together, it seems like NativeScript could hypothetically just map its own UI markup's primitives to the equivalent QML code.
+1
I don't think QT is needed. Ubuntu already supports QML natively for it's UI markup. And also JavaScript and Swift for it's controller logic.
So only Swift (plus some QML) is necessary to support iOS, OSX, and Ubuntu. But, as mentioned above, the hard part is the API differences.
HOWEVER, with interoperability being an official goal of Swift 3.0, the syntactic differences between Apple APIs (Foundation, AppKit, UIKit, etc) might be lessened. Which should make the {N} abstraction layer easier to create for all 3 platforms.
So perhaps Swift 3.0 is a good runtime target for this goal (even if it temporarily excludes Windows).
+1
no Swift. Why adding a dependency on a language not absolutely needed for the desktop, in the sense of Java being needed for Android.
Are there any plans to support desktop OS in the near future? Maybe macOS?
+1
+1
PLEASE DO NOT +1 in comments!
https://tylergaw.com/articles/building-osx-apps-with-js
+1
that would be awesome :+1:
Will it work on my RPI a ??
I cannot open the vote page. so, I have to vote here :+1:
pyqt anyone (dayjob) ?
so we need to parse xml, create the widgets, and bind to js right ?
I'm a big supporter of NW.js (been using it for hundreds of projects for about 5 years). However I don't see it (or it's alternative electron) as a good fit for NativeScript.
A better option would be something like libui-node. This is a better option because it actually produces native code and uses the native UI of the OS, which is much more in line with the idea of "Native Script".
I would like to see something like @jlooper's Vue example, but with a desktop template as well:
<template web>
<div class="App">
<h1>Hello Web App</h1>
<h2>{{ msg }}</h2>
<ImageGallery/>
</div>
</template>
<template native>
<StackLayout>
<Label text="Hello mobile App" style="font-size: 48;"/>
<Label :text="msg" style="font-size: 40;"/>
<ImageGallery/>
</StackLayout>
</template>
In the same manner, have NativeScript-Vue offer Vue components that act as abstractions for LibUI-Node's native UI elements. So you could just have an additional template for native desktop, like:
<template desktop>
<VerticalBox>
<AttributedString text="Hello Desktop App" style="font-size: 48"/>
<AttributedString :text="msg" style="font-size: 40"/>
<ImageGallery/>
</VerticalBox>
</template>
Vuido is a new library started for adding a Vue abstraction on top of LibUI-Node, so it may be something that can be referenced. I just think it makes more sense to have that functionality all in one place (NativeScript). Since it falls under the scope of cross-platform native app building and code-sharing.
Being able to export a web-app version seems like it is a long term necessity, and should be started sooner than later. Doing this for TypeScript/Angular projects seems like it would almost be trivial, and I'm kind of surprised it's not implemented yet.
Native-Script vue already supports building a web-app version (example shown above). I'm saying it would be nice, and make sense, to also support building for native desktop app.
Please vote for this issue in our ideas portal.
The "ideas portal" returns

+1 watch out, the voting page link is broken
Any progress on this? @TheJaredWilcurt I am completely new to {N} and I too am a nw.js developer wanting a code sharing situation for the business logic across Desktop and Mobile. It seems the only option is with Angular?
Is there now an option to build for Win, OSX, Nix and access the native file system and use anything from plain JS to Vue or whatever we choose? (Like we can in nw.js)
Thanks! Murray
@flowt-au I've just been wrapping Desktop-specific stuff in conditionals if (window.nw) { doThing }.