6 ms·
Tell HN: Building a universal electron app for Mac is a complete nightmare
Everytime I have to release a new version of my electron app, I spend more time fixing the release process than working on the app. It's alway some thing else broken.
- xet7 4y agoIs any other way to develop Mac app any easier?
- b20000 4y agoyes, use objective C or c++ and osx frameworks or use a cross platform c++ toolkit like juce avoid web garbage for desktop apps
- eyelidlessness 4y agoOr Swift, which will feel a lot more at home for JS/TS developers.
- toastal 4y agoCLI and TUIs still work too
- bartvk 4y agoObjective-C? I can't imagine anyone would use that for a new project.
- superchroma 4y agoIf you like .NET, Avalonia is an option which targets OSX in addition to other platforms.
- cercatrova 4y agoFlutter works well for cross platform.
- xenospn 4y agoThey’re also incredibly slow and resource intensive. Just use Swift!
- ronsor 4y ago... right up until you realize that your app has to be cross platform
- splittydev 4y agoWell there's Tokamak. If enough people start contributing to Tokamak, it would actually be viable to write cross-platform apps in Swift. (Especially since Swift itself is already cross-platform).
- mdaniel 4y agoI was curious what the IDE story is like for Swift on non-macOS platforms, and while their repo only talks about LSP, turns out that CLion has a Swift plugin: https://plugins.jetbrains.com/plugin/8240-swift https://plugins.jetbrains.com/plugin/8240-swift I actually wasn't even aware Swift was cross platform until this thread, so I haven't tried the plugin enough to speak to its strengths or weaknesses, but I for sure trust JetBrains a lot more than any LSP
- iamgopal 4y agoTried flutter ?
- groffee 4y agoTauri is meant to be good https://github.com/tauri-apps/tauri https://github.com/tauri-apps/tauri
- CharlesW 4y agoTauri comes with unique considerations of its own. https://blog.logrocket.com/tauri-electron-comparison-migration-guide/#major-tauri-drawbacks https://blog.logrocket.com/tauri-electron-comparison-migrati...
- TechBro8615 4y agosidenote: the logrocket blog is incredible. It's often one of the first results for my searches over a wide range of topics including TypeScript and Rust. And it usually has the most informative content and sometimes even the answer I'm looking for! I'm not in the market for their product, but I absolutely love their blog.
- hulitu 4y ago> Building a universal electron app for Mac If it's for Mac, why does it have to be universal ?
- xwowsersx 4y agoThey mean a universal Mac binary, I believe
- WolfOliver 4y agoit means running on intel and m1 chips
- xwowsersx 4y agoYes, that's what a universal binary is.
- asmmoto 4y agoYou can as well, make separate builds for M1 and Intel. The size of each binary will be smaller.
- hoten 4y agoIf you're set on using web tech, why Electron over just an installable PWA? Consider if you need whatever apis only electron gets you.
- siquick 4y agoCan you add a PWA to the Mac App Store?
- xet7 4y agoThere is some way for iOS, and some iOS apps work on M1, so maybe. Although Apple has been removing PWA style apps from App Store, so better check newest requirements somewhere at docs. https://www.pwabuilder.com https://www.pwabuilder.com https://docs.pwabuilder.com/#/builder/app-store https://docs.pwabuilder.com/#/builder/app-store
- hyperupcall 4y agoSafari heavily nerfs PWAs, making their use more questionable. It's possible that they also need more access to the underlying computer.
- xet7 4y agoReally? I'll test. Usually PWA icon is added this way: https://github.com/wekan/wekan/wiki/PWA https://github.com/wekan/wekan/wiki/PWA
- fragmede 4y agoYes - but users are used to installing things from the app store, so the PWA flow is unfamiliar.
- cercatrova 4y agoIn iOS, sure, but macOS? Most people I know install stuff outside the app store, it's still the case that many apps come as a dmg that you open and drag the app into the Applications folder.
- perryizgr8 4y agoCan you just target intel? Anyway the emulation in Mac OS can deal with it. Why take the extra effort to build two versions.
- WolfOliver 4y agoEverybody is asking for native m1 builds, even if there is not that much of a performance difference for some apps.
- infamouscow 4y agoDoes Electron not run on macOS amd64e? Unless you're taking advantage of some kind of x86-64 specific feature, I don't understand why it's at all a challenge to port an app to arm64e. Could you elaborate a bit on what those problems are? FWIW, I'm more intrigued as an outsider than someone that can offer any meaningful help.
- mdaniel 4y agoThe problem is that Electron, itself, is a macho binary and thus subject to the same architecture constraints as any other app. The "universal binary" the OP is mentioning is taking advantage of the "fat" macho format, which bundles multiple target architectures in one executable, so the user does not need to know which they have in order to download the correct one. Or doubly so in the App Store where there is no "download the correct one"
- mike_hearn 4y agoTake a look at https://conveyor.hydraulic.dev/ https://conveyor.hydraulic.dev/ - it supports Electron apps and makes releasing much easier than with the standard Electron tooling.