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!
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
Hello within these last two updates find my location has been turned off for my other phone number, only a specific number can’t see my location, but everyone else can see my location, I am puzzled as to what is going on
Hi Team,
when our customers turn on bluetooth connectivity whether Apple creates a profile of the user or their locations and if it is used for any other purpose.
Could you please clarify this?
we are getting the below message in the Bluetooth permissions popup below the map "Information from Bluetooth devices can be used to determine your location and create a profile of you."
What is this profile? and what is the purpose of creating it while the user uses Bluetooth in ios app.
Topic:
App & System Services
SubTopic:
Maps & Location
I have a sample that stop working on IOS 26, using the latest XCode and IOS sdk, the onTapGesture event is no longer happening. Maybe this is no longer the way to drop pins on the map.
Also not working on the iPhone 17 sim or iPhone 16 max pro device upgrading to IOS 26
Thanks, any help
Sample:
import SwiftUI
import MapKit
import CoreLocation
import Foundation
struct Pin: Identifiable {
let id = UUID()
let coordinate: CLLocationCoordinate2D
}
struct ContentTestPinDropView: View {
@State private var pins: [Pin] = []
var body: some View {
MapReader { reader in
Map(selection: .constant(nil)) {
ForEach(pins) { pin in
Marker("Pin", coordinate: pin.coordinate)
}
}
.onTapGesture { screenPoint in
if let coordinate = reader.convert(screenPoint, from: .local) {
pins.append(Pin(coordinate: coordinate))
}
}
}
}
}
We are using MapKit JS Look Around and initializing it like this:
window.lookAround = new mapkit.LookAround(
document.getElementById('container'),
new mapkit.Coordinate(listingLocation[1], listingLocation[0]),
{openDialog: false})
;
This results in a Look Around scene being displayed correctly but the camera heading is not pointing towards the lat/lng that is passed to initialization. The example lat/lng that we're using is: lat=30.004195, lng=-95.59973
This lat/lng corresponds to the address: 11943 Laurel Meadow Dr, Tomball, TX 77377. The camera is pointing to the other side of the street to house number 11946. If you look for that address in Apple Maps the Look Around points to the correct house.
Is there a way to either specify the heading so that Look Around points in the correct heading?
Sample link: https://s.hartech.io/zFP2KnsCbsP
Hello,
I am developing with the Nearby Interaction framework using third-party UWB accessories (Murata SR040/SR150).
I observed a difference between U1-based and U2-based iPhones:
iPhone 12 Pro (U1 chip)
NINearbyObject.direction returns valid 3D vector (x, y, z).
Distance and direction both work as expected.
iPhone 15 Pro and iPhone 16 Pro (U2 chip)
NINearbyObject.direction is always nil.
Only distance is returned (around 0.35–0.40 m in my test).
Effectively behaves as "distance-only mode".
Environment:
Hardware: iPhone 12 Pro, iPhone 15 Pro
iOS version: 18.5
Accessory: Murata UWB SR040 / SR150
App: Using NINearbyAccessoryConfiguration with BLE-based discovery
Info.plist includes NSNearbyInteractionUsageDescription
Camera assistance was tested both ON and OFF
Expectation:
I expected the U2 chip to behave consistently with U1, i.e. provide direction vectors when possible.
Instead, on iPhone 15 Pro, direction is always unavailable (nil) while distance is returned correctly.
Questions:
Is this an intentional limitation for U2 chip + third-party accessories?
Is there a new requirement (e.g. certification, firmware update, capability flags) to enable direction on U2 devices?
Could this be related to NIDeviceCapability or the new Extended Distance Measurement (EDM) mode in U2?
Thanks in advance for any clarification.
Hello,
We are a software and hardware development company for the forestry and environmental sectors. We have been based in Quebec (Canada) for over 30 years now. Our Canadian market covers Quebec, Ontario, and the Maritime provinces in the east. We are currently expanding across Canada and into the northern United States. We are on Android platforms with several map and data entry applications.
To ensure the success of our expansion, we aim to become part of the Apple family, which is why we are contacting you today.
We have developed our own GNSS receiver to increase the location accuracy of our users. This device is called GSFGPS. It uses Bluetooth BLE to communicate with mobile devices and a high-precision GPS that transmits its position using the NMEA protocol. We would like this device to be compatible with an iPhone/iPad. We have developed a mock location application in MAUI (multi-platform). Based on our interpretation of your documentation, we understand that the concept of mock location does not exist at Apple. How can we ensure that our Bluetooth GNSS device is compatible with your iPhone/iPad devices and that they can use the position of the Bluetooth device rather than the internal GPS of your devices?
We are a reseller for Juniper Systems, and we know that they have an app on the App Store that has the same features as our product.
https://junipersys.com/index.php/support/article/14709
We look forward to your follow-up and recommendations.
CLLocation.sourceInformation.isSimulatedBySoftware not detecting third-party location spoofing tools
Summary
CLLocationSourceInformation.isSimulatedBySoftware (iOS 15+) fails to detect location spoofing when using third-party tools like LocaChange, despite Apple's documentation stating it should detect simulated locations.
Environment
iOS 18.0 (tested and confirmed)
Physical device with Developer Mode enabled
Third-party location spoofing tools (e.g., LocaChange etc.)
Expected Behavior
According to Apple's documentation, isSimulatedBySoftware should return true when:
"if the system generated the location using on-device software simulation. "
Actual Behavior
Tested on iOS 18.0:
When using LocaChange
sourceInformation.isSimulatedBySoftware returns false
This occurs even though the location is clearly being simulated.
Steps to Reproduce
Enable Developer Mode on iOS 18 device
Connect device to Mac via USB
Use LocaChange to spoof location to a different city/country
In your app, request location updates and check CLLocation.sourceInformation?.isSimulatedBySoftware
Observe that it returns false or sourceInformation is nil
Compare with direct Xcode location simulation (Debug → Simulate Location) which correctly returns true
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
Security
Core Location
Maps and Location
Since integrating MapKit JS, we’ve begun receiving production error reports with the following message:
Uncaught DataCloneError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': ArrayBuffer is not detachable and could not be cloned.
It appears that MapKit JS’s internal worker occasionally calls postMessage() with an ArrayBuffer that cannot be detached under Chrome 120+. This causes the structured clone to fail and the error surfaces uncaught from within the worker.
MapKit JS Version: 5.79.109
Browser: Chrome 120.0+
OS: Windows 10
Is this a known issue with MapKit JS? If so, are there recommended workarounds or planned fixes?
Since iOS 26, the Apple Maps share sheet no longer provides a com.apple.mapkit.map-item attachment when sharing a location to my Share Extension.
Additionally, on real devices the shared URL is now a short link (https://maps.apple/p/...), which does not contain coordinates.
On the simulator, the URL still includes coordinates (as in previous iOS versions).
I'm trying to find the official or recommended way to extract coordinates from these new short URLs.
Environment:
Devices: iPhone (real device) on iOS 26.0 / 26.0.1
Simulator: iOS 26.0 / 26.0.1 simulator (behaves like iOS 18 — see below)
App: Share Extension invoked from Apple Maps -> Share -> my app
Xcode: 26.0.1
Steps to Reproduce
Open Apple Maps on iOS 26 (real device).
Pick a POI (store/restaurant).
Share -> choose my share extension.
iOS 18 and earlier
(lldb) po extensionContext?.inputItems
▿ Optional<Array<Any>>
▿ some : 1 element
- 0 : <NSExtensionItem: 0x60000000c5d0> - userInfo: {
NSExtensionItemAttachmentsKey = (
"<NSItemProvider: 0x600002930d20> {types = (\"public.plain-text\")}",
"<NSItemProvider: 0x600002930c40> {types = (\"com.apple.mapkit.map-item\")}",
"<NSItemProvider: 0x600002930bd0> {types = (\"public.url\")}"
);
}
Typical URL:
https://maps.apple.com/place?address=Apple%20Inc.,%201%20Apple%20Park%20Way,%20Cupertino,%20CA%2095014,%20United%20States&coordinate=37.334859,-122.009040&name=Apple%20Park&place-id=I7C250D2CDCB364A&map=explore
iOS 26
(lldb) po extensionContext?.inputItems
▿ 1 element
- 0 : <NSExtensionItem: 0x6000000058d0> - userInfo: {
NSExtensionItemAttachmentsKey = (
"<NSItemProvider: 0x600002900b60> {types = (\"public.url\")}",
"<NSItemProvider: 0x600002900fc0> {types = (\"public.plain-text\")}"
);
}
URL looks like:
https://maps.apple/p/U8rE9v8n8iVZjr
On simulator iOS 26 same missing map-item provider - but the URL is still long and contains coordinates, like this:
https://maps.apple.com/place?coordinate=37.334859,-122.009040&name=Apple%20Park&..
Issue
The short URLs (maps.apple/p/...) cannot be resolved directly - following redirects ends with:
https://maps.apple.com/unsupported
The only way I've found to get coordinates is to intercept intermediate redirects - one of them contains the expanded URL with coordinate=....
Example of my current workaround:
final class RedirectSniffer: NSObject, URLSessionTaskDelegate {
private(set) var redirects: [URL] = []
func urlSession(_ session: URLSession,
task: URLSessionTask,
willPerformHTTPRedirection response: HTTPURLResponse,
newRequest request: URLRequest) async -> URLRequest? {
if let url = request.url {
redirects.append(url)
}
return request
}
}
Then I look through redirects to find a URL containing "coordinate=".
This works, but feels unreliable and undocumented.
Questions
Was the removal of com.apple.mapkit.map-item from the Maps share payload intentional in iOS 26?
If yes, is there a new attachment type or API to obtain an MKMapItem?
What’s the official or supported way to resolve https://maps.apple/p/... to coordinates?
Is there any MapKit API or documented URL scheme for this?
Is intercepting redirect chains the only option for now?
Why does the iOS 26 simulator still return coordinate URLs, while real devices don't?
Hi,
I have been working with an implementation of MapKit which show custom annotations with a detailCalloutAccessoryView built using SwiftUI. This has been working fine for many years, but starting with macOS Tahoe, somehow the SwiftUI buttons in this view have stopped being tappable.
I have reproduced the issue in the code below ... same code works fine in macOS14 and macOS15 now doesn't work correctly in macOS26:
import Cocoa
import MapKit
import SwiftUI
class ViewController: NSViewController {
private var mapView: MKMapView!
override func viewDidLoad() {
super.viewDidLoad()
setupMapView()
}
private func setupMapView() {
// Create and configure the map view
mapView = MKMapView()
mapView.translatesAutoresizingMaskIntoConstraints = false
mapView.delegate = self
view.addSubview(mapView)
// Pin the map to all edges of the view
NSLayoutConstraint.activate([
mapView.topAnchor.constraint(equalTo: view.topAnchor),
mapView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
mapView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
mapView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])
// Create an annotation for San Francisco
let sanFranciscoCoordinate = CLLocationCoordinate2D(latitude: 37.7749, longitude: -122.4194)
let annotation = MKPointAnnotation()
annotation.coordinate = sanFranciscoCoordinate
annotation.title = "San Francisco"
annotation.subtitle = "The City by the Bay"
// Add the annotation to the map
mapView.addAnnotation(annotation)
// Center the map on San Francisco
let region = MKCoordinateRegion(center: sanFranciscoCoordinate,
latitudinalMeters: 5000,
longitudinalMeters: 5000)
mapView.setRegion(region, animated: false)
}
}
// MARK: - MKMapViewDelegate
extension ViewController: MKMapViewDelegate {
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
let identifier = "CustomAnnotation"
var annotationView = mapView.dequeueReusableAnnotationView(withIdentifier: identifier) as? MKMarkerAnnotationView
if annotationView == nil {
annotationView = MKMarkerAnnotationView(annotation: annotation, reuseIdentifier: identifier)
annotationView?.canShowCallout = true
// Create the SwiftUI view for the callout
let calloutView = CalloutContentView()
let hostingView = NSHostingView(rootView: calloutView)
hostingView.frame = NSRect(x: 0, y: 0, width: 200, height: 100)
// Set the SwiftUI view as the detail callout accessory
annotationView?.detailCalloutAccessoryView = hostingView
} else {
annotationView?.annotation = annotation
}
return annotationView
}
}
// MARK: - SwiftUI Callout View
struct CalloutContentView: View {
var body: some View {
VStack(spacing: 12) {
Text("Welcome to San Francisco!")
.font(.headline)
.multilineTextAlignment(.center)
HStack(spacing: 12) {
Button(action: {
print("Directions button tapped")
}) {
Label("Directions", systemImage: "arrow.triangle.turn.up.right.circle.fill")
.font(.caption)
}
.buttonStyle(.borderedProminent)
Button(action: {
print("Info button tapped")
}) {
Label("Info", systemImage: "info.circle.fill")
.font(.caption)
}
.buttonStyle(.bordered)
}
}
.padding()
.frame(width: 200)
}
}
I've looked at other problems with Map and onTap handlers not getting called, but this is a SwiftUI view inside an AppKit MapKit annotation's callout view.
Any idea of how to handle this?
Hello,
This is my first post in the forums, and I'm still learning my way with iOS Development and Swift. My apologies if the formatting is not correct, or If I'm making any mistakes.
I'm currently trying to implement an iOS App where the device needs to share the location with my server via an API call.
The use case is as follows: the server expects location updates to determine if a device is inside/outside a geofence. If the device is stationary, no locations need to be sent. If the device begins moving, regardless of whether the app is in foreground, background, or terminated, the app should resume posting locations to the server.
I've decided to use the CLLocationUpdate.liveUpdates() stream, together with CLBackgroundActivitySession().
However, I have not been able to achieve the behavior successfully. My app either maintains the blue CLActivitySession indicator active, regardless of whether the phone is stationary or not, or kills the Indicator (and the background capability) and does not restore it when moving again. Below I've attached my latest code snippet (the indicator disappears and does not come back).
// This method is called in the didFinishLaunchingWithOptions
func startLocationUpdates(precise: Bool) {
// Show the location permission pop up
requestAuthorization()
// Stop any previous sessions
stopLocationUpdates()
Task {
do {
// If we have the right authorization, we will launch the updates in the background
// using CLBackgroundActivitySession
if self.manager.authorizationStatus == .authorizedAlways {
self.backgroundActivity = true
} else {
self.backgroundActivity = false
self.backgroundSession?.invalidate()
}
// We will start collecting live location updates
for try await update in CLLocationUpdate.liveUpdates() {
// Handle deprecation
let stationary = if #available(iOS 18.0, *) {
update.stationary
} else {
update.isStationary
}
// If the update is identified as stationary, we will skip this update
// and turn off background location updates
if stationary {
self.backgroundSession?.invalidate()
continue
}
// if background activity is enabled, we restore the Background Activity Session
if backgroundActivity == true { self.backgroundSession = CLBackgroundActivitySession() }
guard let location = update.location else { continue }
// Do POST with location to server
}
} catch {
print("Could not start location updates")
}
}
}
I'm not sure why the code does not work as expected, and I believe I may be misunderstanding how the libraries Work. My understanding is that the liveUpdates stream is capable of emitting values, even if the app has gone to the background/terminated, thus why I'm trying to stop/resume the Background Activity using the "stationary" or "isStationary" attribute coming from the update.
Is the behavior I'm trying to achieve possible? If so, I'm I using the right libraries for it? Is my implementation correct? And If not, what would be the recommended approach?
Regards
I'm working on an in-house iOS app designed to help users accurately track their routes during trips. Currently, I've implemented a method to track users when the app is open in the background. However, I'm facing challenges, as the tracking stops when the device is locked for more than 10 minutes.
I'm looking for a solution to continuously track a user's geolocation, even if the app is closed or not in use. Specifically, I want to ensure uninterrupted tracking, especially when the device is locked.
Here are some key points:
Current Method: I'm currently using the Core Location method and a combination of background tasks and a repeating timer to fetch the user's location and update a log for geolocation tracking when the app is open in the background.
Issues Faced: The tracking stops when the device is locked for more than 10 minutes. This limitation impacts the accuracy of the route tracking during longer trips.
Objective: My goal is to achieve continuous geolocation tracking, even when the app is closed or not actively used, to provide users with a seamless and accurate record of their routes.
Platform: The app is developed for iOS using the .net maui platform, and I'm seeking solutions or suggestions that are compatible with the iOS .net maui environment.
If anyone has experience or insights into achieving continuous geolocation tracking on iOS, especially when the app is not in use or the device is locked, I would greatly appreciate the assistance.
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
Core Location
Background Tasks
Maps and Location
This question has been asked several times by other users before. But there is no solution provided it seems. So I am asking the same here. I have a screen where I add mapview as a subview. In that it is showing instead of "Legal".
Hi, based on https://developer.apple.com/help/account/configure-app-capabilities/create-a-maps-identifier-and-private-key described, I need to create an Identifier before I can create JWT for MapKit JS. However, I cannot find Maps Ids checkbox when I attempt to set up first MapKit JS access.
I am writing to address a concern regarding the background permission functionality in my app, which is critical for ensuring user safety as they navigate various terrains. This feature also enables users to smoothly record their navigation tracks for review after their activities. Recently, I've noticed that this functionality is not working as seamlessly as before.
Additionally, I observed that the app is not categorized under 'health and fitness'—could reclassifying it improve background activity? Before I delve into a detailed code review, I wanted to check if this issue might be related to sync or settings on the App Store side, such as permission configurations, app updates, or other related factors. Or, is it more likely an issue stemming from the app’s codebase?
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
Maps Web Snapshots
Health and Fitness
Core Location
Background Tasks
I am working on an iOS app where I need to detect when a user starts and stops driving using the Apple Core Motion framework. I've implemented the following MotionActivityManager class to handle activity updates and display the detected states in a SwiftUI view.
While I can accurately detect "Stationary" and "Walking" states, detecting the "Driving" (Automotive) state has been unreliable. The accuracy often fails, and the framework frequently misclassifies driving as other states like "Unknown" or "Walking."
Here's the implementation:
@Published var motionStates: [MotionState] = []
@Published var startDate: String = ""
@Published var confidence: String = ""
init() {
setupDefaultStates()
startActivityUpdates()
}
private func setupDefaultStates() {
motionStates = [
MotionState(label: "Stationary", value: false),
MotionState(label: "Walking", value: false),
MotionState(label: "Running", value: false),
MotionState(label: "Automotive", value: false),
MotionState(label: "Cycling", value: false),
MotionState(label: "Unknown", value: false)
]
}
func startActivityUpdates() {
guard CMMotionActivityManager.isActivityAvailable() else {
print("Motion activity is not available.")
return
}
motionActivityManager.startActivityUpdates(to: .main) { [weak self] motion in
guard let self = self, let motion = motion else { return }
DispatchQueue.main.async {
self.updateProperties(with: motion)
}
}
}
private func updateProperties(with motion: CMMotionActivity) {
motionStates = [
MotionState(label: "Stationary", value: motion.stationary),
MotionState(label: "Walking", value: motion.walking),
MotionState(label: "Running", value: motion.running),
MotionState(label: "Automotive", value: motion.automotive),
MotionState(label: "Cycling", value: motion.cycling),
MotionState(label: "Unknown", value: motion.unknown)
]
startDate = dateFormatter.string(from: motion.startDate)
switch motion.confidence {
case .low:
confidence = "Low"
case .medium:
confidence = "Medium"
case .high:
confidence = "High"
@unknown default:
confidence = "Unknown"
}
}
}
struct MotionState: Identifiable {
let id = UUID()
let label: String
let value: Bool
}
struct ContentView: View {
@StateObject private var motionManager = MotionActivityManager()
var body: some View {
ScrollView {
VStack(spacing: 16) {
ForEach(motionManager.motionStates) { state in
LabelView(label: state.label, value: state.value ? "True" : "False")
}
LabelView(label: "Confidence", value: motionManager.confidence)
}
.padding()
}
.onAppear {
UIApplication.shared.isIdleTimerDisabled = true
motionManager.startActivityUpdates()
}
.navigationTitle("Motion Activity")
}
}
Issues:
The motion.automotive state is often not detected accurately.
The confidence level remains low for the automotive state, even when the device is clearly in a car.
How can I improve the detection accuracy of the "Driving" state using the Core Motion framework?
Hi All,
I am currently working on an app that has some navigation functionality, and since my minimum iOS is 18 wanted to incorporate the new APIs that yield a AsyncStream of locations. I have watched both WWDC sessions, the one where the new API is introduced to retrieve the location points, and also the other video where the new authorization process for location is simplified as well.
I have an app currently working in its current state, but am noticing some weird quirks when using the CLBackgroundActivitySession to get the elevated background permission.
What I am doing here is to create this stream and the background object is below:
return AsyncThrowingStream { continuation in
let task = Task {
do {
for try await update in CLLocationUpdate.liveUpdates(updateType) {
if shouldStopUpdate {
continuation.finish()
break
}
continuation.yield(update)
}
} catch {
continuation.finish(throwing: error)
}
}
state = .started(locationTask: task, background: CLBackgroundActivitySession())
}
When I have an active navigation session going and am strongly holding this object and the user force quits the app (or I stop the target through Xcode) the navigation activity indicator in the status bar (or dynamic island) remains present. Even if I relaunch the app, start navigation again, and then call the invalidate method on the CLBackgroundActivitySession I then am seeing that navigation indicator even if I delete my app, and often need to do a full restart to get out of this state.
Is there a step I am missing, or do I not understand the way the new API works to run in the background?
I have some questions about the changes that the latest IOS doesn't act (scanning or monitoring) for our custom beacon devices.
Since about 2015, We has provided some 'location based service' by using our custom iBeacon devices.
However We've just realized that the latest IOS devices doesn't work with our custom iBeacon devices.
but also realized It could still work with the other normal iBeacon devices.
So, I've dig this issues for a while and finally I got the answer. It's because the one byte of Ibeacon advertsing packet payload.
the followings are the differences about manufacturer data part between a normal Ibeacon and our custom beacon.
normal Ibeacon
0xFF 0x4C00 0x02 0x15 0x736E75685F70656F706C655F74656331 0xEA61 0x03EB 0xC5
our custom Ibeacon
0xFF 0x4C00 0x02 0x15 0x736E75685F70656F706C655F74656331 0xEA61 0x03EB 0xC5 0xDA
Yes, I know.
after many of searches and research,
Now I've understood the byte (meaning the length of following payload) should be changed as '0x16'.
But It is certainly something that has worked well not so long ago.
Anyway,
The introduction was so long, but this is the one question what I'd like to ask about.
I need to know exactly which version of IOS this change came from.
(I've tried but I couldn't find any thing about this on the official documents.)
I need to expaing to my customers what's going on.
for that, I need the information that exactly which version of IOS It didn't work from.
Thanks in advance.
Regards.
My organization, Los Angeles Pierce College, rents space to "Topanga Vintage Market", which is a monthly weekend swap meet operation.
Apple Maps shows the location as roughly 34.18715° N, 118.58058° W. However, this is the location of the campus Child Development Center, which provides child care services and is not open during the hours of the Topanga Vintage Market.
The actual location should be in the adjacent large parking lot, roughly 34.18740° N, 118.57782° W. They do not have a physical building.
How do I get this resolved? I am putting a campus mapping application into the App Store real soon now.
There is also an entry for "ALC Taco Truck" about 34.18533° N, 118.57349° W, which as far as I know has not been on campus since Covid.
Thanks in advance for any guidance you can provide.
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
MapKit JS
MapKit
Maps and Location
Apple Maps Server API