Display map or satellite imagery from your app's interface, call out points of interest, and determine placemark information for map coordinates using MapKit.

Posts under MapKit tag

60 Posts

Post

Replies

Boosts

Views

Activity

MapKit/VectorKit Crash – NSMallocException During Map Rendering
Dear Apple Developer Support Team, We are experiencing a crash in our iOS application that appears to originate within Apple's MapKit/VectorKit framework. Based on the crash logs, the failure occurs during map rendering operations inside VectorKit. The crash stack contains only Apple framework calls and does not include any application business logic methods. Crash Summary: Exception Type: NSMallocException Framework: MapKit / VectorKit Crash Location: VectorKit map rendering pipeline Observed Behavior: Application crashes while rendering map-related data Our analysis indicates that the crash occurs within Apple's native map rendering engine. Since the stack trace does not contain any application-specific code, we are unable to determine whether the issue is caused by framework behavior, an OS/device-specific condition, or a framework-level defect. We would appreciate your assistance in reviewing this issue and advising whether there are any known MapKit/VectorKit issues related to this crash signature. We can provide additional crash logs, device details, and reproduction information if required. Thank you for your support. Kind Regards, Yogesh Raj Ushyaku Software Solutions LLP
0
0
24
1d
MapKit MapCamera
SwiftUI Map with MapCamera jerks on every GPS update instead of animating smoothly I'm trying to make camera to follow the user smoothly during navigation using MapCamera with heading and pitch, similar to Apple Maps or Google Maps. The camera updates on every GPS tick but instead of animating smoothly between positions it jerks , it snaps to the new position, pauses, snaps again, pauses...terrible UX. The blue user location (UserAnnotation) puck moves completely smoothly. Only the camera jerks I have tried all sort of animations and interpolation you may think of. Something is just not right, must be something missing from the puzzle. I have prepared a minimal reproducible example so you can copy and paste the only thing needed is to add the Privacy - Location When In Use Usage Description Run in Simulator, go to Features > Location > Freeway Drive and tap on Track then you'll notice how camera is following then stop then following and stops again Don't bother using AI, he has no clue what's this all about. I also went through docs to find anything useful like a magic modifier, but no joy Here is a video hosted online as well: [https://streamable.com/ear9cv] And a code snippet copy paste import MapKit import CoreLocation // You'll only need to add Privacy - Location When In Use Usage Description to the Info tab struct ContentView: View { @State private var locationManager = LocationManagerDelegate() @State private var cameraPosition: MapCameraPosition = .userLocation(followsHeading: false, fallback: .automatic) @State private var isTracking: Bool = false @State private var lastKnownHeading: Double = 0 var body: some View { Map(position: $cameraPosition) { UserAnnotation() } .onChange(of: locationManager.location) { _, location in guard isTracking, let location else { return } withAnimation(.linear(duration: 0.5)) { cameraPosition = .camera(MapCamera( centerCoordinate: location.coordinate, distance: 1000, heading: location.course, pitch: 60 )) } } .safeAreaInset(edge: .bottom) { // Added to the safeAreaInset to keep the Apple Logo visible Button("Track") { isTracking.toggle() locationManager.requestPermission() locationManager.startNavigating() } .buttonStyle(.glassProminent) .buttonSizing(.flexible) .controlSize(.extraLarge) .padding(.horizontal) } } } @MainActor @Observable final class LocationManagerDelegate: NSObject, CLLocationManagerDelegate { var location: CLLocation? var authorizationStatus: CLAuthorizationStatus = .notDetermined let manager = CLLocationManager() private var liveUpdateTask: Task<Void, Never>? override init() { super.init() manager.delegate = self manager.desiredAccuracy = kCLLocationAccuracyBestForNavigation authorizationStatus = manager.authorizationStatus } func requestPermission() { manager.requestWhenInUseAuthorization() } func startNavigating() { liveUpdateTask = Task { do { for try await update in CLLocationUpdate.liveUpdates(.automotiveNavigation) { guard let newLocation = update.location else { continue } self.location = newLocation } } catch { print("Live updates error: \(error)") } } } func stopNavigating() { liveUpdateTask?.cancel() liveUpdateTask = nil manager.requestLocation() } func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { location = locations.last } func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) { authorizationStatus = manager.authorizationStatus } }
0
0
26
2d
MKLocalSearch not returning Places in the specified region
Hi- I've never posted on here before! But ChatGPT hasn't been helpful with this. I have a call using MKLocalSearch (i have a waddled down version below) let region = MKCoordinateRegion( center: location, // the user's location span: MKCoordinateSpan( latitudeDelta: 0.005, longitudeDelta: 0.005 ) ) let req = MKLocalPointsOfInterestRequest(coordinateRegion: region) req.pointOfInterestFilter = MKPointOfInterestFilter(including: [.nightlife]) let search = MKLocalSearch(request: req) I made the latitude and longitude the lowest they can possibly be without throwing an error. Sometimes (and unreliably) when the user's location is at say, a bar, this list will give me like 10 bars that are not even within the region, and exclude the bar that the user is actually present in. How can i make this not the case? In other words, I just want this to return what I expect: a list of POIs with the category .nightLife within the defined region. Any help would be appreciated!
1
0
243
5d
Maps for specific type of car
Hi there, I am currently developing an app for a specific type of car that cannot/is not allowed to drive everywhere in the Netherlands. I know there is a feature for avoiding highways. However, this is not enough. It also involves a special sign that, once the driver sees it, prevents them from driving any further. My question is: Is there an API I can use to properly develop this? I look forward to your response(s). Regards, Sebastiaan
0
0
30
5d
Clustering on MapKit for SwiftUI iOS17+
Hi What would be the best way to achieve clustering on MapKit within SwiftUI? We're building a decentralized commerce auction platform that is currently live in Switzerland with 3'500 live auctions that can be discovered on a map. We're now running into the issue that the map gets cluttered, when zooming out and haven't been able to find a way to cluster We moved back to UIKit, where clustering works, but UIKit has other drawdowns. So ideally there is a way to handle it within SwiftUI without having to wrap UIKit or move back entirely to UIKit. Thanks for any help or suggestions! Developer Documentation https://developer.apple.com/documentation/mapkit/mapkit-for-swiftui Julius Ilg AuctionShack
3
1
334
5d
Placemark Deprecated
"Use location, address and addressRepresentations instead" Is it possible to know what kind of "Address" a MapItem is representing (State, County, Neighborhood etc) after a MKGeocodingRequest? Is it possible to find out the CLRegion or similar of an map item. (Now when we cannot read it from the Placemark)
4
1
629
2w
Is the MapKit Legal Notice required for displaying my own content?
If an application utilizes MapKit exclusively to render custom content via MKTileOverlay (with canReplaceMapContent = true to entirely suppress Apple’s default map layers), are developers still contractually or technically mandated to display Apple's default "Legal" link? Currently, the hardcoded Apple attribution document details extensive copyright disclaimers for data suppliers like TomTom, Acxiom, and Breezometer. When an application renders entirely standalone, proprietary, or open-source map tiles, displaying this link creates two distinct issues: User Confusion: It incorrectly implies to end-users that the custom data being viewed is sourced from or validated by Apple's third-party data partners. Attribution Inaccuracy: It forces the display of entirely irrelevant copyright data while doing a disservice to the actual copyright holders of the active custom tile layers, who require their own distinct, prominent on-screen credit. It would be a significant UX improvement if the framework could dynamically hide the global data attribution link when canReplaceMapContent is active, allowing developers to provide accurate, context-specific legal text for the data layers actually in use.
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
349
May ’26
MKMapView realistic elevationStyle cannot combine with overlays
I have an MKMapView displaying realistic elevation. As soon as I call "mapView.addOverlays([polylines])" which then trigger: func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer { if let polyline = overlay as? MKPolyline { let view = MKPolylineRenderer(polyline: polyline) // ... return view } return MKOverlayRenderer(overlay: overlay) } The map instantly turn flat until I remove all the overlays.
3
0
212
May ’26
MapKit SwiftUI Map with .standard(elevation: .realistic) falls back to 2D in globe mode, while .hybrid(elevation: .realistic) remains 3D
Overview When using SwiftUI Map with .standard(elevation: .realistic) and a globe-style presentation, the map unexpectedly renders as a flat 2D map instead of a 3D globe / realistic terrain view. In the same view, switching to .hybrid(elevation: .realistic) preserves the expected 3D globe behavior. This appears to be a rendering bug or regression specific to the .standard style under globe mode, not an app-level issue. The issue is reproducible in my app’s competition map screen and has also been reported by other developers online. Steps to Reproduce Create a SwiftUI Map. Bind it to a MapCameraPosition. Apply a standard map style with realistic elevation: .mapStyle(.standard(elevation: .realistic)) Configure the UI so the user can switch between: standard + globe hybrid + globe Zoom out / interact with the map in globe mode. Expected Results Map with .standard(elevation: .realistic) should continue to render with globe / 3D realistic terrain behavior, consistent with realistic elevation support and similar to .hybrid(elevation: .realistic). Actual Results When the map style is .standard(elevation: .realistic) in globe mode, the map falls back to a flat 2D-looking representation. Changing the same map to .hybrid(elevation: .realistic) restores the expected 3D globe rendering. Regression Unknown, but this appears to be unintended behavior because: realistic elevation is intended to provide realistic terrain / 3D map rendering, and there are no overlays in this map configuration that should intentionally force the map into a flat representation. Minimal Relevant Code From My App private enum CompetitionMapMode: String, CaseIterable { case satellite case explore func mapStyle(look: CompetitionMapLook) -> MapStyle { switch self { case .satellite: return .hybrid(elevation: look.elevation) case .explore: return .standard(elevation: look.elevation) } } } private enum CompetitionMapLook: String, CaseIterable { case globe case flat var elevation: MapStyle.Elevation { switch self { case .globe: return .realistic case .flat: return .flat } } } Map(position: $cameraPosition, selection: $selectedMapItemID) { UserAnnotation() ForEach(mapDisplayItems) { item in Annotation( item.title, coordinate: item.coordinate, anchor: .bottom ) { mapAnnotationView(for: item) } .tag(item.id) } } .mapStyle(mapModeSelection.mapStyle(look: mapLookSelection)) Why I Believe This Is a Framework Bug The same Map instance renders correctly in 3D when using: .hybrid(elevation: .realistic) but falls back to 2D with: .standard(elevation: .realistic) under globe mode. This suggests the issue is tied specifically to the .standard rendering path in SwiftUI Map / MapKit, rather than camera state, annotations, or location handling. My map does include annotations, but it does not add overlays that would intentionally flatten realistic terrain. Environment Xcode: Xcode 26.4 (17E192) SDK: SDK Version 26.4 (23E237) Device: iPhone 17 Pro iOS version: iOS 26.5 Beta 2 Reproducibility: Always App type: SwiftUI app using MapKit Map Additional Notes The issue is visible in a production app screen, not only a toy sample. The problem appears style-specific: .standard(elevation: .realistic) → incorrect 2D fallback .hybrid(elevation: .realistic) → expected 3D behavior This makes standard map style unusable for globe presentation in my app.
1
0
317
Apr ’26
MapKit in SwiftUI
Anyone worked with MapKit's MapCameraPosition in SwiftUI? I'm building a navigation app and ran into a limitation I can't find a clean solution for when using .userLocation(followsHeading: true) MapKit takes full control of the camera, smooth heading tracking, follows the user automatically. Perfect. But there's no way to set a custom pitch (tilt) on it. The only initializer available is... .userLocation(followsHeading: true, fallback: .automatic) No pitch, no distance parameters.... The workaround I found is setting .camera(MapCamera(..., pitch: 60)) first, waiting 200ms, then switching to .userLocation(followsHeading: true), MapKit inherits the pitch from the rendered camera state before handing off to user tracking.... It works, but it's clearly exploiting an undocumented behaviour in MapKit's state machine rather than a proper API Has anyone found a cleaner way to achieve this? Or is UIViewRepresentable wrapping MKMapView the only proper solution? It would be awesome to have something like this cameraPosition = .userLocation( followsHeading: true, pitch: 60, distance: 800, fallback: .automatic )
1
0
181
Mar ’26
Maps: opening hours API / Property
I’m currently developing an iOS app that relies heavily on location details. I'm using MapKit and MKMapItem as my primary data source, which works perfectly for standard metadata. However, I’ve hit a roadblock: I want to display opening hours inline within my location details, but it seems Apple doesn't expose a public API or property for this in MKMapItem (even though the data is clearly visible in the native Apple Maps app). Since I'm building this as an indie developer/startup, the Google Places API is unfortunately too expensive for my current budget. ⁠Is there any legitimate, native way to get opening hours from Apple that I might have missed? ⁠If not, what are your best practices or recommended indie-friendly alternatives (e.g., Yelp Fusion API, OpenStreetMap, Foursquare)? Any tips on how to handle this elegantly and cost-efficiently would be highly appreciated! Thanks in advance.
2
0
523
Mar ’26
Swiftui Map Leagal Text is transformed when rotationEffect is applied to Map
I have a problem when applying rotationEffect to a map in in SwiftUI. The legal text in the map is transformed as shown in this image: The following code is part of a much larger and complex view; it is a minimal example to reproduce the error: import SwiftUI import MapKit struct ContentView: View { @State private var offset = CGSize.zero var body: some View { ZStack { let drag = DragGesture() .onChanged { g in offset.width = g.translation.width offset.height = g.translation.height } Map(interactionModes: [.zoom]) .frame(width: 320, height: 220) .rotationEffect(.degrees(Double(offset.width / 12))) .highPriorityGesture(drag) } } } I hope you can help me with this problem.
2
0
176
Mar ’26
MKDirections returns "Directions Not Available" when A and B are outside mainland China (e.g. Tokyo–Osaka)
I use MapKit and MKDirections for driving directions. The error "Directions Not Available" appears when the two points (A and B) are outside mainland China (e.g. Tokyo → Osaka). For routes inside China (e.g. Shanghai → Beijing), the same code works. let req = MKDirections.Request() req.source = MKMapItem(placemark: MKPlacemark(coordinate: origin)) req.destination = MKMapItem(placemark: MKPlacemark(coordinate: destination)) req.transportType = .automobile MKDirections(request: req).calculate { response, error in // Tokyo–Osaka (outside China): "Directions Not Available" // Shanghai–Beijing (inside China): works } Questions: Is MKDirections intended to support only routes within the device’s region (e.g. China)? When A/B are abroad, is "Directions Not Available" expected? Is this documented? For cross-country or overseas routes (e.g. Tokyo–Osaka), what is the recommended approach—third-party routing API + drawing on MapKit? Thanks.
0
0
204
Feb ’26
`MKLocalSearchRequest` change in behavior
aka MKLocalSearch.Request in Swift. Today my users reported that our address auto-complete functionality was returning strange results. We narrowed the issue down to pointOfInterestFilter being set. Sample code below: MKLocalSearchRequest *request = [[MKLocalSearchRequest alloc] init]; request.region = self.region; request.naturalLanguageQuery = addressString; request.resultTypes = MKLocalSearchResultTypeAddress; request.pointOfInterestFilter = [MKPointOfInterestFilter filterIncludingAllCategories]; That last line is the problem. When I stopped setting request.pointOfInterestFilter the MKLocalSearch started working as it always had. To further hammer home the point, with request.pointOfInterestFilter unset I set resultTypes to MKLocalSearchCompleterResultTypePointOfInterest (aka .pointOfInterest) and the issue returned. It seems Apple made a change on their backend recently such that pointOfInterestFilter now overrides resultTypes.
0
0
187
Feb ’26
Quick Look Extension does not load MapKit map properly anymore, after macOS Sequoia
It appears that starting with macOS Sequoia, Quick Look Preview extension no longer loads MapKit maps correctly anymore. Map tiles do not appear, leaving users with a beige background. Users report that polylines do render correctly, but annotations appears black. This was previously working fine in prior macOS versions including Sonoma. STEPS TO REPRODUCE Create a macOS app project, with an associated document. Ensure project has a Quick Look preview extension, with necessary basic setups. Ensure that the extension mentioned in (2) must have a MKMapView. Any other cosmetic changes, etc, does not need to be implemented to observe the base issue. Do note that it has been reported that in addition to the map tiles not loading, annotations don't render correctly as well.
5
2
1.1k
Feb ’26
Disable userLocationAnnotation bubble
Hello, thanks for your effort! I found that when showsUserLocation is set to true (by default), the pulsing blue dot user location annotation is shown, which is cool and beautiful. However, it will automatically and periodically attempt to call the Apple Server API GET https://api.apple-mapkit.com/v1/reverseGeocode within userLocationDidChange() and updateUserLocationAnnotation() to display, I assume, the user's current address when single-tapping on the blue dot. It will significantly use the MapKit service calls quota since the user location is automatically updated. It almost runs out of quota even though the map initialization is plenty enough. Is there any way to disable the bubble behavior but preserve the user location blue dot, which is lovely and better than drawing my own user location dot? It seems I can only turn off all user location features. Many thanks!
2
0
218
Feb ’26
Does Showing User's Current Location on the Map Require 'NSLocationWhenInUseUsageDescription'?
I have a desktop application that shows some real estate properties chosen by the user. The application shows those GPP locations on the map. The SwiftUI code is something like the following. import SwiftUI import MapKit struct ContentView: View { var body: some View ZStack { mapView } } private var mapView: some View { Map(position: $propertyViewModel.mapPosition) { ForEach(propertyViewModel.properties) { property in Annotation("", coordinate: CLLocationCoordinate2D(latitude: property.lat, longitude: property.lon)) { Button { } label: { VStack { Image(systemName: "house.circle.fill") .resizable() .scaledToFit() .frame(width: 48) .foregroundStyle(colorScheme == .light ? .white : .black) ... } } .buttonStyle(.borderless) } } UserAnnotation() } .mapControls { MapUserLocationButton() } .mapControlVisibility(.visible) .onAppear { CLLocationManager().requestWhenInUseAuthorization() } } } The application only wants to use the CLLocationManager class so that it can show those locations on the map relative to your current GPS position. And I'm hit with two review rejections. Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage Issue Description One or more purpose strings in the app do not sufficiently explain the use of protected resources. Purpose strings must clearly and completely describe the app's use of data and, in most cases, provide an example of how the data will be used. Guideline 5.1.5 - Legal - Privacy - Location Services The app uses location data for features that are not relevant to a user's location. Specifically, the app is not functional when Location Services are disabled. So I wonder if the application is even required to have 'NSLocationWhenInUseUsageDescription' and/or 'NSLocationUsageDescription'? just in order to show user's current location so that they can see property locations relative to it? The exact location privacy statement is the following. The application needs your permission in accessing your current location so that it will appear on the map
1
0
339
Feb ’26
MapKit/VectorKit Crash – NSMallocException During Map Rendering
Dear Apple Developer Support Team, We are experiencing a crash in our iOS application that appears to originate within Apple's MapKit/VectorKit framework. Based on the crash logs, the failure occurs during map rendering operations inside VectorKit. The crash stack contains only Apple framework calls and does not include any application business logic methods. Crash Summary: Exception Type: NSMallocException Framework: MapKit / VectorKit Crash Location: VectorKit map rendering pipeline Observed Behavior: Application crashes while rendering map-related data Our analysis indicates that the crash occurs within Apple's native map rendering engine. Since the stack trace does not contain any application-specific code, we are unable to determine whether the issue is caused by framework behavior, an OS/device-specific condition, or a framework-level defect. We would appreciate your assistance in reviewing this issue and advising whether there are any known MapKit/VectorKit issues related to this crash signature. We can provide additional crash logs, device details, and reproduction information if required. Thank you for your support. Kind Regards, Yogesh Raj Ushyaku Software Solutions LLP
Replies
0
Boosts
0
Views
24
Activity
1d
MapKit MapCamera
SwiftUI Map with MapCamera jerks on every GPS update instead of animating smoothly I'm trying to make camera to follow the user smoothly during navigation using MapCamera with heading and pitch, similar to Apple Maps or Google Maps. The camera updates on every GPS tick but instead of animating smoothly between positions it jerks , it snaps to the new position, pauses, snaps again, pauses...terrible UX. The blue user location (UserAnnotation) puck moves completely smoothly. Only the camera jerks I have tried all sort of animations and interpolation you may think of. Something is just not right, must be something missing from the puzzle. I have prepared a minimal reproducible example so you can copy and paste the only thing needed is to add the Privacy - Location When In Use Usage Description Run in Simulator, go to Features > Location > Freeway Drive and tap on Track then you'll notice how camera is following then stop then following and stops again Don't bother using AI, he has no clue what's this all about. I also went through docs to find anything useful like a magic modifier, but no joy Here is a video hosted online as well: [https://streamable.com/ear9cv] And a code snippet copy paste import MapKit import CoreLocation // You'll only need to add Privacy - Location When In Use Usage Description to the Info tab struct ContentView: View { @State private var locationManager = LocationManagerDelegate() @State private var cameraPosition: MapCameraPosition = .userLocation(followsHeading: false, fallback: .automatic) @State private var isTracking: Bool = false @State private var lastKnownHeading: Double = 0 var body: some View { Map(position: $cameraPosition) { UserAnnotation() } .onChange(of: locationManager.location) { _, location in guard isTracking, let location else { return } withAnimation(.linear(duration: 0.5)) { cameraPosition = .camera(MapCamera( centerCoordinate: location.coordinate, distance: 1000, heading: location.course, pitch: 60 )) } } .safeAreaInset(edge: .bottom) { // Added to the safeAreaInset to keep the Apple Logo visible Button("Track") { isTracking.toggle() locationManager.requestPermission() locationManager.startNavigating() } .buttonStyle(.glassProminent) .buttonSizing(.flexible) .controlSize(.extraLarge) .padding(.horizontal) } } } @MainActor @Observable final class LocationManagerDelegate: NSObject, CLLocationManagerDelegate { var location: CLLocation? var authorizationStatus: CLAuthorizationStatus = .notDetermined let manager = CLLocationManager() private var liveUpdateTask: Task<Void, Never>? override init() { super.init() manager.delegate = self manager.desiredAccuracy = kCLLocationAccuracyBestForNavigation authorizationStatus = manager.authorizationStatus } func requestPermission() { manager.requestWhenInUseAuthorization() } func startNavigating() { liveUpdateTask = Task { do { for try await update in CLLocationUpdate.liveUpdates(.automotiveNavigation) { guard let newLocation = update.location else { continue } self.location = newLocation } } catch { print("Live updates error: \(error)") } } } func stopNavigating() { liveUpdateTask?.cancel() liveUpdateTask = nil manager.requestLocation() } func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { location = locations.last } func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) { authorizationStatus = manager.authorizationStatus } }
Replies
0
Boosts
0
Views
26
Activity
2d
MKLocalSearch not returning Places in the specified region
Hi- I've never posted on here before! But ChatGPT hasn't been helpful with this. I have a call using MKLocalSearch (i have a waddled down version below) let region = MKCoordinateRegion( center: location, // the user's location span: MKCoordinateSpan( latitudeDelta: 0.005, longitudeDelta: 0.005 ) ) let req = MKLocalPointsOfInterestRequest(coordinateRegion: region) req.pointOfInterestFilter = MKPointOfInterestFilter(including: [.nightlife]) let search = MKLocalSearch(request: req) I made the latitude and longitude the lowest they can possibly be without throwing an error. Sometimes (and unreliably) when the user's location is at say, a bar, this list will give me like 10 bars that are not even within the region, and exclude the bar that the user is actually present in. How can i make this not the case? In other words, I just want this to return what I expect: a list of POIs with the category .nightLife within the defined region. Any help would be appreciated!
Replies
1
Boosts
0
Views
243
Activity
5d
Maps for specific type of car
Hi there, I am currently developing an app for a specific type of car that cannot/is not allowed to drive everywhere in the Netherlands. I know there is a feature for avoiding highways. However, this is not enough. It also involves a special sign that, once the driver sees it, prevents them from driving any further. My question is: Is there an API I can use to properly develop this? I look forward to your response(s). Regards, Sebastiaan
Replies
0
Boosts
0
Views
30
Activity
5d
Clustering on MapKit for SwiftUI iOS17+
Hi What would be the best way to achieve clustering on MapKit within SwiftUI? We're building a decentralized commerce auction platform that is currently live in Switzerland with 3'500 live auctions that can be discovered on a map. We're now running into the issue that the map gets cluttered, when zooming out and haven't been able to find a way to cluster We moved back to UIKit, where clustering works, but UIKit has other drawdowns. So ideally there is a way to handle it within SwiftUI without having to wrap UIKit or move back entirely to UIKit. Thanks for any help or suggestions! Developer Documentation https://developer.apple.com/documentation/mapkit/mapkit-for-swiftui Julius Ilg AuctionShack
Replies
3
Boosts
1
Views
334
Activity
5d
Placemark Deprecated
"Use location, address and addressRepresentations instead" Is it possible to know what kind of "Address" a MapItem is representing (State, County, Neighborhood etc) after a MKGeocodingRequest? Is it possible to find out the CLRegion or similar of an map item. (Now when we cannot read it from the Placemark)
Replies
4
Boosts
1
Views
629
Activity
2w
SwiftUI MapKit
MapKit offers showsTraffic: Bool, which is great for displaying live traffic data on the map. However, MapPolyline sits above it, which makes it quite useless. Is this the expected behaviour?
Replies
7
Boosts
0
Views
624
Activity
3w
Starting a cycling navigation from another app?
Is there any way to start a cycling navigation in Maps.app from another app? This seems to work with walking and driving directions, but nothing I've tried has gotten it to work with cycling.
Replies
3
Boosts
0
Views
321
Activity
3w
Is the MapKit Legal Notice required for displaying my own content?
If an application utilizes MapKit exclusively to render custom content via MKTileOverlay (with canReplaceMapContent = true to entirely suppress Apple’s default map layers), are developers still contractually or technically mandated to display Apple's default "Legal" link? Currently, the hardcoded Apple attribution document details extensive copyright disclaimers for data suppliers like TomTom, Acxiom, and Breezometer. When an application renders entirely standalone, proprietary, or open-source map tiles, displaying this link creates two distinct issues: User Confusion: It incorrectly implies to end-users that the custom data being viewed is sourced from or validated by Apple's third-party data partners. Attribution Inaccuracy: It forces the display of entirely irrelevant copyright data while doing a disservice to the actual copyright holders of the active custom tile layers, who require their own distinct, prominent on-screen credit. It would be a significant UX improvement if the framework could dynamically hide the global data attribution link when canReplaceMapContent is active, allowing developers to provide accurate, context-specific legal text for the data layers actually in use.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
349
Activity
May ’26
MKMapView realistic elevationStyle cannot combine with overlays
I have an MKMapView displaying realistic elevation. As soon as I call "mapView.addOverlays([polylines])" which then trigger: func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer { if let polyline = overlay as? MKPolyline { let view = MKPolylineRenderer(polyline: polyline) // ... return view } return MKOverlayRenderer(overlay: overlay) } The map instantly turn flat until I remove all the overlays.
Replies
3
Boosts
0
Views
212
Activity
May ’26
MapKit SwiftUI Map with .standard(elevation: .realistic) falls back to 2D in globe mode, while .hybrid(elevation: .realistic) remains 3D
Overview When using SwiftUI Map with .standard(elevation: .realistic) and a globe-style presentation, the map unexpectedly renders as a flat 2D map instead of a 3D globe / realistic terrain view. In the same view, switching to .hybrid(elevation: .realistic) preserves the expected 3D globe behavior. This appears to be a rendering bug or regression specific to the .standard style under globe mode, not an app-level issue. The issue is reproducible in my app’s competition map screen and has also been reported by other developers online. Steps to Reproduce Create a SwiftUI Map. Bind it to a MapCameraPosition. Apply a standard map style with realistic elevation: .mapStyle(.standard(elevation: .realistic)) Configure the UI so the user can switch between: standard + globe hybrid + globe Zoom out / interact with the map in globe mode. Expected Results Map with .standard(elevation: .realistic) should continue to render with globe / 3D realistic terrain behavior, consistent with realistic elevation support and similar to .hybrid(elevation: .realistic). Actual Results When the map style is .standard(elevation: .realistic) in globe mode, the map falls back to a flat 2D-looking representation. Changing the same map to .hybrid(elevation: .realistic) restores the expected 3D globe rendering. Regression Unknown, but this appears to be unintended behavior because: realistic elevation is intended to provide realistic terrain / 3D map rendering, and there are no overlays in this map configuration that should intentionally force the map into a flat representation. Minimal Relevant Code From My App private enum CompetitionMapMode: String, CaseIterable { case satellite case explore func mapStyle(look: CompetitionMapLook) -> MapStyle { switch self { case .satellite: return .hybrid(elevation: look.elevation) case .explore: return .standard(elevation: look.elevation) } } } private enum CompetitionMapLook: String, CaseIterable { case globe case flat var elevation: MapStyle.Elevation { switch self { case .globe: return .realistic case .flat: return .flat } } } Map(position: $cameraPosition, selection: $selectedMapItemID) { UserAnnotation() ForEach(mapDisplayItems) { item in Annotation( item.title, coordinate: item.coordinate, anchor: .bottom ) { mapAnnotationView(for: item) } .tag(item.id) } } .mapStyle(mapModeSelection.mapStyle(look: mapLookSelection)) Why I Believe This Is a Framework Bug The same Map instance renders correctly in 3D when using: .hybrid(elevation: .realistic) but falls back to 2D with: .standard(elevation: .realistic) under globe mode. This suggests the issue is tied specifically to the .standard rendering path in SwiftUI Map / MapKit, rather than camera state, annotations, or location handling. My map does include annotations, but it does not add overlays that would intentionally flatten realistic terrain. Environment Xcode: Xcode 26.4 (17E192) SDK: SDK Version 26.4 (23E237) Device: iPhone 17 Pro iOS version: iOS 26.5 Beta 2 Reproducibility: Always App type: SwiftUI app using MapKit Map Additional Notes The issue is visible in a production app screen, not only a toy sample. The problem appears style-specific: .standard(elevation: .realistic) → incorrect 2D fallback .hybrid(elevation: .realistic) → expected 3D behavior This makes standard map style unusable for globe presentation in my app.
Replies
1
Boosts
0
Views
317
Activity
Apr ’26
MKLocalPointsOfInterestRequest always failed.
Searching for nearby POIs using MKLocalPointsOfInterestRequest has been unsuccessful with error Error Domain=MKErrorDomain Code=5 "(null)" UserInfo={MKErrorGEOError=-10}. Is there any solution?
Replies
2
Boosts
0
Views
840
Activity
Apr ’26
MapKit in SwiftUI
Anyone worked with MapKit's MapCameraPosition in SwiftUI? I'm building a navigation app and ran into a limitation I can't find a clean solution for when using .userLocation(followsHeading: true) MapKit takes full control of the camera, smooth heading tracking, follows the user automatically. Perfect. But there's no way to set a custom pitch (tilt) on it. The only initializer available is... .userLocation(followsHeading: true, fallback: .automatic) No pitch, no distance parameters.... The workaround I found is setting .camera(MapCamera(..., pitch: 60)) first, waiting 200ms, then switching to .userLocation(followsHeading: true), MapKit inherits the pitch from the rendered camera state before handing off to user tracking.... It works, but it's clearly exploiting an undocumented behaviour in MapKit's state machine rather than a proper API Has anyone found a cleaner way to achieve this? Or is UIViewRepresentable wrapping MKMapView the only proper solution? It would be awesome to have something like this cameraPosition = .userLocation( followsHeading: true, pitch: 60, distance: 800, fallback: .automatic )
Replies
1
Boosts
0
Views
181
Activity
Mar ’26
Maps: opening hours API / Property
I’m currently developing an iOS app that relies heavily on location details. I'm using MapKit and MKMapItem as my primary data source, which works perfectly for standard metadata. However, I’ve hit a roadblock: I want to display opening hours inline within my location details, but it seems Apple doesn't expose a public API or property for this in MKMapItem (even though the data is clearly visible in the native Apple Maps app). Since I'm building this as an indie developer/startup, the Google Places API is unfortunately too expensive for my current budget. ⁠Is there any legitimate, native way to get opening hours from Apple that I might have missed? ⁠If not, what are your best practices or recommended indie-friendly alternatives (e.g., Yelp Fusion API, OpenStreetMap, Foursquare)? Any tips on how to handle this elegantly and cost-efficiently would be highly appreciated! Thanks in advance.
Replies
2
Boosts
0
Views
523
Activity
Mar ’26
Swiftui Map Leagal Text is transformed when rotationEffect is applied to Map
I have a problem when applying rotationEffect to a map in in SwiftUI. The legal text in the map is transformed as shown in this image: The following code is part of a much larger and complex view; it is a minimal example to reproduce the error: import SwiftUI import MapKit struct ContentView: View { @State private var offset = CGSize.zero var body: some View { ZStack { let drag = DragGesture() .onChanged { g in offset.width = g.translation.width offset.height = g.translation.height } Map(interactionModes: [.zoom]) .frame(width: 320, height: 220) .rotationEffect(.degrees(Double(offset.width / 12))) .highPriorityGesture(drag) } } } I hope you can help me with this problem.
Replies
2
Boosts
0
Views
176
Activity
Mar ’26
MKDirections returns "Directions Not Available" when A and B are outside mainland China (e.g. Tokyo–Osaka)
I use MapKit and MKDirections for driving directions. The error "Directions Not Available" appears when the two points (A and B) are outside mainland China (e.g. Tokyo → Osaka). For routes inside China (e.g. Shanghai → Beijing), the same code works. let req = MKDirections.Request() req.source = MKMapItem(placemark: MKPlacemark(coordinate: origin)) req.destination = MKMapItem(placemark: MKPlacemark(coordinate: destination)) req.transportType = .automobile MKDirections(request: req).calculate { response, error in // Tokyo–Osaka (outside China): "Directions Not Available" // Shanghai–Beijing (inside China): works } Questions: Is MKDirections intended to support only routes within the device’s region (e.g. China)? When A/B are abroad, is "Directions Not Available" expected? Is this documented? For cross-country or overseas routes (e.g. Tokyo–Osaka), what is the recommended approach—third-party routing API + drawing on MapKit? Thanks.
Replies
0
Boosts
0
Views
204
Activity
Feb ’26
`MKLocalSearchRequest` change in behavior
aka MKLocalSearch.Request in Swift. Today my users reported that our address auto-complete functionality was returning strange results. We narrowed the issue down to pointOfInterestFilter being set. Sample code below: MKLocalSearchRequest *request = [[MKLocalSearchRequest alloc] init]; request.region = self.region; request.naturalLanguageQuery = addressString; request.resultTypes = MKLocalSearchResultTypeAddress; request.pointOfInterestFilter = [MKPointOfInterestFilter filterIncludingAllCategories]; That last line is the problem. When I stopped setting request.pointOfInterestFilter the MKLocalSearch started working as it always had. To further hammer home the point, with request.pointOfInterestFilter unset I set resultTypes to MKLocalSearchCompleterResultTypePointOfInterest (aka .pointOfInterest) and the issue returned. It seems Apple made a change on their backend recently such that pointOfInterestFilter now overrides resultTypes.
Replies
0
Boosts
0
Views
187
Activity
Feb ’26
Quick Look Extension does not load MapKit map properly anymore, after macOS Sequoia
It appears that starting with macOS Sequoia, Quick Look Preview extension no longer loads MapKit maps correctly anymore. Map tiles do not appear, leaving users with a beige background. Users report that polylines do render correctly, but annotations appears black. This was previously working fine in prior macOS versions including Sonoma. STEPS TO REPRODUCE Create a macOS app project, with an associated document. Ensure project has a Quick Look preview extension, with necessary basic setups. Ensure that the extension mentioned in (2) must have a MKMapView. Any other cosmetic changes, etc, does not need to be implemented to observe the base issue. Do note that it has been reported that in addition to the map tiles not loading, annotations don't render correctly as well.
Replies
5
Boosts
2
Views
1.1k
Activity
Feb ’26
Disable userLocationAnnotation bubble
Hello, thanks for your effort! I found that when showsUserLocation is set to true (by default), the pulsing blue dot user location annotation is shown, which is cool and beautiful. However, it will automatically and periodically attempt to call the Apple Server API GET https://api.apple-mapkit.com/v1/reverseGeocode within userLocationDidChange() and updateUserLocationAnnotation() to display, I assume, the user's current address when single-tapping on the blue dot. It will significantly use the MapKit service calls quota since the user location is automatically updated. It almost runs out of quota even though the map initialization is plenty enough. Is there any way to disable the bubble behavior but preserve the user location blue dot, which is lovely and better than drawing my own user location dot? It seems I can only turn off all user location features. Many thanks!
Replies
2
Boosts
0
Views
218
Activity
Feb ’26
Does Showing User's Current Location on the Map Require 'NSLocationWhenInUseUsageDescription'?
I have a desktop application that shows some real estate properties chosen by the user. The application shows those GPP locations on the map. The SwiftUI code is something like the following. import SwiftUI import MapKit struct ContentView: View { var body: some View ZStack { mapView } } private var mapView: some View { Map(position: $propertyViewModel.mapPosition) { ForEach(propertyViewModel.properties) { property in Annotation("", coordinate: CLLocationCoordinate2D(latitude: property.lat, longitude: property.lon)) { Button { } label: { VStack { Image(systemName: "house.circle.fill") .resizable() .scaledToFit() .frame(width: 48) .foregroundStyle(colorScheme == .light ? .white : .black) ... } } .buttonStyle(.borderless) } } UserAnnotation() } .mapControls { MapUserLocationButton() } .mapControlVisibility(.visible) .onAppear { CLLocationManager().requestWhenInUseAuthorization() } } } The application only wants to use the CLLocationManager class so that it can show those locations on the map relative to your current GPS position. And I'm hit with two review rejections. Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage Issue Description One or more purpose strings in the app do not sufficiently explain the use of protected resources. Purpose strings must clearly and completely describe the app's use of data and, in most cases, provide an example of how the data will be used. Guideline 5.1.5 - Legal - Privacy - Location Services The app uses location data for features that are not relevant to a user's location. Specifically, the app is not functional when Location Services are disabled. So I wonder if the application is even required to have 'NSLocationWhenInUseUsageDescription' and/or 'NSLocationUsageDescription'? just in order to show user's current location so that they can see property locations relative to it? The exact location privacy statement is the following. The application needs your permission in accessing your current location so that it will appear on the map
Replies
1
Boosts
0
Views
339
Activity
Feb ’26