Thank you for the response edford!
Indeed, I am aware that the monolith approach we started on many years ago was wrong and it's clear we need to further break down our dependencies after de-spaghettifying our code.
Unfortunately the map file didn't help so first I tried to identify and remove anything that belongs to AVKit (AVPlayerViewController, AVPictureInPictureController) but I'd still end up with +[AVSecondScreenController load] being called at one point so the issue was indeed an indirect dependency.
I replicated our dependency graph in an empty project and then started experimenting with it, removing stuff that made might have been connected to AVKit, until eventually I found out what the "problem" was, which was QLPreviewController- whenever I had a reference to its initializer anywhere, this would trigger a load of AVKit and the call to the second screen class initializer.
Considering my service library which is included from the main app and the extension targets, is there a way to selectively decide at runtime whether to load a framework or not? There isn't one as far as I know.
Thanks!