I am having issues loading in a mapkit snapshot. I get an error saying that https://domain.com and they're expecting domain.com. I have no idea what could be going wrong here. I set the domains properly in the mapkit tokens. When I click on the link it opens a new tab and loads what the data properly, but somehow in the application on production this error comes up.
Maps & Location
RSS for tagLearn how to integrate MapKit and Core Location to unlock the power of location-based features in your app.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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!
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!
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!
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;

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>
Topic:
App & System Services
SubTopic:
Maps & Location
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.
Apple recently announced DL-TDoA (Downlink TDoA) support on iOS 26, and the API is currently marked Beta. Using two iPhones (16 Pro and 13) on iOS 26.0 Beta, I’m starting a Nearby Interaction session and need to read NITLDOA parameters (address, carrier frequency offset, signal strength/RSSI), but I can’t find a supported way. I’m also seeing asymmetry: iPhone 13 reports distance+direction, while 16 Pro reports distance only. Is there a supported workflow/API to access those parameters, and any known device/OS constraints that would cause direction to be unavailable on 16 Pro?
When trying the request "hotels" on MapKitJS with searchRegionPriority=default, it will return an hotel in Ramallah even if the searchRegion is very far from there. It can happen if your search region is very broad in most place (above Europe if you zoom out a lot, over Turkey and Middle East even if the bounding box is narrower), but on specific places it happens even with a small search region (like in Tripoli, Lebanon, whatever the zoom level). With searchRegionPriority=required, many hotels can be found in the same area.
Reproduce with:
https://maps-api.apple.com/v1/search?q=hotels&searchRegion=34.45512816097114,35.849070061159864,34.428418939926146,35.80795182731595&lang=en&searchRegionPriority=default
I'm currently developing an app with mapkit which I may submit to the Swift Student Challenge. So anyways, the app will be used completely offline. I was wondering if there was any way to include very low resolution map tiles with the app files. That way, the app never needs wifi. However, I'm not sure if this is possible, especially since the map would need to be under 20 mb. Thanks.
Topic:
App & System Services
SubTopic:
Maps & Location
Note: I have had issues with CMAltimeter since whats seems to have been a major undocumented modification since iOS 17.4.
So I'm using the CMAltimeter absolute locations delivery.
Sometimes, the altimeter seems to be in an uncalibrated mode and therefore, no altitude delivery happens.
Is there a way to be inform of such state? Currently, it just doesn't work and I can't inform the user about this. They just think the app is broken
What message should I give to the users to accelerate the calibration such that the CMAltimeter will work again?
Also, users have reported that the CMAltimeter can temporarily stop delivering altitude updates, even though it should.
So I guess my question resumes to this:
Whats the best practice to handle an uncalibrated CMAltimeter?
Thanks!
I have a Map within a SwiftUI.
I initialize a variable like this:
var cameraPosition: MapCameraPosition = .userLocation(followsHeading: true, fallback: .automatic)
and then I want to zoom map, code like this:
let userRegion = MKCoordinateRegion(
center: userLocation.coordinate,
span: MKCoordinateSpan(
latitudeDelta: 0.01,
longitudeDelta: 0.01
)
)
cameraPosition = .region(userRegion)
But it does't work. How can I solve this problem?
When I quit the app from the background task list, CLLocationUpdate.liveUpdates does not resume properly and start location updates. However, if I kill the app directly, it can recover and start location updates.
Topic:
App & System Services
SubTopic:
Maps & Location
Hello everyone,
I'm encountering a strange location authorization issue in the iOS simulator, and I'm hoping someone can help me analyze it.
Problem Description:
When my app runs for the first time in the simulator, it requests location permissions.
I select "Deny" for the authorization.
Then, I go to the simulator's "Settings" -> "Privacy & Security" -> "Location Services" and enable location permissions for my app.
However, when I return to the app, CLLocationManager.authorizationStatus still returns .notDetermined, and the authorization request pop-up does not appear again.
This issue persists even after resetting the simulator settings multiple times.
import CoreLocation
@Observable
final class LocationManager: NSObject, CLLocationManagerDelegate {
var locationManager = CLLocationManager()
var currentLocation: CLLocationCoordinate2D?
override init() {
super.init()
locationManager.delegate = self
}
func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
let status = manager.authorizationStatus
print("Authorize Status: \(status)")
switch status {
case .authorizedWhenInUse, .authorizedAlways:
locationManager.startUpdatingLocation()
case .denied, .restricted:
stopLocation()
case .notDetermined:
locationManager.requestWhenInUseAuthorization()
print("Location permission not determined.")
@unknown default:
break
}
}
func requestLocation() {
let status = locationManager.authorizationStatus
if status == .authorizedWhenInUse || status == .authorizedAlways {
locationManager.requestLocation()
} else {
locationManager.requestWhenInUseAuthorization()
}
}
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
guard let newLocation = locations.first else { return }
currentLocation = newLocation.coordinate
print("Updated location: \(newLocation.coordinate)")
}
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
print("Location update failed with error: \(error.localizedDescription)")
currentLocation = nil
}
func stopLocation() {
locationManager.stopUpdatingLocation()
print("Stopped updating location")
}
}
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
Core Location
Maps and Location
Simulator
We applied for Location Push Entitlement on June. It has been several months since then but we still got not any results (either passed or rejected).
Topic:
App & System Services
SubTopic:
Maps & Location
We have a PWA app developed by our company. In order to distribute this app to users' iPhones, we put this PWA app inside an XCode app. That means we put a WebView in XCode to display the PWA URL. Everything works perfect, except for location access.
The PWA app access the device location. When the first time the app acess location, it asks for user consent two times, by PWA app and by the XCode app. This is fine. When the user clicks Allow, the XCode app preserves the user choice and never asks again. However, the PWA app keeps on asking user permission every day. If we close the app open again, it will ask one more time. That means twice daily. But if we close and open the app for a third time, it will not ask. It remembers the user choice only for 24 hours.
If we install the PWA app directly in iPhone (that means if we add the URL as bookmark in home screen), it is asking for location permission only once. However, when we put this app inside an XCode app it is asking every day.
This affects the user experience, and as our users are not tech savvy, causing many issues. Is there a way to force the PWA app inside XCode app to remember the user choice?
Any help is very much appreciated.
Thanks,
When using Search.autocomplete and getting the results, each search result object has coordinate which have 13 decimal places. When you use Geocoder.reverseLookup for these coordinates, it returns the wrong address and different coordinates (6 decimal places and different as well). What works is using Geocoder.lookup (with getsUserLocation as true) and putting in the Search.autocomplete displayLines (as a string) for the query. Am I doing something wrong or is this a bug?
Code:
const exampleQuery = '<example address>';
const search = new mapkit.Search({
getsUserLocation: true,
});
search.autocomplete(
exampleQuery,
(error, data) => {
if (error) {
console.error('Search error:', error);
return;
}
const { coordinate } = data.results[0];
console.log("Autocomplete coordinate", coordinate); // Lat and lng are both have 13 decimal places
const geoCoder = new mapkit.Geocoder({});
geoCoder.reverseLookup(
new mapkit.Coordinate(coordinate.latitude, coordinate.longitude),
(error, data) => {
const { formattedAddress, coordinate } = data.results[0];
console.log(formattedAddress, coordinate); // Not the same address from example query and from the search autocomplete, also the coordinate has 7 decimal places
}
);
},
{}
);
Hello developers! I am working with a team of North Carolina State University researchers to create an app or program that can retrieve real-time traffic events, such as hazards, road closures, and road construction alerts, in a similar manner to the Apple Maps app, but with the added functionality of collecting them over a historical period given a start and end date.
I'm looking through the MapKit documentation, but there doesn't appear to be any functions exposing granular traffic data (i.e. road hazards), just travel times and level of congestion. Could anyone point me in the right direction? Is what I'm looking to do even possible using just Apple data?
Topic:
App & System Services
SubTopic:
Maps & Location
A north american map that allows myself and family to drop pins and with those pins upload up to a min video to share w other users. This does not have to have navigation just a basic pin drop on a live map that uploads in real-ish time to share w other users ..... i am stuck at where to start, any suggestions or has anyone already made a version they could share advice ? much appreciated
Topic:
App & System Services
SubTopic:
Maps & Location
Apple Feedback Ticket: FB16804936
Background
We develop a parental control application called Adora Kids (https://apps.apple.com/us/app/adora-kids/id6443787669) that requires "Location Always" permission to function properly. Our app has Screen Time authorization and provides monitoring services for parents.
Issue
We are experiencing a recurring problem where child users receive the system notification "Adora accessed your location in the background" every few days. This frequently results in children disabling location permissions, which prevents our app from functioning as intended.
Current Approach and Limitations
We have explored using Content & Privacy Restrictions for Location Services as a potential solution, but have encountered two significant limitations:
These restrictions cannot be accessed programmatically via the ManagedSettings framework (unlike AppStoreSettings and other restrictions).
The current implementation is "all-or-nothing" - enabling location restrictions blocks permission changes for ALL apps on the device, preventing children from granting legitimate location access to other applications.
Questions
Is there a way to programmatically access and manage Content & Privacy Restrictions for Location Services through the ManagedSettings framework that we might have overlooked?
Are there any recommended approaches for apps with Screen Time authorization to prevent users from changing specific permissions (particularly location) while still allowing them to manage permissions for other apps?
Does Apple have plans to implement app-specific permission locking for apps with Screen Time authorization in future iOS releases?
Are there any alternative approaches or workarounds that other developers have successfully implemented for this use case?
Any guidance from the developer community or Apple engineers would be greatly appreciated. This is a critical functionality issue affecting the reliability of our parental control service.
Thank you in advance for your assistance.
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
Core Location
Family Controls
Managed Settings
There is no official documentation specifying the exact criteria for determining a CLVisit.
For example, if a user starts at a target location, will the following method be called?
func locationManager(_ manager: CLLocationManager, didVisit visit: CLVisit)
This did not work during my testing.
It was only successfully triggered when starting from a distant location and arriving at the target point.
It would be helpful to know the exact conditions, such as how long a user must stay at a location for it to be considered a visit. Are there any specific thresholds (e.g., minimum duration, distance moved) that determine when this method is triggered?
Topic:
App & System Services
SubTopic:
Maps & Location