Make Windows App into Mac App

I’m very new to Xojo although I’ve played around a little here and there.

So I built a nifty Window app and now want to make it into a Mac app. I don’t see any property etc to change the target OS. How do I do this? Any help is appreciated.


In the navigator pane (left side) of your app, way at the bottom of the list, is Build Settings. Probably just “This Computer” is checked. Simply check the box for “macOS”. Then next time you do Project | Build Application, a Mac version will be built in a separate directory.


If you have used pure Xojo then that should (possibly) be all you need to do. If you’ve made API calls then you need to protect the Windows API calls in an:

#if TargetWindow
   //Windows API calls here

style block. You would then need to investigate thee macOS Versions of the API:

#if TargetWindows
   // Windows API
#elseif TargetMacOS
   // Mac API calls here

This just proves that my preconceived notion of where to find this option prevented me from looking beyond the pull down menus.

Good info on the compiler directive calls. I’m sure I’ll eventually use them.

thanks both.


You can also do Linux too :slight_smile:

On a related note, although compiling for macOS should be as simple as already mentioned – especially if not using OS specific declares – the actual DISTRIBUTION of macOS apps is not as straightforward as it once was due to Apple’s restrictions (nothing to do with Xojo per se).

If you are only distributing privately and have no plans to distribute via Apple’s macOS App Store, then you may not have to do anything else. But if you don’t have an Apple developer account and “sign” and “notarize” the app, then users may be blocked from installing or opening the app without an extra step, depending on what macOS release they are running.

Like many here, I use an Apple developer account to get a “certificate” to identify me and then use a program called App Wrapper to simplify the sign and notarize process for easier distribution outside the App Store. It can be done without that program, but I wanted to be sure you were aware that Apple does have some extra hoops to jump through on more recent OS releases.

I let my Apple developer subscription lapse several years ago. I attached a screen snapshot from the execution of my app on a Mac. Any thoughts?? Video failure? Perhaps if i used the App Wrapper this wouldn’t happen?


I think that’s the GraphicalDisplay option: DesktopDateTimePicker — Xojo documentation