10

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

Filipe Sá
  • 372
  • 1
  • 5
  • 15
  • 2
    Just use @available inside your code to add features which are only available in iOS14 to make it backwards compatible – davidev Jun 24 '20 at 11:26

2 Answers2

14

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.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Asperi
  • 228,894
  • 20
  • 464
  • 690
7

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

  • 6
    Yes, I know, but I need do keep the app iOS 13 compatible because not everyone update their devices software right away – Filipe Sá Jun 24 '20 at 13:22