Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can SwiftUI 2.0 new features introduced in WWDC 2020 run on iOS 13?

SwiftUI has new features for Grid lists with lazy loading and PageView that I'm interested in implementing in my existing SwiftUI app compatible with iOS 13.

Let's say I compile my app in Xcode 12 and add these new codes, will it be compatible with iOS 13 devices? Or do i have to keep my existing code, and use the new one only if the user is running iOS 14?

Thank you

like image 306
Filipe Sá Avatar asked Jun 24 '20 11:06

Filipe Sá


People also ask

Does SwiftUI work on iOS 13?

Backward compatibility is still a problemSwiftUI is supported only from iOS 13 and higher. In 2019 and 2020 it was a serious problem.

Does SwiftUI work on iOS 12?

Where can SwiftUI be used? SwiftUI runs on iOS 13, macOS 10.15, tvOS 13, and watchOS 6, or any future later versions of those platforms.

What was the first iOS version where SwiftUI can be used?

First and foremost, SwiftUI can only be used from iOS 13 and up. Given that most apps these days need to be backward compatible one or two versions (i.e. iOS 12 and 11), you won't see many apps completely built with SwiftUI yet.

Is SwiftUI backwards compatible?

No backward compatibility First, because it lacks backward compatibility. SwiftUI is supported only on iOS 13 and higher. Even if this version of mobile OS is used by most iPhones & iPads, it still isn't by all of them. There are still many iOS-12-and-lower devices.


2 Answers

Let's say I compile my app in Xcode 12 and add these new codes, will it be compatible with iOS 13 devices?

No, it will require deployment target to be set to iOS 14.

Or do i have to keep my existing code, and use the new one only if the user is running iOS 14?

Yes, you will need to add new features conditionally using availability checkers.

like image 147
Asperi Avatar answered Sep 27 '22 19:09

Asperi


According to wwdc video SwiftUI 2.0 is for iOS 14 it mean the deployment target for app should be set to iOS 14. Apple says that iOS 14 can run on the iPhone 6s and later, which is the exact same as iOS 13. This means that any iPhone supported by iOS 13 is also supported by iOS 14. So without any second thought you can go ahead with new features of SwiftUI

like image 37
Aniket Prakash Avatar answered Sep 27 '22 19:09

Aniket Prakash