Support for new ScrollView APIs on iOS 16 and earlier

Will any of the changes to ScrollView announced in the Beyond Scroll Views talk be available on iOS versions pre-iOS 17 when XCode 15 is officially released? The documentation seems to say that the APIs will be iOS 17-only, but as we need to support older versions of iOS for our app, it means that we can't use any of the exciting new features (without effectively reimplementing the same on older versions of iOS). In particular, I'm interested in the new ScrollTargetBehavior API.

Replies

No is the short answer. If the documentation says iOS 17+, it means iOS 17+.

While you could be thinking that Apple could just use the @backDeployed attribute, it’s not that simple. It can only be applied to functions and computed properties and since the new scroll APIs require new types to work, it can’t be used.

This is usually how each release of SwiftUI has been: new features are only compatible from that version onwards.

You might hope that this could change with the official release later this year, but it’s unlikely.

Ah, that's a shame. I was hoping that the documentation was just classing everything as iOS 17 only until it was officially released, but doesn't sound like the case.

I've filed FB12315825 just in case.