I am trying to launch an app, and open a specific document with it. For example, to launch Sublime Text, I can do it using the following call [[NSWorkspace sharedWorkspace] launchAppWithBundleIdentifier:@"com.sublimetext.3" options:(0) additionalEventParamDescriptor:nil launchIdentifier:nil];
How do I pass a url of a document to the app, to make Sublime Text open this document after launch? I believe this can be done using additionalEventParamDescriptor, but I can't find an example anywhere on how to build a correct NSAppleEventDescriptor for an "open document" event. Thanks!