VLC’s macOS UI module is built using Objective-C and AppKit, so in this respect it’s pretty similar to any other AppKit project.

That’s not the case with the build system. VLC is built with Autotools rather than with Xcode, so build definitions for each source file are contained within a Makefile.am file, just like with everything else in the VLC build tree. (In this case, that would be under modules/gui/macosx).

We do ship a Xcode project that allows you to work on VLC through Xcode (located under extras/package/VLC.xcodeproj), but you will still have to deal with the makefile described above.

Maybe you don’t want to deal with Xcode at all, and would rather use a different IDE. Objective-C is fully supported by clangd after all. If you open the project in an editor like VSCode or Kate with the clangd extension, though, you’ll get hit with a ton of errors in the buffer — even though VLC itself builds fine.

Update the Xcode project!

Even if you do go with an editor other than Xcode when working on the macOS UI, other community members work on this module with Xcode. When you create new files with other editors or IDEs, they won’t show up in Xcode! You will need to update the xcodeproj (and, specifically, the project’s pbxproj) to address this. The easiest way to do this is to open Xcode and manually add the missing fils.

For proper clangd LSP support in IDEs such as VSCode:

  1. Add a compile_flags.txt in your root source directory for VLC
  2. Add the following compile flags:
-Iinclude/
-Iinclude/vlc/
-Ibuild/include/vlc/
-Ibuild/include/
-Ibuild/
-Imodules/codec/
-Imodules/gui/macosx
-Lbuild/macos-install/lib
-lvlccore
-fobjc-arc

This compile_flags.txt assumes your build folder is called build and is located within your source directory. You will need to adjust the include flags here if that is not the case.

Enjoy proper error checking, code navigation features, and other fancy clangd features :)