SwiftUI Version

Is SwiftUI currently versioned like Swift the language or is treated more like UIKit where the version is attached to the OS release? So for example will the changes to SwiftUI found in Xcode 12, work on iOS 13? If not that means any new SwiftUI features/bug fixes will need to wait to be deployed until iOS 14 is released AND there is enough iOS adoption by the user base.

Thanks.
Answered by Frameworks Engineer in 613922022
JakeShort and neptunes are correct. SwiftUI is just like any other system provided framework. New types and methods are marked with @available() attributes so the compiler will warn you if you attempt to use them on an older OS. You can use various conditionals in your code to adapt to the availability of system frameworks by OS version. Check out more information here:

https://docs.swift.org/swift-book/ReferenceManual/Attributes.html#ID583
The changes/additions to SwiftUI are only going to be available on iOS 14 and beyond.

If you look at the list here, you can look for the items marked Beta, which are a part of the new SwiftUI additions and are only available on iOS 14 and beyond.


SwiftUI is a Framework as stated here. And also everything Jake said. You'll need the new Xcode for these things.
JakeShort and neptunes are correct. SwiftUI is just like any other system provided framework. New types and methods are marked with @available() attributes so the compiler will warn you if you attempt to use them on an older OS. You can use various conditionals in your code to adapt to the availability of system frameworks by OS version. Check out more information here:

https://docs.swift.org/swift-book/ReferenceManual/Attributes.html#ID583
11
Accepted Answer
Thanks for all the replies. It's unfortunate that like the other frameworks it's tied to the os version. Since it is an independent framework it would be nice if this could be deployed with the app similar to how Swift libraries were done. One of the frustrating things now is how long before new features, and in the case of something new like SwiftUI, bug fixes, can be adopted by users. Even when iOS14 is available in the Fall, it will be some time before a critical mass of users install it.
Unfortunately I doubt SwiftUI’s performance would be possible if it was a “normal” framework that is independent of the OS. Also it probably relies on the specific UIKit version that ships with the OS release.
Wouldn't it be mutual benefit if Apple made it open source? New Views will be delivered faster without waiting 1 year for a few new ones. The community will come up together with better usage and better approaches helping apple engineers. Support of the community is vital because developers use it in different type of apps and with different approaches. Apple team can't cover all the cases, an app should be more complex than Fruta to understand developers' pain and which direction SwiftUI is better to develop in. If you do if for the devs, please let us help you.
SwiftUI Version
 
 
Q