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" (https://github.com/phonegap/ios-deploy), 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 -a
or --args
, 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 [[NSProcessInfo processInfo] arguments]
as well as NSUserDefaults method (http://perspx.com/archives/parsing-command-line-arguments-nsuserdefaults) and neither are reading the arguments that I am sending to the IPA via ios-deploy -a
. These methods work fine if I am building app on XCode and sending arguments (Edit Scheme->Run->Arguments->Arguments passed on launch).
Can someone who has used ios-deploy provide an example on how to use the -a
option? Or Is there any other way to launch an IPA (after passing arguments) to a device on the CLI.
main
function?NSProcessInfo
should probably contain the same ones but maybe there is a difference. – Armin