Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old Platform Compatibility #416

Open
Sherlouk opened this issue Sep 20, 2023 · 2 comments
Open

Old Platform Compatibility #416

Sherlouk opened this issue Sep 20, 2023 · 2 comments
Labels
maintenance Anything related to maintenance (CI, tests, refactoring...)

Comments

@Sherlouk
Copy link
Collaborator

With recent discussions around async/await support (a modern pattern) and potential use of other newer APIs, it begs the question of how many versions of iOS, other Apple operating systems, Swift versions and package compiler versions should we support?

Currently we support iOS 10+ via CocoaPods but iOS 9+ via Swift Package Manager (SPM). We use Swift 5.2 and the v5.2 package tools. This is compatible with anything since Xcode 11.4 released in March 2020.

Under #273 it was clearly seen acceptable to increase this to iOS 12+ and Swift 5.6 (this change was reverted for an unrelated reason!)

It's worth thinking about the fact that Apple requires upgrading your Xcode every year to the latest major version, that's Xcode 14 now (Xcode 15 from April) which means the majority of consumers will be using at least Swift 5.7

Platform statistics show that the majority of users are on iOS 15+ - though of course some apps may choose for one reason or another to support older than that.

Async/Await was backported to iOS 13+, but this isn't the only reason to have this conversation!

Where do we want to draw the line? What should our minimum OS version be? When and why should this change/be reviewed?

@curquiza
Copy link
Member

Hello @Sherlouk

Where do we want to draw the line? What should our minimum OS version be? When and why should this change/be reviewed?

This is indeed a really good question.

In the other repos, we remove support of language versions that are EOL. We also discuss a lot with the community to make this kind of decision, especially on repos with a lot of users.

As maintainers, we also want to avoid too much maintenance. Everything is about finding the right balance 😄

I would love to hear your suggestion.

@curquiza curquiza added the maintenance Anything related to maintenance (CI, tests, refactoring...) label Sep 21, 2023
@Sherlouk
Copy link
Collaborator Author

The challenge here is there isn't really an "end of life" here from a users perspective. Similar to browser compatibility where there are still users on Internet Explorer but we have to draw a line somewhere.

Looking at popular frameworks within the Swift ecosystem we see a wide variety of answers here. I'm focussing on iOS as it's the most prevalent platform but standard practice is to set tvOS, macOS and other Apple systems to be the equivalent based on release date.

  • Alamofire - iOS 11 (Networking)
  • Kingfisher - iOS 12 (Image Caching)

Looking at some company SDKs:

  • Facebook SDK - iOS 12
  • Firebase - iOS 11

For something more immediately comparable, some search platforms:

  • TypeSense - iOS 13 (async support)
  • Algolia - iOS 9 (no async support)

Many packages with large audiences utilise conditional compiling when they add features like async/await, this allows users to have a modern interface while still maintaining and supporting users targeting older operating systems.

Users of TypeSense for Swift have commented on them only supporting async/await causing them problems, so clearly we're not at the point of being able to completely move in that direction without upsetting folks.

One point of note is that Apple in Xcode 15 only support on-device debugging for iOS 12 and later, so if Apple themselves don't feel the need for us to test iOS 11 or earlier then... should we?

Now that the statistics and information are out of the way, I'll surface an opinion:

  • We build using the latest Xcode version available for general release (currently Xcode 15)
  • We support the operating systems that the above Xcode version itself supports (currently iOS 12+)
  • We support the Swift version released at the time of the oldest operating system we support (currently 5.5)

I don't think this conversation needs to be concluded right now, and we can wait for more opinions and/or situations where we need to upgrade for the success of the project. We're not there yet, and I think the work to add async/await support should be done in a backwards compatible way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Anything related to maintenance (CI, tests, refactoring...)
Projects
None yet
Development

No branches or pull requests

2 participants