Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is SwiftUI backwards-compatible with iOS 12.x and older?

If I have an app made with SwiftUI, will it work for iOS below iOS 13?

like image 706
Ted Avatar asked Sep 26 '22 11:09

Ted


People also ask

Can SwiftUI run on iOS 12?

SwiftUI runs on iOS 13, macOS 10.15, tvOS 13, and watchOS 6, or any future later versions of those platforms. This means if you work on an app that must support iOS N-1 or even N-2 – i.e., the current version and one or two before that – then you will be limited in terms of the features you can offer.

Is Swift backwards compatible?

Starting in Xcode 13.2, Swift's new suite of concurrency features are now backward compatible all the way back to iOS 13, macOS Catalina, watchOS 6, and tvOS 13. The new concurrency features include async/await, actors, structured concurrency, async sequences, and more.

Is iPhone 12 backwards compatible?

no iPhone is backwards compatible ( with a few exceptions, e.g. screen to 12 and 12 pro - it's the same screen) ) and the ability to program accessories, battery and screen ends with the model 11 (probably will never come back on newer models).

Does Xcode 11 support iOS 12?

Creating an app with Xcode 11 has a little bit of a hidden issue, it does not allow you to run the app on iOS 12 or lower out of the box. There are a few changes that need to be made in order to get your app to work on the older versions of iOS.


1 Answers

I just checked it out in Xcode 11 and can confirm it won't be backwards-compatible, as can be seen in SwiftUI's View implementation:

/// A piece of user interface.
///
/// You create custom views by declaring types that conform to the `View`
/// protocol. Implement the required `body` property to provide the content
/// and behavior for your custom view.
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
public protocol View : _View {

    /// The type of view representing the body of this view.
    ///
    /// When you create a custom view, Swift infers this type from your
    /// implementation of the required `body` property.
    associatedtype Body : View

    /// Declares the content and behavior of this view.
    var body: Self.Body { get }
}
like image 106
fredpi Avatar answered Oct 06 '22 18:10

fredpi