Maps & Location

RSS for tag

Learn how to integrate MapKit and Core Location to unlock the power of location-based features in your app.

Maps & Location Documentation

Posts under Maps & Location subtopic

Post

Replies

Boosts

Views

Activity

DL-TDoA support using Nearby Interaction framework
Hi, Apple recently announced DL-TDoA (Downlink TDoA) support on iOS26. This API is currently marked as Beta. We are working on integrating this functionality into our app, already added the APIs and tried to configure a new DL-TDoA session using NIDLTDOAConfiguration (the only parameter it takes is networkIdentifer). The session is configured but automatically invalidated by the OS. When is DL-TDoA expected to be fully supported by phones? Can we expect a detailed documentation or specification explaining how to arrange the session with the DT-Anchors (channel, ranging duration, ...)? Do we need Bluetooth LE connection with the anchors while running DL-TDoA? We already have the 4 DT-Anchors (1 initiator and 3 responders) ready, looking forward to be able to test this new exciting feature and get DL-TDoA measurements to trilaterate the phone position within a map. Regards.
0
2
104
Aug ’25
mapkit js erro 401 Unauthorized
Hello Apple Developers, I encountered a 401 Unauthorized error when developing a web map. I asked the developer to check whether my key authorization is normal. This is the test website: https://pro.kyeasy.com/#/user/map Test account: +33 0625823391 Test password: jinghui111 Domain pro.kyeasy.com Token Type MapKit JS Restriction Type Domain Restricted Token eyJraWQiOiJKNzZSNkpSM0FLIiwidHlwIjoiSldUIiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiIzSzQ4UEE2MjRNIiwiaWF0IjoxNzU0ODA3MTc2LCJvcmlnaW4iOiJwcm8ua3llYXN5LmNvbSJ9.ZQLVPpn2Zbm5uHhT_YaA6T2eyaYNKYL5X1Z3DIC17vo4FlOLAKJnXUdB_0zOLDufVDT-CNZWK08_5KkjI5pAKA Creation Date 08/10/25 Expiration Date None Status Active Created by Jinghui Yang info java develop team id: 3K48PA624M Key ID DNRWXXA4L2 Created by Jinghui Yang on 2025/08/10 06:08 am bunld id 3K48PA624M.maps.com.kyeasy p8 DNRWXXA4L2.p8
7
0
117
Aug ’25
Lifecycle and Usage of CLServiceSession after the app is terminated
Hi, I am creating a Driving Behaviour Monitoring app in which I range beacons and I require location updates in foreground, background and in terminated state all the time. I am using CLServiceSession with "Always Authorisation" to get location events. I create CLServiceSession object in the foreground and start monitoring driving and then re-create it when the app is relaunched after termination. Doing this works fine. But sometimes when app is terminated and is not opened again, the app runs on its own even when the device is stationary ( I can see the app is using Location in the Control Centre) and after that Location updates are not received and I am not able to track the driving behaviour. I tried to add diagnostics to know the cause and found "Insufficiently In Use" and then "Service Session Required" in the diagnostics. It would be of great help if the proper usage of CLServiceSession is provided. Important Question: When does the CLServiceSession gets invalidated or destroyed that was created when the app was in foreground ? What happens to the CLServiceSession which was created in the foreground if the app is not opened for long duration, let's say a day or two?
1
0
50
Aug ’25
Scan IBeacons on VisionPro
I'm trying to scan for Beacon's in a visionos app iBeacon detection via CoreLocation (like CLBeacon or CLBeaconRegion) isn't supported on visionOS, so I went for CoreBluetooth + Manual Beacon Parsing Problem is I don't get my beacons scanned, only the other bluetooth devices central.scanForPeripherals(withServices: nil, options: [CBCentralManagerScanOptionAllowDuplicatesKey:true]) what should I do?
1
0
79
Aug ’25
How can I change the color and stroke width of a given route?
I have just a thin blue line as the route polyline and it is quite different not to think that this ist just a small river? Does anyone have an idea how to change the color and the strike width (line width) of the polyline (between Essen and Dortmund). The solution by Gemini and ChatGPT is not working... Thanks for your help, Markus <script src='https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.core.js' crossorigin async data-callback='initMapKit' data-libraries='full-map,services,overlays,annotations' data-token='TOKEN></script> <script type='module'> const setupMapKitJs = async() => { if (!window.mapkit || window.mapkit.loadedLibraries.length === 0) {await new Promise(resolve => { window.initMapKit = resolve }); delete window.initMapKit;}}; const main = async() => { await setupMapKitJs(); var map = new mapkit.Map('map-container', { center: new mapkit.Coordinate(51.5, 6.9), showsZoomControl: true, colorScheme: 'light', showsMapTypeControl: true, }); map.cameraDistance = 30000; ![]("https://developer.apple.com/forums/content/attachment/8e8433c5-9f43-4ddc-80e5-43d15f215c3f" "title=Bildschirmfoto 2025-08-12 um 13.38.06.png;width=590;height=281") const directions = new mapkit.Directions(); directions.route({ origin: 'Essen', destination: 'Dortmund' }, (error, response) => { if (error) { console.error(error); return; } const route = response.routes[0]; const routePolyline = route.polyline; routePolyline.lineWidth = 20; map.addOverlay(routePolyline); }); }; main(); </script>
0
0
27
Aug ’25
MKReverseGeocodingRequest and CNPostalAddress from MKMapItem
My app is currently using CLGeocoder to get a CLPlacemark, then using placemark.postalAddress with CNPostalAddressFormatter to get an attributed string for the full address, I then enumerate its attributes to pull out specific elements like just the street or state or zip etc. This is deprecated in iOS 26 with MKReverseGeocodingRequest being the intended replacement. This API returns an MKMapItem which doesn’t provide a CNPostalAddress - you can get a full address as a String but not structured address data that I’m seeing. Am I missing some way to get the postal address? Or is it a non-goal to provide that anymore? Thanks!
5
0
128
Aug ’25
Reverse geocoding rate limit of MKReverseGeocodingRequest compared to CLGeocoder
The documentation for CLGeocoder states Geocoding requests are rate-limited for each app, so making too many requests in a short period of time may cause some of the requests to fail. (When the maximum rate is exceeded, the geocoder returns an error object with the CLError.Code.network error to the associated completion handler.) And it provides helpful guidance on how and when to submit geocoding requests. The documentation for MKReverseGeocodingRequest does not mention requests are rate-limited. Does this mean it is not rate-limited? If it is rate-limited, is it similar to CLGeocoder, what is its behavior? It is important to understand behavior of the API in order to understand impact on my app’s use case and how users will be affected should I change the implementation. Thanks!
0
0
81
Aug ’25
Improving MapKit JS Load Times – Is Bundling Allowed?
Hey everyone, I’m using MapKit JS in a web app and wanted to ask if anyone has experience optimizing its loading performance. Initially, I was using the core version of MapKit JS, but some users reported issues—certain modules weren’t immediately available, and they had to wait quite a while before the map became usable. Switching to the full version helped somewhat, but I’m still seeing delays. In some cases, MapKit JS isn’t fully ready even after 10 seconds. To reduce these delays, I’m considering bundling MapKit JS directly into my site’s JavaScript bundle (rather than loading it externally). My hope is that this could improve load times and reduce dependency on external script loading. Before I try this, I want to make sure this doesn’t go against Apple’s usage policies for MapKit JS. Has anyone tried this approach? Is bundling MapKit JS allowed? Or are there better ways to improve the loading experience? Thanks in advance!
0
0
72
Jul ’25
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!
0
0
149
Jul ’25
Dynamic Location Tracking using CLServiceSession and CLBackgroundActivitySession
Hello, I'm currently implementing code to track routes and determine if users have arrived at their destination using CLServiceSession, CLBackgroundActivitySession, and CLLocationUpdate.liveUpdates. I want to obtain location data across all app states: foreground, background, and terminated. I have two questions: Background Location Indicator Issue: I'm using CLBackgroundActivitySession to get location updates in the background. Normally, the background location indicator (blue bar) doesn't appear at the top left of the screen for my app. However, when another app (e.g., LiveUpdatesSample) activates CLBackgroundActivitySession, my app's background location indicator suddenly becomes visible. Can you explain why this happens? or Can I Control showsBackgroundLocationIndicator in CLBackgroundActivitySession Session Management: Is there a way to terminate all currently active CLBackgroundActivitySessions? I understand that when CLBackgroundActivitySession is activated and the app is terminated and then relaunched, a new CLBackgroundActivitySession needs to be created. In this case, are the previously created and running CLBackgroundActivitySessions automatically released when the app is relaunched?
6
0
131
Jul ’25
How to Handle Periodic Background Location Reminders for an MDM-Managed Safety App?
Hello everyone, We've developed a safety application for schools that runs on supervised, MDM-managed iOS devices. The app requires "Location Always" to maintain a persistent background state for its core functionality. The Challenge: Our primary issue is with the periodic background location reminder prompts that iOS automatically presents to the user (e.g., "[App Name] has used your location X times in the past 3 days..."). A screenshot of the exact prompt is attached. While we educate users on the importance of selecting "Always Allow," these recurring prompts make it very easy for a student to downgrade the permission at a later date, which disables the app's safety features. This makes the solution unreliable in a school environment. Our Question: Since these are supervised devices managed by an educational institution, we are looking for a way to manage this behavior. Is there any Info.plist key, entitlement, or API available to developers to influence or suppress these recurring location reminders for our app? From an MDM perspective, is there a known payload or declarative management configuration that can prevent these specific prompts from appearing for a designated app? We understand these prompts are a key privacy feature. Our question is whether there are any provisions for managed, special-purpose environments like a school, where the app's function is considered essential and pre-approved by the device administrator (the school). We are looking for a way to provide a "set it and forget it" configuration for the school, but these reminders currently prevent that. Any architectural advice or insights would be greatly appreciated. Thank you.
2
0
95
Jul ’25
Apple Maps Server API Geocoding returns empty results for Japanese addresses with lang: 'ja-JP'
Hi, I'm using the Apple Maps Server API (/v1/geocode) to retrieve geocoding results for Japanese addresses. Until recently, requests like the one below returned correct results: GET https://maps-api.apple.com/v1/geocode?q=東京都千代田区千代田1-1&lang=ja-JP Authorization: Bearer <valid JWT> But now, the response is always: { "results": [] } However, when I use the same address with lang: en-US, it returns valid coordinates: GET https://maps-api.apple.com/v1/geocode?q=1-1 Chiyoda, Chiyoda-ku, Tokyo=en-US "東京都千代田区千代田1-1" is a Japanese address, and "1-1 Chiyoda, Chiyoda-ku, Tokyo" is the same address written in English. My Questions: Has there been a recent change to the geocoding behavior for Japanese addresses when lang: ja-JP is used? Does the lang parameter affect not only the response language but also the internal parsing logic? Is this a known issue or limitation? The access token is valid and I'm getting a 200 OK response, but results is always empty with lang: ja-JP. Thanks for your help!
0
0
97
Jul ’25
App not showing up in Apple Map's share location menu
I'm making an app that can have locations and links shared to it. I have gotten the share intent working for text and urls with: NSExtensionActivationSupportsWebURLWithMaxCount: 1 NSExtensionActivationSupportsWebPageWithMaxCount: 1 NSExtensionActivationSupportsText: true in Info.plist of the share extension. I am able to share Google Maps locations and safari websites. However, my app does not appear when I share a location on Apple Maps. I also tried the other options in the docs (https://developer.apple.com/documentation/bundleresources/information-property-list/nsextension/nsextensionattributes/nsextensionactivationrule) as well without success. When I share a location (i.e. a shop) in Apple Maps, it looks like a link but perhaps its something else? Does anyone know how to get an app to come up in the share menu of an Apple Maps location? Thanks!
0
0
33
Jul ’25