diff --git a/lib/devices/ios/ios.js b/lib/devices/ios/ios.js index 43ee3f3f..3be9e5ec 100644 --- a/lib/devices/ios/ios.js +++ b/lib/devices/ios/ios.js @@ -825,7 +825,7 @@ IOS.prototype.detectUdid = function (cb) { } if (stdout && stdout.length > 2) { - this.args.udid = stdout.replace("\n", ""); + this.args.udid = stdout.split("\n")[0]; logger.debug("Detected udid as " + this.args.udid); cb(); } else {