Re: Launching another app with command line arguments

2020-06-21 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot to everybody for helping! I have tried a number of approaches. For the moment , I have settled for an app group container. Both apps are members of the same app group container. In that, app A creates a file with the flags, then launches app B, and B reads the flags file (if present

Re: Launching another app with command line arguments

2020-06-21 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot. I tried this in my app A , but I keep getting the error message launch path not accessible together with a stack trace. I am getting the url to my app B like this: url_ = NSWorkspace.shared.urlForApplication( withBundleIdentifier: "de.zach.AppB" ) which points to /priva

Re: Launching another app with command line arguments

2020-06-20 Thread Marco S Hyman via Cocoa-dev
> On Jun 20, 2020, at 4:31 PM, Gabriel Zachmann wrote: > >> >> If app B can be treated as a sub-process of app A you can use Process. I >> know that argument passing works with Process. > > Sounds good. How can A launch B as its sub-process? (and pass command line > arguments?) > > le

Re: Launching another app with command line arguments

2020-06-20 Thread Gabriel Zachmann via Cocoa-dev
> > Write stuff to location in file the other app knows about, then read it. > Interesting. Will that work with all the sandboxing? Can A create a file /tmp/info-for-B without any user intervention? Can B read it *and* delete it? smime.p7s Description: S/MIME cryptographic signature ___

Re: Launching another app with command line arguments

2020-06-20 Thread Gabriel Zachmann via Cocoa-dev
> > If app B can be treated as a sub-process of app A you can use Process. I > know that argument passing works with Process. Sounds good. How can A launch B as its sub-process? (and pass command line arguments?) smime.p7s Description: S/MIME cryptographic signature _

Re: Launching another app with command line arguments

2020-06-20 Thread Marco S Hyman via Cocoa-dev
> On Jun 20, 2020, at 4:16 PM, Gabriel Zachmann wrote: > > So, the new question is: is there any easy way how my app A can launch my app > B > and pass a simple piece of info from A to B, such as a boolean flag or an > integer? If app B can be treated as a sub-process of app A you can use P

Re: Launching another app with command line arguments

2020-06-20 Thread A. Reichstadt via Cocoa-dev
Write stuff to location in file the other app knows about, then read it. Sent from my iPhone > On Jun 20, 2020, at 16:17, Gabriel Zachmann via Cocoa-dev > wrote: > > Thanks a lot for your reponse. > > Yes , it is sandboxed. > > ... Argh, the *last* line of the docs of configuration.argument

Re: Launching another app with command line arguments

2020-06-20 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your reponse. Yes , it is sandboxed. ... Argh, the *last* line of the docs of configuration.arguments tell that those are ignored! :-( So, the new question is: is there any easy way how my app A can launch my app B and pass a simple piece of info from A to B, such as a boolean

Re: Launching another app with command line arguments

2020-06-20 Thread Marco S Hyman via Cocoa-dev
> > That works fine, *except* the command line arguments are not passed along :-( Is your app sandboxed? Arguments are ignored in sandboxed applications. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mo