ScreenSaverView NSBundle

Apparently the NSBundle that is available for macOS screensavers isn't the same as the usual [NSBundle mainBundle]. Instead one needs to use something like this when dealing with the ScreenSaverView:

NSBundle *bundle = [NSBundle bundleForClass:[self class]];
// and then load an image, or something
NSImage *image = [bundle imageForResource:@"gopher"];

Maybe this is documented somewhere, but I seem to have missed it until I came across this helpful comment after much frustration.