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

Package platform versions #8

Open
josh150 opened this issue Feb 15, 2022 · 4 comments
Open

Package platform versions #8

josh150 opened this issue Feb 15, 2022 · 4 comments

Comments

@josh150
Copy link

josh150 commented Feb 15, 2022

Why are the platform versions set so low in the Package.swift? SwiftUI isn't even supported below 13 and you have all your code behind availability checks for 14. Why not just set the package to v14 instead of v9?

I ask because I'm running into CI issues with Fastlane where building for localization export fails because it can't find any of the SwiftUI APIs.

@diniska
Copy link
Owner

diniska commented Apr 27, 2022

We use v9 because the latest Xcode supports building applications with v9 at the moment. If we set v14 - this will prevent building the applications with support of the devices with lower versions.

@diniska
Copy link
Owner

diniska commented Apr 27, 2022

What target are you building for with fastlane

@josh150
Copy link
Author

josh150 commented Apr 27, 2022

I made my own fork and moved on so it's been a while. From what I can remember, the general issue is that the availability blocks in the code are only enforced at runtime (not compile time). So if you have your min versions set before SwiftUI existed then you need to use compiler directives to check if SwiftUI can be imported.
#if canImport(SwiftUI)

I believe this was surfacing when running package tests and/or exportLocalizations directly from CLI.

@codesplode
Copy link

In going through all the forks of this repository for another issue we are looking at, I noticed at least 6 or 7 separate branches (not forked from each other) that were only 1 commit ahead because of changing the platform versions to 13+.

Not many people visit every fork of a project, so I figured this information might be useful as an idea of how many people are forking specifically to change this one aspect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants