How to get the Unified Toolbar Style on BigSur with Xojo 2018 / 2019

This one is for the curious, the interested and for those few in need of a “do it yourself” way…

…all you’re going to see here you can also do with Plugins (instead of writing own Declares).
But most important: If you want to get a more convenient way with much-much more features → have a look at Ohanaware App Kit and App Wrapper.

If you’re still interested and curious - and would like to know how to get the new macOS Big Sur Toolbar style supported in a Xojo Version pre 2021 in a “do it yourself” way, then continue reading.

As an example I have used Xojo 2018r4 (which one might still be using with just API 1). The Declares (which you also find in this Forum) won’t work, because another requirement for this new Toolbar styles is the macOS 11 SDK (which Xojo Version pre 2021 don’t use for the Intel-64Bit macOS Builds).
So this requires some additional post processing of the built application using vtool (a Mach-O version number utility shipped with Xcode) to modify it accordingly…

If you ever need to do such a thing on your own (for the purpose such as this example shows - or others) then download a copy of this example project macOS: Toolbar style and study it yourself.

What it looks like:

1 Like

Please don’t change SDK version. This can lead to obscure bugs. You raise the version and the OS disables compatibility behavior, which may be required by the Xojo framework.
And that includes security enhancements the framework doesn’t know or handle.


As long as it’s understood that changing the SDK can have negative effects on an application, a simple enough mechanism is provided for undoing the SDK change (such as what App Wrapper provides), I don’t think developers should be afraid of this process, as it does offer benefits.

  • I was able to confirm that the SDK was preventing macBS UI elements from being utilized in a Xojo made application.
  • I was able to learn about and implement support for macBS UI elements last summer.
  • I was able to launch App Wrapper 4 and Iconographer Mini using macBS UI elements.
  • Provide public information on how to achieve certain macBS UI elements within Xojo.
  • Use a newer of Xojo to work on HDRtist and SVG Converter, as both these apps require an older SDK, which means I have to use reboot into an older version of the OS to run an older version of Xojo.
  • I had to extend my understanding of the Mach-O file format as I wrote the ability to change SDK in native Xojo code.
1 Like

Right. I am well aware of the possible effects. So I’ve added a word of caution to the example.

Changing the SDK Version leads to different runtime behavior. This is intended for the purpose of this Demo. However, this may lead to unexpected behavior in other situations since the Xojo Framework doesn’t know of this modification and therefore doesn’t support it officially.

But then again. This question has come up a couple of times. I think this example answers it and shows why - and what is involved if one wants/needs to work around it (or wants/needs to try it with an older Xojo Version, be it “just for fun”). Of course I can only recommend to use the latest Xojo 2021r1, which officially supports this and is linkinig against the macOS 11 SDK - so no workarounds needed.

Modifying/Changing the SDK Version also might be of interest once the next macOS version is coming up - for those few that want to prepare their Xojo built apps in advance. It usually takes quite some time until there is a new Xojo Version having official support for newer functionality.

Sam has pointed out other use cases.

Anyway - that’s why I’ve started this Thread with:

This one is for the curious, the interested and for those few in need of a “do it yourself” way…

As for me - at times I like to experiment. And that’s what this is about. Get to understand the limitations and possibilities with Xojo - and macOS. :wink: