Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Passing arguments or environment variables to an app #13

Open
judofyr opened this Issue · 5 comments

4 participants

@judofyr

I'm going to use MacGap for tiny utilities on the command-line and need a way to pass arguments to the app.

I guess macgap.env is simplest; then I can simply call (probably wrapping it in a shell script):

SOMETHING=foo App.app/Contents/MacOS/App
@maccman
Owner

Sounds like a plan - make it :)

@judofyr

I just realized that it might be useful to send "messages" to an app that's running. What's the best way to accomplish that? AppleScript?

@liamks

@judofyr are you hoping to have a non MacGap app send messages to a MacGap app? Or messaging from one MacGap app to another? If it's the second option you can use websocket (although that relies on a server).

@judofyr

@liamks Non MacGap; more precisely: a shell script (which could of course invoke some AppleScript).

@subtleGradient

Cf. https://github.com/subtleGradient/Appify-UI
At Facebook, I'm writing an app using this. The startup script of my app is a bash script which then launches a node.js app that sets up an http server and then launches the PhoneGap mac binary using the node.js child_process module.
It then communicates with node.js via socket.io. I need to port it over to MacGap soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.