Skip to content

Commit

Permalink
make project compatible with Simulator configuration and code swift 4…
Browse files Browse the repository at this point in the history
… and Xcode 9 beta 6
  • Loading branch information
Vincent Saluzzo committed Sep 8, 2017
1 parent ac43463 commit e1cc71a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OpenSim/Application.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ final class Application {
init?(device: Device, url: Foundation.URL) {
self.device = device
guard let contents = try? FileManager.default.contentsOfDirectory(at: url, includingPropertiesForKeys: nil, options: [.skipsSubdirectoryDescendants, .skipsHiddenFiles]),
let url = contents.last // url ".app" diretory
let url = contents.filter({ $0.absoluteString.hasSuffix(".app/") }).first // url ".app" diretory
else {
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions OpenSim/SimulatorController.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct SimulatorController {
}

var runtimes = [Runtime]()
for (runtimeName, deviceList) in devicesJson {
devicesJson.forEach({ (runtimeName, deviceList) in
let runtime = Runtime(name: runtimeName)
if let deviceList = deviceList as? [[String:String]] {
for deviceJson in deviceList {
Expand All @@ -45,7 +45,7 @@ struct SimulatorController {
}
}
runtimes.append(runtime)
}
})

let filteredRuntime = runtimes.filter { $0.name.contains("iOS") && $0.devices.count > 0 }

Expand Down

0 comments on commit e1cc71a

Please sign in to comment.