For faster connection speed and more flexibility.
- Start Xcode in command line by running this in commandline
/Applications/Xcode.app/Contents/MacOS/Xcode - Start downloading of the simulator
- Cancel it. YES CANCEL IT!
- You will get a message like this:
| // Toggle this boolean to compare against stdlib: | |
| #if true // Stdlib version | |
| // Quick hack to avoid changing the AnyEquatable implementation below. | |
| extension Equatable { typealias EqualSelf = Self } | |
| #else // Modified version | |
| protocol Equatable { |
| struct CustomMatcher<Value> { | |
| let closure: (Value) -> Bool | |
| static func ~= (caseValue: CustomMatcher<Value>, switchValue: Value) -> Bool { | |
| caseValue.closure(switchValue) | |
| } | |
| static func ~= (caseValue: Value, switchValue: CustomMatcher<Value>) -> Bool { | |
| switchValue.closure(caseValue) | |
| } | |
| } |
| import Foundation | |
| func findFiles(rootPath: String, suffix: String, ignoreDirs: Bool = true) -> [String]? { | |
| var result = [String]() | |
| let fileManager = FileManager.default | |
| if let paths = fileManager.subpaths(atPath: rootPath) { | |
| let swiftPaths = paths.filter { $0.hasSuffix(suffix) } | |
| for path in swiftPaths { | |
| var isDir : ObjCBool = false | |
| let fullPath = (rootPath as NSString).appendingPathComponent(path) |
| import XCTest | |
| /// An expectation that is fulfilled when a Key Value Observing (KVO) condition | |
| /// is met. It's variant of `XCTKVOExpectation` with support for native Swift | |
| /// key paths. | |
| final class KVOExpectation: XCTestExpectation { | |
| private var kvoToken: NSKeyValueObservation? | |
| /// Creates an expectation that is fulfilled when a KVO change causes the | |
| /// specified key path of the observed object to have an expected value. |
For faster connection speed and more flexibility.
/Applications/Xcode.app/Contents/MacOS/Xcode| [].map.call(document.querySelectorAll('iframe[name=reminders]')[0].contentDocument.querySelectorAll('.reminder-not-completed-view .reminder-row .reminder-title'), function(el) { | |
| return el.textContent; | |
| }).join('\r\n'); |