Cocoa friends: Should I launch apps using SBApplication or NSWorkspace? Is there a run-down of the tradeoffs anywhere?
@MSch It doesn't seem like SBApplication provides a mechanism for passing environment variables to the launched app. Confirm/Deny?
-
-
@wycats confirm. if you want to launch “non-Mac” apps, like redis/etc I’d go with https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSTask_Class/Reference/Reference.html … -
@MSch Sadly, I want to launch Terminal with some ENV set. I've been using doScript, but it's pretty ugly. -
@wycats are you sure you want to do this? What if I already have Terminal running? You only want to open a new window/tab right? -
@MSch I am currently opening a new terminal window, then doScripting to it. It looks like LSOpenApplication might do the trick? -
@wycats nope, because you don’t want to launch a second Terminal.app, it’d show up a second time in the dock etc etc -
@MSch I actually do want to open a separate Terminal.app so it's clear it's an isolated Terminal. -
@wycats but keep in mind thou shalt not launch multiple processes of the same app because bad. -
@MSch it seems ok to do a dance to find the app and open a new window. Gotta ship this sucker though. - 5 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.