最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - What are the limitations of using Electron to build Mac Apps? - Stack Overflow

programmeradmin1浏览0评论

I have found limitations in using frameworks like Ionic for building mobile apps. These are mainly to do with accessing device specific functionality. So two questions:

  1. Are there any similar limitations with using Electron for building Mac Apps?

  2. What are the advantages of building native apps using swift?

I have found limitations in using frameworks like Ionic for building mobile apps. These are mainly to do with accessing device specific functionality. So two questions:

  1. Are there any similar limitations with using Electron for building Mac Apps?

  2. What are the advantages of building native apps using swift?

Share Improve this question asked Nov 27, 2015 at 1:39 Charlie MorrisCharlie Morris 4687 silver badges14 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

Some native capabilities are available in Electron, like adding an entry to the Dock menu or showing a menu bar icon. Other capabilities have been added by third parties, like this one, which plugs into System Preferences. If nothing else, there's a JS-to-Obj C bridge, to invoke Objective-C code.

Another important factor is that apps made using write-once-run-anywhere frameworks often have an odd UX and don't fit in to platform conventions. You get this free when you build a real native app using Cocoa and Swift / Objective-C.

For example, toolbars should change in appearance when the window loses focus. You can see this for yourself by opening (say) Safari Preferences and then switching to another window or app. Electron apps don't do this.

As another example, if a right-click menu is open, the user should be able to press "C" to move the selection to "Copy". Electron again doesn't do this.

This results in an app that looks and feels odd and second-tier. If a native-quality UX is a priority, build your app in Cocoa.

If you don't have the resources to build separate Mac and Windows apps (say you're a two-person startup or a charity) but still want a better UX than a web app, then consider Electron.

Reference: Making a web app feel native, and a subsequent email discussion with Ben Gotow, the engineer who gave that talk.

In this moment I'm just learning how to use electron, but I feel Electron is very easy to use you could see this deck from a Teacher of Turing School https://speakerdeck./stevekinney/building-desktop-applications-with-node-and-electron

发布评论

评论列表(0)

  1. 暂无评论