Would you be willing to use NSAppleScript
to do it?
NSAppleScript *script = [[NSAppleScript alloc]
initWithSource:@"tell app \"Spotify\" to launch"];
NSDictionary *errorInfo;
[script executeAndReturnError:&errorInfo];
if (errorInfo) {
NSLog(@"error: %@", errorInfo);
}
You have to use the application name, not its bundle ID.