I have created a repository for the project where the issue occurs.
In my environment, the issue arises with the following minimal code:
import SwiftUI
import MapKit
struct ContentView: View {
@State private var region = MKCoordinateRegion(
center: CLLocationCoordinate2D(latitude: 35.6844779, longitude: 139.7512224),
span: MKCoordinateSpan(latitudeDelta: 0.05, longitudeDelta: 0.05)
)
var body: some View {
Map(coordinateRegion: $region)
}
}
#Preview {
ContentView()
}
I believe it's not a program bug but rather an issue with the iOS simulator. When the Excluded Architectures setting is enabled, the following problems occur:
- The app freezes when displaying SFSafariViewController
- The app freezes when displaying UIImagePickerController
- The map appears in red when using MapKit