Developing macOS apps

Hi all,

I’m not a total newbie to software development. I’m programming in PHP since many years. I’m about half through the ’ How to Make an App in 8 Days’ course and I love it. But I would like to start developing macOS apps rather than iOS apps.

How much sense do you think does it make to become a CWC+ member in this case?

Thanks a lot in advance
Jens

Hello Jens,

MacOS developer here. I’m still quite a beginner (I have only posted one app on the App Store so far), but I believe I can share my basic experience.

The way I like to think about developing for macOS is that it is a slightly more context specific way of developing for iOS. For instance, instead of the UI pushing to the edges of the screen as it does in iOS, macOS tries to squeeze your app as tightly as it can, so you have to include the necessary .frame() restrictions and .padding(). Additionally, you have to consider the macOS Menu Bar. The glorious thing about coding with Swift and SwiftUI is that many of the frameworks transfer easily across these different platforms (so if you learn iOS development, most of your skills will be relevant in macOS development). I completed the whole Launch Your First App (LYFA) CWC+ program following which I invested some time in learning how to develop for macOS. After creating the iOS version of my app for the LYFA program, I simply added macOS support in Xcode and went through step-by-step, fixing the minor issues and adding code here and there.

Now here’s the trick: to make a line of code run only on macOS, simply write,
#if os(macOS)
//Code here...
#endif
This works for restricting support to other Apple platforms as well.

So, my suggestion would be to complete the CWC+ LYFA program first (I would say 98% of the topics are applicable cross-platform), and then divulge into the world of macOS. CWC is not the only way to learn Swift, but from my experience, it certainly works!

I would love to help you out if you have any more questions!

Have a wonderful day.

All the best,
-Michael

Hi Michael,

thank you very much for your helpful answer :+1:
Much appreciated.

Best
Jens

Hello Jens,

Of course! If you run into any issues, just let me know (via a post on this forum) and I can help you out.

Have a nice evening.

-Michael :slight_smile: