I wish to achieve something like that:
@unavailable(iOS 11.0, *) func oldWay() { ... } @available(iOS 11.0, *) func newWay() { ... } I've tried things like @available(iOS 11.0, unavailable, *) but it does not compile.
My problem is that I'm conforming to an Objective-C protocol with optional methods. Some of them are only available since iOS 11, my app is available since iOS 10 and I don't want to have both methods implemented for a given platform.
For instance if I do this:
func oldWay() { ... } @available(iOS 11.0, *) func newWay() { ... } Both methods are implemented on all platforms since iOS 11... That's not what I'm looking for.
So if anyone has an idea...