I absolutely love SwiftUI

One of the final things I need to do for my Permissions Reset update is to build my own Update System.

I decided to use a single HTML file, that can be read in a browser, and the program. Once I decided on the structure and format, I needed a program to help me validate the page, and to use to build the update checking.

Two days later, I have a fully working validation app, this includes learning and writing the code to process HTML. It is built using a “Document based application” so it not only handles recent items and document re-opening for me, but as a side effect it auto re-loads the data when I save changes made externally.

I could build this UI in Xojo, but it alone would take me more than two days, especially if I wanted it to support native scrolling, alternating backgrounds etc. By using Live data in the SwiftUI preview, I was able to design and tweak the UI, all without having to run the application, this alone saves so much time.

With native support for SF Symbols, adding standard icons is an absolute breeze.

SwiftUI has really helped make Mac development more exciting (for me), and further cements how far outa the race Xojo is. At this point, I don’t think there is anything Xojo can do to catch up, but I believe they know that already.

Sure it’s not without it’s downfalls, adapting some of the work flows to the SwiftUI way, can be a massive paradigm shift, and sometimes feels like hacky spaghetti code. Alerts for instance feel unnatural, but I can see why they’ve done them this way.

Sam,

I never understood why you used Xojo since you seemed to be only concerned with the Mac

If one is only targeting Apple products, outside of the initial learning curve, there is not much of reason to use Xojo that I can see… More capabilities and the Apple tools are free.

From what I have heard, apparently in the past that learning curve for Apple tools was MUCH higher than it is now, bur Swift has significantly changed that.

Again from what I have heard, way back when on the Windows side Xojo, although not quite having as easy access to all the OS features, was reasonably capable compared to Visual Basic (which I never used)…

But that was then. Windows has been morphing a lot, and Xojo has not been keeping up…

So because of MS backward compatibility, Xojo Windows apps are functional and run, but without a lot of extra work, look dated, and one does not have simple access to many newer OS features.

These days I guess the learning curve would be bit higher for the Microsoft tools than for Xojo… But again If you are only targeting Windows why would you hitch your wagon to Xojo in the long term?

The only reasons these days to use Xojo IMO are if need X-platform, and/or if you already know Xojo, the time it takes to get up to speed with other tools.

  • Karen
5 Likes

Because I started with Xojo back in '98, where there were not that many options and I’d been tinkering with Visual Basic in Windows. I’d even written to Microsoft to ask 'em to port it to the Mac as I found working with CodeWarrior to be cumbersome and frustrating.

IMHO, I didn’t find Objective-C that difficult to learn, I’d actually started learning it as a means of improving my Xojo made applications. The only reason I went for Swift after deciding Xojo was truly dead, was because it’s where Apple is heading and I know Objective-C will one day be EOL.

This is their main problem for everything.

Same goes for the Mac, Linux, iOS, Android… etc… In fact…

Don’t be fooled that sticking with Xojo is going to save time, sure it doesn’t require learning a new language, but you’ll be losing out to features and functionality that is literally designed to save time over the long run.

Just like what I’m illustrating here, a Document Based App is awesome because you only need to write the code to read/write your data, your logic and UI code. The rest is handled for you. You don’t even need to think about Window management, open, save dialogs, default menu items, auto saving, resuming etc etc.

I’m saving a lot of time, because I’m no longer fighting Geoff. Geoff decided that Xojo customers must use the old style and so Xojo wrote the code to enforce that. If they’d done nothing, Xojo apps would have gotten the default modern toolbar style. I even confronted him on this and he told me point blank it’s what their customers want.

Oh and take a look at how easy it is to build a database with SwiftData… It’s almost absurd.

I did some research into x-plat Declarative UI tools (SwiftUI etc) and there’s quite a few.
https://ohanaware.com/blog/2023/10/Declarative-UI-is-the-future..html

And there’s probably quite a few which are not Declarative UI either, but I didn’t research those.

Hi Sam,

Do you know if you can create Windows apps with Swift? A few weeks a go I looked for using Swift on Windows. I found out that you can hire “Mac in the Cloud” to run the Mac Os.

Can I install Swift on it and generate Windows/Mac runtimes?

My understanding is the SWIFT for non-Apple platforms is not ready for prime-time (yet)… And there is nothing like Xcode, and little if any support of native GUI controls

Have look here: https://www.swift.org/about/

Technically you can, but only for Command Line apps. Gui apps are not supported on Windows or Linux (at the moment).

There’s a transpiler for porting SwiftUI apps to native Android, I’m hoping that there will be one for Windows at some point. Then again Apple is at the reigns of the Swift team, so…

I mentioned in another thread, there’s a handful of Declarative UI languages, some of which already support Windows, I collected the ones I found on this page.
https://ohanaware.com/blog/2023/10/Declarative-UI-is-the-future..html

No you can’t but do check out

and

The compiler it free and it supports building software for xPlatforms.