Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macintologist

macrumors 6502a
Original poster
May 3, 2004
637
878
I want to make a desktop utility GUI application related to organizing video files. Ideally it would be cross platform Mac and windows but I want a native GUI for each because I personally hate ugly cross platform GUIs. I want the Mac interface to be first class so I want to use swiftUI or whatever UI framework for Mac that is native, and I’d want to use a native windows UI framework for the windows app.

whats a good strategy to ensure that the backend application engine logic is as cross platform as possible so I can maintain a single application backend code base and then have two different front end gui codebases.


an example of something that is cross platform where the Mac interface appears to be first class is handbrake.
 

casperes1996

macrumors 604
Jan 26, 2014
7,431
5,575
Horsens, Denmark
In my opinion, Qt can feel relatively native if done right.

If you really want to use a system native UI framework you have a few options. Compile the shared parts to a shared library, either static or dynamically loaded, in something that follows an ABI easily interacted with by both platforms. The C ABI is always a good candidate. Not necessarily meaning you need to write in C. For example you can tell Rust or Zig to output C ABI object files. Then you can declare the shared functions as external in Swift and probably C# or whatever Windows preference you have and call it from there.

At work we've done some work with Kotlin Multiplatform for that sort of workflow for mobile though not sure if that can work for Windows. Can certainly build both to Android JVM and an XCFramework at least :)

Another option would be to create independent programs. A daemon written entirely cross platform that will be launched by the program and respond to requests by the GUI frontend through XPC, sockets or any other RPC means.
 
  • Like
Reactions: macintologist

Rock_Artist

macrumors newbie
Jul 28, 2020
15
15
If you insist going pure native on each platform. Having a standalone backend and just making front end per each platform sounds the simplest.

As I come from audio, we use JUCE as a framework. It’s cross platform similar to QT but in lower scale and price point.

You can use its basic cross platform UI or grab the windows handlers and make native UI per each platform.

But I must say, writing UI per each platform could end up as a complex task that isn’t always worth it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.