title: How to pass arguments to an IPA while deploying it on the device?
body: <p>To automate my app, I need to pass some parameters to the built IPA as I deploy it on various devices and run my automation. From various threads I figured I can use "ios-deploy" (<a href="https://github.com/phonegap/ios-deploy" rel="nofollow">https://github.com/phonegap/ios-deploy</a>), a project forked from the fruitstrap project, to successfully deploy an IPA to device via the command line on my terminal. Although ios-deploy documentation suggests it has an option to provide arguments to pass to the app when launching it by using <code>-a</code> or <code>--args</code>, it didn't quite work for me. Rather I am not sure how to read these arguments inside the app. I have tried reading from <code>[[NSProcessInfo processInfo] arguments]</code> as well as NSUserDefaults method (<a href="http://perspx.com/archives/parsing-command-line-arguments-nsuserdefaults" rel="nofollow">http://perspx.com/archives/parsing-command-line-arguments-nsuserdefaults</a>) and neither are reading the arguments that I am sending to the IPA via <code>ios-deploy -a</code>. These methods work fine if I am building app on XCode and sending arguments (Edit Scheme->Run->Arguments->Arguments passed on launch).</p>
  
  <p>Can someone who has used ios-deploy provide an example on how to use the <code>-a</code> option? Or Is there any other way to launch an IPA (after passing arguments) to a device on the CLI.</p>