Learning Objective-C fundamentals helps at first - to understand how methods and classes are working.
http://assets.iosappsdev.org/objective-c/tutorials/objective-c/index.html is a nice reference.
Working with Cocoa components, I can usually find what I need with just the Apple Developer references e.g. https://developer.apple.com/documentation/appkit/nswindow?language=objc. I haven't found that I've needed a huge amount of Cocoa, as I tend to develop plugin UIs in web for speed and convenience. If you're using
skpm, you can get this easily with https://github.com/skpm/sketch-module-web-view
When it comes to working out how to do exactly what you want, sadly, headers are your best bet. Sometimes searching GitHub for previous plugin code is helpful, but you can't rely on that.
Learning how to parse and understand the headers comes with time. I tend to use one massive file with all the classes, so its easy to jump around and search. There is still an element of trial-and-error, using the
Run Script console to test whether a method does what you expect or not. I think eventually you understand how Bohemian likes to code things, and get a better sense of how a method will work.
If you're interested, you can create one big dump with
class-dump '/Applications/Sketch.app/Contents/MacOS/Sketch' > sketch_headers.h
class-dump comes from http://stevenygard.com/projects/class-dump/