This option has a performance pitfall, cause it's using a for-in to iterate in characters.
let str: String = String(attrStr.characters)| /// First option: if you have a reduced number of tests with this issue. | |
| @available(iOS 17.0, *) | |
| class FirstOptionTests: XCTestCase { | |
| func testStuffOnlyAvailableInIOS17() throws { | |
| guard #available(iOS 17.0, *) else { | |
| throw XCTSkip("Trying to run code in an unsupported iOS version") | |
| } | |
| // All the stuff just available since iOS 17.0 | |
| } |