P.S. For anyone who's curious about exporting a Swift framework to Sketch here's how I did it:
1. Set 'Always Embed Swift Standard Libraries' = YES.
2. Mark any classes you want to access from cocoascript with the following notation:
public class ClassName
@objc public class ClassName as Apple's documentation suggests. When you use the latter notation, XCode assigns an auto-generated name to your class making it impossible to access from cocoascript using a predictable name.
3. Mark any functions you want to access from cocoascript as
@objc public func myFunction()
4. Under Target > Build Phases > Headers, be sure that the classes you want to access from cocoascript are Public (for some reason, XCode doesn't always do this automatically).