diniska / swiftui-wrapping-stack

A SwiftUI Views for wrapping HStack elements into multiple lines
MIT License
84 stars 20 forks source link

Package platform versions #8

Open josh150 opened 2 years ago

josh150 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

What target are you building for with fastlane

josh150 commented 2 years ago

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 commented 2 years ago

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.