I replicated code in WWDC2023-10043: Meet MapKit for SwiftUI (https://developer.apple.com/videos/play/wwdc2023/10043/ ) and everything worked fine except showing user location with UserAnnotation() which starts at 23:24 of the presentation.
Xcode console displays the following error:
CLLocationManager(<CLLocationManager: 0x600000008630>) for <MKCoreLocationProvider: 0x600003014510> did fail with error: Error Domain=kCLErrorDomain Code=1 "(null)"
The same error happens even with code as simple as the below:
import SwiftUI
import MapKit
struct ContentView: View {
var body: some View {
Map() {
UserAnnotation()
}
}
}
Error occurs with Preview, Simulator and iPhone device. Software being used are the latest beta versions: iOS 17 beta 5, Xcode 15 beta 6.