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

200 Posts

Post

Replies

Boosts

Views

Activity

SwiftUI Map Marker monogram replaces its title when Map is embedded in a List
SwiftUI Marker monogram replaces title inside List Marker(_:monogram:coordinate:) renders incorrectly when the Map is embedded in a List. Expected: LDN inside the marker pin London below the pin Actual inside List: LDN appears in the title position London is missing The pin has no monogram Screenshots With List — incorrect rendering Without List — expected rendering With List import SwiftUI import MapKit struct MapListView: View { let position = CLLocationCoordinate2D( latitude: 51.5074, longitude: -0.1278 ) var body: some View { List { Map( initialPosition: .region( MKCoordinateRegion( center: position, span: .init( latitudeDelta: 0.2, longitudeDelta: 0.2 ) ) ) ) { Marker( "London", monogram: Text("LDN"), coordinate: position ) } .frame(height: 260) } } } Without List struct MapView: View { let position = CLLocationCoordinate2D( latitude: 51.5074, longitude: -0.1278 ) var body: some View { Map( initialPosition: .region( MKCoordinateRegion( center: position, span: .init( latitudeDelta: 0.2, longitudeDelta: 0.2 ) ) ) ) { Marker( "London", monogram: Text("LDN"), coordinate: position ) } .frame(height: 260) } } The marker renders correctly when the Map is not inside a List. Is this a known SwiftUI or MapKit bug?
0
0
35
2d
Full Keyboard Access support for custom MKAnnotationView in MKMapView
We’re working on improving the accessibility of a MKMapView that displays custom MKAnnotationView instances. Our implementation is fully accessible with VoiceOver: The custom annotation views expose the correct accessibility information. Users can navigate between annotations using custom accessibility rotors. The overall VoiceOver experience works as expected. However, we’re unable to make the custom MKAnnotationView instances accessible through Full Keyboard Access (FKA). Despite configuring the annotation views as accessibility elements and experimenting with focus-related APIs, the annotations never become reachable through keyboard navigation. They appear to be skipped entirely by the FKA focus system. Is there a supported way to make custom MKAnnotationView instances participate in Full Keyboard Access navigation? If this scenario is currently unsupported, is there a recommended approach or any plans to expose public APIs that would allow developers to provide a keyboard-accessible experience for custom annotations in MKMapView? Any guidance would be greatly appreciated.
4
0
275
5d
CarPlay handoff to MapKit fails on n+1 attempts
A CarPlay app with the carplay-fueling entitlement displays a list of stations. Tapping a station hands off to the Maps app for directions and navigation. Sometimes the handoff will return unsuccessful from the open call. The first attempt will succeeed. I immedediately return to my app and select a different station. The second attemp may succeed or it may fail. If the handoff attempt fails I can switch to the Maps app, return to MyApp, tap the same station row that just failed and the handoff will succeed. The issue is across multiple iOS versions (18 and 26) and multiple devices. Looking at the sysdiagnose logs, a successful handoff looks like this: 2026-06-26 15:56:27.762040 lsd: pid 14570 requests to open URL with scheme <private> 2026-06-26 15:56:27.768475 lsd: [FBSSystemService][0xee43] Sending request to open "com.apple.Maps" 2026-06-26 15:56:27.782145 lsd: [FBSSystemService][0xee43] Request successful: <BSProcessHandle ... Maps:17170; valid: YES> A failed handoff looks like this: 2026-06-26 17:05:00.162432 lsd: pid 14570 requests to open URL with scheme <private> 2026-06-26 17:05:00.171618 lsd: [FBSSystemService][0x3d16] Sending request to open "com.apple.Maps" 2026-06-26 17:05:00.173776 SpringBoard: Received request to open "com.apple.Maps" with url "maps:<private>" from lsd:122 on behalf of MyApp:14570. 2026-06-26 17:05:00.174110 SpringBoard: Received untrusted open application request for "com.apple.Maps" from <FBApplicationProcess ... app<au.com.philk.MyApp>:14570> 2026-06-26 17:05:00.175103 SpringBoard: Open "com.apple.Maps" request from lsd:122 failed with error: FBSOpenApplicationServiceErrorDomain; code: 1 ("RequestDenied") Reason: Application au.com.philk.MyApp is neither visible nor entitled, so may not perform un-trusted user actions. Underlying: FBSOpenApplicationErrorDomain; code: 3 ("Security") Looking more closely at the logs, the template UI is brought forward: CarPlay: DBApplicationSceneHostViewController; au.com.philk.MyApp; proxy: com.apple.CarPlayTemplateUIHost RunningBoard briefly grants MyApp foreground / render assertions: Foreground Template App FBWorkspace (ForegroundFocal) Set darwin role to: UserInteractiveFocal visibility is yes However, SpringBoard also records MyApp as background: 2026-06-26 17:04:53.709527 SpringBoard: Application process state changed for au.com.philk.MyApp: taskState: Running; visibility: Background The denied open at 17:05:00 appears to use SpringBoard's application visibility/trust decision, not the fact that the user is actively interacting with MyApp's CarPlay template UI. The following is logged: Application au.com.philk.MyApp is neither visible nor entitled, so may not perform un-trusted user actions. I have tried two different ways to pass/open the URL, and both will fail, usually after the first attempt. A plain maps:// URL Creating a MapItem and using: MKMapItem.openInMaps(launchOptions:from:completionHandler:) I wonder if this is the same or similar bug to the one reported here? https://developer.apple.com/forums/thread/787788?answerId=843556022#843556022 What is the root cause of the random failures? Any help or pointers will be appreciated.
5
0
166
1w
MapKit Pitch
I have a navigation app in production that works great. I recently integrated CarPlay, and I'm trying to use a more "horizon view" by increasing the camera pitch during navigation. Specifically, on a CarPlay screen with a resolution of 800×480, I'm trying to use a distance of 1000 m with a pitch of 60°, but MapKit automatically clamps the pitch to a bird's-eye view. If I reduce the distance to 800 m, for example, it works just fine. I'd argue that having a better horizon view during navigation is a safety feature, as users, especially truck drivers, need to see well ahead. Most truck navigation systems provide this by default, so I'm wondering if there's any workaround to achieve this without MapKit clamping the pitch? I found the following in the documentation, which seems pretty clear, but I thought I'd ask if anyone has found a workaround...? From docs: "The class may clamp the value in this property to a maximum value to maintain map readability. There’s no fixed maximum value, though, because the actual maximum value is dependent on the altitude of the camera." MapCamera( centerCoordinate: locationManager.coordinate, distance: 1000, heading: locationManager.heading, pitch: 60 )
0
0
81
1w
Reliable way to identify German Landkreise / kreisfreie Städte with CLPlacemark?
Hello AD Forums, I am a member of the ADP and am working on an iOS app for the App Store. My app needs to match the user’s current location to one of Germany’s 400 district-level administrative areas: Landkreise and kreisfreie Städte. In Firebase, each region has a geoTagName field. The app compares the detected location name against this geoTagName to load the correct internal region document. I need to understand the recommended Apple/Core Location field for this use case. My current understanding is: CLPlacemark.administrativeArea usually represents the federal state in Germany, for example “Thüringen” or “Bayern”. CLPlacemark.locality usually represents the city, municipality, or town. CLPlacemark.subAdministrativeArea seems to be the most likely candidate for the German Landkreis / kreisfreie Stadt level. However, I need to know whether CLPlacemark.subAdministrativeArea is the correct and reliable field for identifying German Landkreise and kreisfreie Städte. I also tested Apple Maps Server API /v1/reverseGeocode. For district-level locations in Germany, it often returns values such as: administrativeArea: Thüringen locality: Bad Sulza but no value such as: subAdministrativeArea: Weimarer Land Example coordinate tested: 50.9957525, 11.5129989 My questions are: Is CLPlacemark.subAdministrativeArea the recommended field to identify German Landkreise and kreisfreie Städte in an iOS app? Are there known differences between iOS CLGeocoder.reverseGeocodeLocation and Apple Maps Server API /v1/reverseGeocode regarding subAdministrativeArea? Does Apple provide any official list, dataset, or recommended validation method for the exact district-level names used by Core Location / Apple Maps in Germany? How should an app distinguish cases where a kreisfreie Stadt and a Landkreis have the same name, for example: Stadt Augsburg Landkreis Augsburg Stadt Ansbach Landkreis Ansbach Stadt Aschaffenburg Landkreis Aschaffenburg Should administrativeArea be avoided for this use case because it represents the federal state level in Germany? The goal is to create reliable matching between the Apple/Core Location result and our Firebase geoTagName values. Thank you.
0
0
248
2w
MapKit MapStyle
Does anybody know if I'm missing something here? I'm using .mapStyle(.elevation(.realistic)), which enables the 3D map view, but it causes significant lag when driving in real life, especially at speeds above 50 mph. Everything works perfectly in the Simulator with no issues, but real world performance is much worse. The phone starts heating up almost immediately when driving in this mode through urban areas with 3D map data. Interestingly, the phone does not heat up on motorways, and performance is excellent there. (I guess because there's not so much 3D data to show on motorways) This mode looks fantastic and is one of the most requested features from my users, so I'm trying to figure out how to make it work properly. I've tested both SwiftUI and UIKit implementations and get the same result in both. Also I'm using an iPhone 17 Pro Max and an iPad 11, same result on both, including CarPlay import MapKit import CoreLocation struct ContentView: View { @State private var locationManager = LocationManagerDelegate() @State private var cameraPosition: MapCameraPosition = .userLocation(followsHeading: false, fallback: .automatic) @State private var isTracking: Bool = false var body: some View { Map(position: $cameraPosition) { UserAnnotation() } .mapStyle(.imagery(elevation: .realistic)) .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 manager.allowsBackgroundLocationUpdates = true 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 } } #Preview { ContentView() }
1
0
120
3w
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
289
Jun ’26
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
80
Jun ’26
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
414
Jun ’26
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
128
Jun ’26
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
414
Jun ’26
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
670
May ’26
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
388
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
268
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
388
Apr ’26
SwiftUI Map Marker monogram replaces its title when Map is embedded in a List
SwiftUI Marker monogram replaces title inside List Marker(_:monogram:coordinate:) renders incorrectly when the Map is embedded in a List. Expected: LDN inside the marker pin London below the pin Actual inside List: LDN appears in the title position London is missing The pin has no monogram Screenshots With List — incorrect rendering Without List — expected rendering With List import SwiftUI import MapKit struct MapListView: View { let position = CLLocationCoordinate2D( latitude: 51.5074, longitude: -0.1278 ) var body: some View { List { Map( initialPosition: .region( MKCoordinateRegion( center: position, span: .init( latitudeDelta: 0.2, longitudeDelta: 0.2 ) ) ) ) { Marker( "London", monogram: Text("LDN"), coordinate: position ) } .frame(height: 260) } } } Without List struct MapView: View { let position = CLLocationCoordinate2D( latitude: 51.5074, longitude: -0.1278 ) var body: some View { Map( initialPosition: .region( MKCoordinateRegion( center: position, span: .init( latitudeDelta: 0.2, longitudeDelta: 0.2 ) ) ) ) { Marker( "London", monogram: Text("LDN"), coordinate: position ) } .frame(height: 260) } } The marker renders correctly when the Map is not inside a List. Is this a known SwiftUI or MapKit bug?
Replies
0
Boosts
0
Views
35
Activity
2d
Full Keyboard Access support for custom MKAnnotationView in MKMapView
We’re working on improving the accessibility of a MKMapView that displays custom MKAnnotationView instances. Our implementation is fully accessible with VoiceOver: The custom annotation views expose the correct accessibility information. Users can navigate between annotations using custom accessibility rotors. The overall VoiceOver experience works as expected. However, we’re unable to make the custom MKAnnotationView instances accessible through Full Keyboard Access (FKA). Despite configuring the annotation views as accessibility elements and experimenting with focus-related APIs, the annotations never become reachable through keyboard navigation. They appear to be skipped entirely by the FKA focus system. Is there a supported way to make custom MKAnnotationView instances participate in Full Keyboard Access navigation? If this scenario is currently unsupported, is there a recommended approach or any plans to expose public APIs that would allow developers to provide a keyboard-accessible experience for custom annotations in MKMapView? Any guidance would be greatly appreciated.
Replies
4
Boosts
0
Views
275
Activity
5d
CarPlay handoff to MapKit fails on n+1 attempts
A CarPlay app with the carplay-fueling entitlement displays a list of stations. Tapping a station hands off to the Maps app for directions and navigation. Sometimes the handoff will return unsuccessful from the open call. The first attempt will succeeed. I immedediately return to my app and select a different station. The second attemp may succeed or it may fail. If the handoff attempt fails I can switch to the Maps app, return to MyApp, tap the same station row that just failed and the handoff will succeed. The issue is across multiple iOS versions (18 and 26) and multiple devices. Looking at the sysdiagnose logs, a successful handoff looks like this: 2026-06-26 15:56:27.762040 lsd: pid 14570 requests to open URL with scheme <private> 2026-06-26 15:56:27.768475 lsd: [FBSSystemService][0xee43] Sending request to open "com.apple.Maps" 2026-06-26 15:56:27.782145 lsd: [FBSSystemService][0xee43] Request successful: <BSProcessHandle ... Maps:17170; valid: YES> A failed handoff looks like this: 2026-06-26 17:05:00.162432 lsd: pid 14570 requests to open URL with scheme <private> 2026-06-26 17:05:00.171618 lsd: [FBSSystemService][0x3d16] Sending request to open "com.apple.Maps" 2026-06-26 17:05:00.173776 SpringBoard: Received request to open "com.apple.Maps" with url "maps:<private>" from lsd:122 on behalf of MyApp:14570. 2026-06-26 17:05:00.174110 SpringBoard: Received untrusted open application request for "com.apple.Maps" from <FBApplicationProcess ... app<au.com.philk.MyApp>:14570> 2026-06-26 17:05:00.175103 SpringBoard: Open "com.apple.Maps" request from lsd:122 failed with error: FBSOpenApplicationServiceErrorDomain; code: 1 ("RequestDenied") Reason: Application au.com.philk.MyApp is neither visible nor entitled, so may not perform un-trusted user actions. Underlying: FBSOpenApplicationErrorDomain; code: 3 ("Security") Looking more closely at the logs, the template UI is brought forward: CarPlay: DBApplicationSceneHostViewController; au.com.philk.MyApp; proxy: com.apple.CarPlayTemplateUIHost RunningBoard briefly grants MyApp foreground / render assertions: Foreground Template App FBWorkspace (ForegroundFocal) Set darwin role to: UserInteractiveFocal visibility is yes However, SpringBoard also records MyApp as background: 2026-06-26 17:04:53.709527 SpringBoard: Application process state changed for au.com.philk.MyApp: taskState: Running; visibility: Background The denied open at 17:05:00 appears to use SpringBoard's application visibility/trust decision, not the fact that the user is actively interacting with MyApp's CarPlay template UI. The following is logged: Application au.com.philk.MyApp is neither visible nor entitled, so may not perform un-trusted user actions. I have tried two different ways to pass/open the URL, and both will fail, usually after the first attempt. A plain maps:// URL Creating a MapItem and using: MKMapItem.openInMaps(launchOptions:from:completionHandler:) I wonder if this is the same or similar bug to the one reported here? https://developer.apple.com/forums/thread/787788?answerId=843556022#843556022 What is the root cause of the random failures? Any help or pointers will be appreciated.
Replies
5
Boosts
0
Views
166
Activity
1w
MapKit Pitch
I have a navigation app in production that works great. I recently integrated CarPlay, and I'm trying to use a more "horizon view" by increasing the camera pitch during navigation. Specifically, on a CarPlay screen with a resolution of 800×480, I'm trying to use a distance of 1000 m with a pitch of 60°, but MapKit automatically clamps the pitch to a bird's-eye view. If I reduce the distance to 800 m, for example, it works just fine. I'd argue that having a better horizon view during navigation is a safety feature, as users, especially truck drivers, need to see well ahead. Most truck navigation systems provide this by default, so I'm wondering if there's any workaround to achieve this without MapKit clamping the pitch? I found the following in the documentation, which seems pretty clear, but I thought I'd ask if anyone has found a workaround...? From docs: "The class may clamp the value in this property to a maximum value to maintain map readability. There’s no fixed maximum value, though, because the actual maximum value is dependent on the altitude of the camera." MapCamera( centerCoordinate: locationManager.coordinate, distance: 1000, heading: locationManager.heading, pitch: 60 )
Replies
0
Boosts
0
Views
81
Activity
1w
Reliable way to identify German Landkreise / kreisfreie Städte with CLPlacemark?
Hello AD Forums, I am a member of the ADP and am working on an iOS app for the App Store. My app needs to match the user’s current location to one of Germany’s 400 district-level administrative areas: Landkreise and kreisfreie Städte. In Firebase, each region has a geoTagName field. The app compares the detected location name against this geoTagName to load the correct internal region document. I need to understand the recommended Apple/Core Location field for this use case. My current understanding is: CLPlacemark.administrativeArea usually represents the federal state in Germany, for example “Thüringen” or “Bayern”. CLPlacemark.locality usually represents the city, municipality, or town. CLPlacemark.subAdministrativeArea seems to be the most likely candidate for the German Landkreis / kreisfreie Stadt level. However, I need to know whether CLPlacemark.subAdministrativeArea is the correct and reliable field for identifying German Landkreise and kreisfreie Städte. I also tested Apple Maps Server API /v1/reverseGeocode. For district-level locations in Germany, it often returns values such as: administrativeArea: Thüringen locality: Bad Sulza but no value such as: subAdministrativeArea: Weimarer Land Example coordinate tested: 50.9957525, 11.5129989 My questions are: Is CLPlacemark.subAdministrativeArea the recommended field to identify German Landkreise and kreisfreie Städte in an iOS app? Are there known differences between iOS CLGeocoder.reverseGeocodeLocation and Apple Maps Server API /v1/reverseGeocode regarding subAdministrativeArea? Does Apple provide any official list, dataset, or recommended validation method for the exact district-level names used by Core Location / Apple Maps in Germany? How should an app distinguish cases where a kreisfreie Stadt and a Landkreis have the same name, for example: Stadt Augsburg Landkreis Augsburg Stadt Ansbach Landkreis Ansbach Stadt Aschaffenburg Landkreis Aschaffenburg Should administrativeArea be avoided for this use case because it represents the federal state level in Germany? The goal is to create reliable matching between the Apple/Core Location result and our Firebase geoTagName values. Thank you.
Replies
0
Boosts
0
Views
248
Activity
2w
MapKit directions for .cycling wrong
When cacluclating directions for .cycling, the returned route has directions.routes.first!.transporttype == .automobile if I follow the example What do I do wrong? Is this a bug? Tested on macOS 26 and iOS simulator 26
Replies
0
Boosts
0
Views
143
Activity
2w
MapKit MapStyle
Does anybody know if I'm missing something here? I'm using .mapStyle(.elevation(.realistic)), which enables the 3D map view, but it causes significant lag when driving in real life, especially at speeds above 50 mph. Everything works perfectly in the Simulator with no issues, but real world performance is much worse. The phone starts heating up almost immediately when driving in this mode through urban areas with 3D map data. Interestingly, the phone does not heat up on motorways, and performance is excellent there. (I guess because there's not so much 3D data to show on motorways) This mode looks fantastic and is one of the most requested features from my users, so I'm trying to figure out how to make it work properly. I've tested both SwiftUI and UIKit implementations and get the same result in both. Also I'm using an iPhone 17 Pro Max and an iPad 11, same result on both, including CarPlay import MapKit import CoreLocation struct ContentView: View { @State private var locationManager = LocationManagerDelegate() @State private var cameraPosition: MapCameraPosition = .userLocation(followsHeading: false, fallback: .automatic) @State private var isTracking: Bool = false var body: some View { Map(position: $cameraPosition) { UserAnnotation() } .mapStyle(.imagery(elevation: .realistic)) .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 manager.allowsBackgroundLocationUpdates = true 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 } } #Preview { ContentView() }
Replies
1
Boosts
0
Views
120
Activity
3w
iPhone map in my APP
I'm creating an APP for the first time in Xcode, I have a part of a place search on a map, it has a card very similar to the iPhone map card, I want it to move to the left when it's horizontal and position itself there to see the information that slides up and down. What should I write in the code?
Replies
0
Boosts
0
Views
268
Activity
3w
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
289
Activity
Jun ’26
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
80
Activity
Jun ’26
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
414
Activity
Jun ’26
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
128
Activity
Jun ’26
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
414
Activity
Jun ’26
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
670
Activity
May ’26
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
709
Activity
May ’26
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
393
Activity
May ’26
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
388
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
268
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
388
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
883
Activity
Apr ’26