Reply to User location undefined in SwiftUI Preview I had this same issue and it was because I hadn't requested location permissions in info.plist for my application. Once I added that permission and ran a build of my app, the SwiftUI previews allowed simulate location. UI Frameworks SwiftUI Jun ’24