snapshot/lib/assets/SnapshotHelper.swift in fastlane-2.129.0.beta.20190806200055 vs snapshot/lib/assets/SnapshotHelper.swift in fastlane-2.129.0.beta.20190807200122

- old
+ new

@@ -173,15 +173,15 @@ return } let screenshot = XCUIScreen.main.screenshot() guard var simulator = ProcessInfo().environment["SIMULATOR_DEVICE_NAME"], let screenshotsDir = screenshotsDirectory else { return } - + do { // The simulator name contains "Clone X of " inside the screenshot file when running parallelized UI Tests on concurrent devices let regex = try NSRegularExpression(pattern: "Clone [0-9]+ of ") - let range = NSMakeRange(0, simulator.count) + let range = NSRange(location: 0, length: simulator.count) simulator = regex.stringByReplacingMatches(in: simulator, range: range, withTemplate: "") let path = screenshotsDir.appendingPathComponent("\(simulator)-\(name).png") try screenshot.pngRepresentation.write(to: path) } catch let error { @@ -298,6 +298,6 @@ } } // Please don't remove the lines below // They are used to detect outdated configuration files -// SnapshotHelperVersion [1.20] +// SnapshotHelperVersion [1.21]