Skip to content

Conversation

palmerc
Copy link

@palmerc palmerc commented Jul 24, 2018

Sometimes you need to pass environment variables to the remote debugging session just like Xcode. I added the ability to do this.

@shazron shazron added this to the 1.9.4 milestone Jul 25, 2018
@phildow
Copy link

phildow commented Jul 30, 2018

Would love to see this merged into master. Thanks @palmerc!

@pachoo
Copy link

pachoo commented Sep 14, 2018

Agreed. I've tried starting ios-deploy in the -n mode, then manually setting the target env-vars, then running but no love. It seems having them added to the launch info is the trick.

@palmerc
Copy link
Author

palmerc commented Sep 15, 2018

If you look at what Xcode passes to the debugserver you'll see the that this environment variables are handled this way. I wish they'd accept this onto master

@shazron shazron closed this Jan 8, 2019
@shazron shazron reopened this Jan 8, 2019
@palmerc
Copy link
Author

palmerc commented Jan 14, 2019

@shazron this seems like something I should be able to get on master. Any particular reason you can't accept the PR?

@shazron
Copy link

shazron commented Jan 15, 2019

No reason, I haven't gotten around to testing the PR. Testing now.

@shazron
Copy link

shazron commented Jan 15, 2019

Tested with these, and they work well, I can see the env vars during runtime in my app:
ios-deploy -d -s "FOO=BAR" -b path/to/my.app
ios-deploy -d --env "FOO=BAR BAZ=FAZ" -b path/to/my.app

I am adding a review note above for two changes that are needed (docs)

@" -c, --detect only detect if the device is connected\n"
@" -b, --bundle <bundle.app> the path to the app bundle to be installed\n"
@" -a, --args <args> command line arguments to pass to the app when launching it\n"
@" -s, --envs <envs> environment variables to pass to the app when launching it\n"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to probably mention that key value pairs need to be space separated, e.g.
FOO=BAR BAZ=FAZ

Please also add an example in the Examples section of the README.md

Copy link

@shazron shazron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In summary:

  1. Update the CLI help text to show what the value or values needed (space separated key value pairs)
  2. Update the README.md with an example of how to use the command in the Examples section

@shazron shazron modified the milestones: 1.9.4, 1.9.5 Jan 15, 2019
@palmerc
Copy link
Author

palmerc commented Jan 15, 2019

@shazron I think that it should match your requested changes now.

@shazron
Copy link

shazron commented Jan 16, 2019

Tip for next time - don't squash your changes. It makes it easier for me to review any new changes since I last re-tested. If squashed, I would have to re-test the whole thing again if I doubt its veracity, but in this case through visual inspection from the previous it looks fine. GH has a way to squash it neatly when I merge it in.

@shazron shazron merged commit 3a1c562 into ios-control:master Jan 16, 2019
@gkassabli
Copy link

Hey! Sorry for bothering, but is there any chance to know when this might get in the release?
Thanks in advance!

@shazron shazron changed the title Add ability to inject arbitrary environment variables feat: add ability to inject arbitrary environment variables Jul 18, 2019
geekonion pushed a commit to geekonion/ios-deploy that referenced this pull request Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants