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

Add iOS, watchOS and tvOS min targets to Package.swift #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

azarovalex
Copy link

@azarovalex azarovalex commented Dec 2, 2023

The package uses async/await, ContinuousClock and some other API only available from iOS 16.

Right now Package.swift doesn't specify minimum supported targets for all the platforms except for macOS, so trying to clone and build the repo in Xcode can result in errors, even though you can run the main executable target on any platforms, including iOS.

Even though it's not common to run executable targets on iOS/tvOS or watchOS, some developers use AOC as an opportunity to try a new language, in our case Swift, it would be nice to make the setup process as smooth as possible.

@MaxDesiatov MaxDesiatov added the bug Something isn't working label Dec 2, 2023
Copy link

@Jahmes777 Jahmes777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using it

@rauhul
Copy link

rauhul commented Dec 6, 2023

Does SPM support visionOS? if so could you update this PR with that platform as well?

@azarovalex
Copy link
Author

azarovalex commented Dec 6, 2023

@rauhul It does since this package specifies swift-tools-version: 5.9. By default, SPM assumes visionOS v1, which roughly corresponds to iOS 17 and already supports all the APIs this package uses, so we don't have to set the version explicitly.

We might want to be extra explicit and specify it anyway, but these platforms are optional, so I think that the high-level idea of SPM is that by not specifying a platform we are saying that "it will work on any version", which is true for visionOS, but not true for iOS, tvOS or watchOS for which we set the supported versions in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants