Bon Pasku,

I was wondering how I can extend AppDelegate of an iOS project so that it will also work under UIKit for macOS? I have been trying to add some menu items to the menu bar by trying to override the buildMenu-method in AppDelegate but it’s not possible.

I was following this article: https://www.zachsim.one/blog/2019/8/4/customising-the-menu-bar-of-a-catalyst-app-using-uimenubuilder

Thanks :slight_smile:

Bon Pasku!

What exactly fails? What language ar eyuo using, Swift or Oxygene? My git feeling is you need to find the right “real” name for buildMenu(with:) when implementing that method. Look at there Objective-C does for this.

Did I mention I hate how (a) Swift renames everything and (b) as a result, all online tutorials are ow becoming useless for anyone who wants to know what stuff is really called? :frowning:

Sorry, I was on vacation :smiley:
I will give it a second attempt today :slight_smile:

You might be right that it could be the Objective-C naming that’s needed in RO’s Swift.

I understand you don’t like the Swift naming of Apple but this keeps catching me off guard each time. Wouldn’t be possible to accept both :angel:

1 Like

Pro tip: in swift, you can (need to?) add “override” when implementing interface methods. if you dont get a warring w/o override (or get one with), then chances are you’re mot matching the interface. use Peek at Definition to see what the compiler thinks the interface looks like.

It should. of course matching interfaces or overrides is a bit more tricky. but for method calls/property access/enums/etc, you should be able to use the old and the new name (only the new one will show in CC). interfaces/overrides should be flexible too, but id have to look at a concrete test case to comment specifically.