I have successfully followed https://blog.magicsketch.io/sketch-plugin-xcode-template-c8236a6f7fff to create a panel inside Sketch. Now I'm stumbling around as a first time user with objective-c, trying to do something interesting.
I managed to check if user selected a symbol instance:
id layer = self.selection[index];
NSString * class = NSStringFromClass([layer class]);
NSLog(@"Selected a symbol instance");