News for hackers. Stuff that matters.
Re:Tell HN: Building a universal electron app for Mac is a c... by xet7 on Sunday October 30, 2022 @11:24AM (#33395223)
Is any other way to develop Mac app any easier?
Re:Tell HN: Building a universal electron app for Mac is a c... by b20000 on Sunday October 30, 2022 @11:26AM (#33395251)
yes, use objective C or c++ and osx frameworks

or use a cross platform c++ toolkit like juce

avoid web garbage for desktop apps

Re:Tell HN: Building a universal electron app for Mac is a c... by eyelidlessness on Sunday October 30, 2022 @11:40AM (#33395386)
Or Swift, which will feel a lot more at home for JS/TS developers.
Re:Tell HN: Building a universal electron app for Mac is a c... by toastal on Sunday October 30, 2022 @12:06PM (#33395635)
CLI and TUIs still work too
Re:Tell HN: Building a universal electron app for Mac is a c... by bartvk on Sunday October 30, 2022 @04:59PM (#33398617)
Objective-C? I can't imagine anyone would use that for a new project.
Re:Tell HN: Building a universal electron app for Mac is a c... by superchroma on Sunday October 30, 2022 @11:33AM (#33395315)
If you like .NET, Avalonia is an option which targets OSX in addition to other platforms.
Re:Tell HN: Building a universal electron app for Mac is a c... by cercatrova on Sunday October 30, 2022 @10:40PM (#33401467)
Flutter works well for cross platform.
Re:Tell HN: Building a universal electron app for Mac is a c... by xenospn on Sunday October 30, 2022 @11:43AM (#33395412)
They’re also incredibly slow and resource intensive. Just use Swift!
Re:Tell HN: Building a universal electron app for Mac is a c... by ronsor on Sunday October 30, 2022 @11:45AM (#33395435)
... right up until you realize that your app has to be cross platform
Re:Tell HN: Building a universal electron app for Mac is a c... by splittydev on Sunday October 30, 2022 @11:52AM (#33395503)
Well 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).
Re:Tell HN: Building a universal electron app for Mac is a c... by mdaniel on Sunday October 30, 2022 @04:31PM (#33398335)
I 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

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

Re:Tell HN: Building a universal electron app for Mac is a c... by iamgopal on Sunday October 30, 2022 @12:19PM (#33395756)
Tried flutter ?
Re:Tell HN: Building a universal electron app for Mac is a c... by groffee on Sunday October 30, 2022 @12:24PM (#33395810)
Tauri is meant to be good https://github.com/tauri-apps/tauri
Re:Tell HN: Building a universal electron app for Mac is a c... by CharlesW on Sunday October 30, 2022 @02:03PM (#33396929)
Tauri comes with unique considerations of its own. https://blog.logrocket.com/tauri-electron-comparison-migrati...
Re:Tell HN: Building a universal electron app for Mac is a c... by TechBro8615 on Sunday October 30, 2022 @02:51PM (#33397382)
sidenote: 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.

Re:Tell HN: Building a universal electron app for Mac is a c... by hulitu on Sunday October 30, 2022 @01:34PM (#33396588)
> Building a universal electron app for Mac

If it's for Mac, why does it have to be universal ?

Re:Tell HN: Building a universal electron app for Mac is a c... by xwowsersx on Sunday October 30, 2022 @01:45PM (#33396725)
They mean a universal Mac binary, I believe
Re:Tell HN: Building a universal electron app for Mac is a c... by WolfOliver on Sunday October 30, 2022 @02:29PM (#33397198)
it means running on intel and m1 chips
Re:Tell HN: Building a universal electron app for Mac is a c... by xwowsersx on Sunday October 30, 2022 @03:31PM (#33397765)
Yes, that's what a universal binary is.
Re:Tell HN: Building a universal electron app for Mac is a c... by asmmoto on Sunday October 30, 2022 @02:45PM (#33397330)
You can as well, make separate builds for M1 and Intel. The size of each binary will be smaller.
Re:Tell HN: Building a universal electron app for Mac is a c... by hoten on Sunday October 30, 2022 @02:51PM (#33397379)
If you're set on using web tech, why Electron over just an installable PWA? Consider if you need whatever apis only electron gets you.
Re:Tell HN: Building a universal electron app for Mac is a c... by siquick on Sunday October 30, 2022 @03:39PM (#33397836)
Can you add a PWA to the Mac App Store?
Re:Tell HN: Building a universal electron app for Mac is a c... by xet7 on Sunday October 30, 2022 @08:51PM (#33400752)
There 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://docs.pwabuilder.com/#/builder/app-store

Re:Tell HN: Building a universal electron app for Mac is a c... by hyperupcall on Sunday October 30, 2022 @03:53PM (#33397983)
Safari heavily nerfs PWAs, making their use more questionable. It's possible that they also need more access to the underlying computer.
Re:Tell HN: Building a universal electron app for Mac is a c... by xet7 on Sunday October 30, 2022 @08:53PM (#33400771)
Really? I'll test. Usually PWA icon is added this way:

https://github.com/wekan/wekan/wiki/PWA

Re:Tell HN: Building a universal electron app for Mac is a c... by fragmede on Sunday October 30, 2022 @09:09PM (#33400856)
Yes - but users are used to installing things from the app store, so the PWA flow is unfamiliar.
Re:Tell HN: Building a universal electron app for Mac is a c... by cercatrova on Sunday October 30, 2022 @10:38PM (#33401460)
In 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.
Re:Tell HN: Building a universal electron app for Mac is a c... by perryizgr8 on Sunday October 30, 2022 @09:14PM (#33400889)
Can you just target intel? Anyway the emulation in Mac OS can deal with it. Why take the extra effort to build two versions.
Re:Tell HN: Building a universal electron app for Mac is a c... by WolfOliver on Monday October 31, 2022 @01:06PM (#33408883)
Everybody is asking for native m1 builds, even if there is not that much of a performance difference for some apps.
Re:Tell HN: Building a universal electron app for Mac is a c... by infamouscow on Sunday October 30, 2022 @10:02PM (#33401226)
Does 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.

Re:Tell HN: Building a universal electron app for Mac is a c... by mdaniel on Monday October 31, 2022 @11:42AM (#33407418)
The 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"
Re:Tell HN: Building a universal electron app for Mac is a c... by mike_hearn on Monday October 31, 2022 @03:32PM (#33411507)
Take a look at https://conveyor.hydraulic.dev/ - it supports Electron apps and makes releasing much easier than with the standard Electron tooling.