Tyler-Keith-Thompson / CucumberSwift

A lightweight swift Cucumber implementation
https://tyler-keith-thompson.github.io/CucumberSwift/documentation/cucumberswift/
MIT License
74 stars 19 forks source link

CucumberSwift doesn't compile with Xcode 15.3 #98

Closed stremsdoerfer closed 6 months ago

stremsdoerfer commented 6 months ago

Describe the bug When trying to build with Xcode 15.3. I get the following error in CucumberTest:

'addTeardownBlock' is only available in iOS 13.0 or newer

To Reproduce Steps to reproduce the behavior:

  1. Download zip of the project
  2. Open CucumberSwift.xcodeproj with Xcode 15.3
  3. Cmd + B
  4. See error

Expected behavior Project should build correctly.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Tyler-Keith-Thompson commented 6 months ago

I'll try to take a look, but my schedule is insane. Out of curiosity are you trying to build with just an ancient version of iOS? Or is this some bizarre eccentricity that only exists on Xcode 15.3?

stremsdoerfer commented 6 months ago

Nope, trying to build on iOS 17.4. Not sure why it pops up only now, since the library is iOS 10+. It doesn't look like anything is stopping this code from being called on that version. Happy to push a PR, if you feel like the answer may be to raise the minimum version or if you see a quick alternative.

Tyler-Keith-Thompson commented 6 months ago

How bizarre....they either rewrote part of XCTest in Swift or added a Swift interface in 15.3. It used to be an ObjC method which doesn't have availability. God only knows why they chose iOS 13 as a minimum.

Tyler-Keith-Thompson commented 6 months ago

5.0.1 should fix this by raising minimum versions since I didn't want to figure out how to get clever enough to call the old ObjC versions.

I'm gonna close this issue now because it should work, but please feel free to comment if something doesn't work.