Skip to content

Commit cb8f4d5

Browse files
committed
Merge pull request #25 from telerik/cankov/command-line-args
Pass the 'args' options to the simulator
2 parents b273721 + 07d86f8 commit cb8f4d5

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

lib/iphone-simulator.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/iphone-simulator.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ export class iPhoneSimulator implements IiPhoneSimulator {
146146
}
147147
}
148148

149+
if (options.args) {
150+
var args = options.args.trim().split(/\s+/);
151+
var nsArgs = $.NSMutableArray("array");
152+
args.forEach((x: string) => nsArgs("addObject", $(x)));
153+
config("setSimulatedApplicationLaunchArgs", nsArgs);
154+
}
155+
149156
config("setLocalizedClientName", $("ios-sim-portable"));
150157

151158
var sessionError: any = new Buffer("");

0 commit comments

Comments
 (0)