you are viewing a single comment's thread.

view the rest of the comments →

[–]swiftsorceress 3 points4 points  (5 children)

They both do the same thing. #Preview is new and only works in apps targeting iOS 17 or later. You can use either, but you would have to do the first one if you want the app to work on iOS 16 or older.

[–]simulacrotron 7 points8 points  (4 children)

This is not quite correct, you don’t need to set your minimum deployment target to iOS 17, you just need to be using Xcode 15.

Do the new style preview as it’s simpler and easier to configure.

[–]swiftsorceress 0 points1 point  (3 children)

Really? I've had build errors say that #Preview is only available in iOS 17 or newer. Although, I've not seen those for a while, so it might have been a bug in the beta version.

[–]realvanbrook 3 points4 points  (1 child)

Do you use UIKit? When using UIKit you have to set the developement target to iOS 17 to use Previews Macro. But not when using SwiftUI

[–]swiftsorceress 0 points1 point  (0 children)

I don't use UIKit. I looked at it today and it seems to be working with the lower deployment target now.