Post

Replies

Boosts

Views

Activity

Reply to Use SwiftUI for iOS 13+ with some fallback mechanism for iOS 12 and lower.
Thanks andy_ . When I try the approach you've mentioned, It works when running the project on an iOS 13 simulator but when I change to an iOS 12.4 simulator, compilation errors are raised. My project targets iOS12.4, the SwiftUI.framework has been added and conditionals have been applied. Anything I'm missing or is it just that the project must target iOS 13? Below is an example where all the View references produce compilation errors: @available(iOS 13, *) struct HomeSUIView: View { /* ERROR: use of undeclared type 'View'	*/     var body: some View {	 /* ERROR: use of undeclared type 'View' */ /* ... */     } } @available(iOS 13, *) struct HomeSUIView_Previews: PreviewProvider { /* ERROR: use of undeclared type 'PreviewProvider' */     static var previews: some View { /* ERROR: use of undeclared type 'View' */         HomeSUIView()     } }
Jul ’20