@Override
protected int run() throws Exception {
Jenkins.getInstance().getInjector().injectMembers(this);
iOSDevice dev = devices.getDevice(device);
if (dev==null)
throw new AbortException("No such device found: "+device);
TaskListener listener = new StreamTaskListener(stdout,getClientCharset());
for (String bundle : files) {
FilePath p = new FilePath(checkChannel(), bundle);
listener.getLogger().println("Deploying "+ bundle);
dev.deploy(new File(p.getRemote()), listener);
}
return 0;
}