Hi,
I'm trying to Display a MapView like the sytem Maps app does in a Widget.
I thought the best way would be to encapsulate the Mapview in a UIViewRepresentable like this:
And show it like this in my Widget:
Unfortunately this leads to this error:
I also tested this with other UIKit classes and it leads to the same error
I'm trying to Display a MapView like the sytem Maps app does in a Widget.
I thought the best way would be to encapsulate the Mapview in a UIViewRepresentable like this:
Code Block struct MapView: UIViewRepresentable { func makeUIView(context: UIViewRepresentableContext<MapView>) -> MKMapView { let mapView = MKMapView() return mapView } func updateUIView(_ view: MKMapView, context: UIViewRepresentableContext<MapView>) { } }
And show it like this in my Widget:
Code Block struct MapWidgetEntryView : View { var entry: Provider.Entry var body: some View { VStack { MapView() } } }
Unfortunately this leads to this error:
Code Block RemoteHumanReadableError: The operation couldn’t be completed. (BSServiceConnectionErrorDomain error 3.) BSServiceConnectionErrorDomain (3): ==BSErrorCodeDescription: OperationFailed
I also tested this with other UIKit classes and it leads to the same error