The main problem that I figured out why it wouldn't work with me, is that the ARSCNView, which is a view for displaying AR experiences and that uses the camera, was not set to the view of the class itself.
//Set a global variable of ARSCNView var sceneView = ARSCNView! //Set sceneView to its own view self.view = sceneView
I would recommend to uses in the form of classes. So make a class like FaceTrackViewController or something and handle all your code in this way. You can also easier use inheritance of UIViewController and implement the delegate methods of ARSCNViewDelegate and ARSCNViewSession.
For other people reading this post:
This is the point where my camera works just fine, but the renderer methods (nodeFor anchor etc...) don't get called. Yes, I set the delegates of the earlier mentioned interfaces to self.
With some help of some friends on the interwebs, I got a possible answer to why it doesn't work. Apparently Swift Playgrounds uses iOS 12.0 SDK, and TrueDepth support was added in 12.1. So unless Apple updates the playgrounds app, I think we're out of luck of using the FaceTracking API.