We’re implementing a feature in our app that allows a certified MFi GPS device to act as the default location source for user positioning, replacing the internal GPS when connected. However, we’re noticing a significant discrepancy between the accuracy values reported by iOS and those directly available from the GPS device.
Here’s the issue:
When the MFi GPS is in use, it transmits standard NMEA messages (GGA, GSA, RMC, etc.) to the iOS device (providing HDOP and VDOP). However, the accuracy reported by iOS for this “location-system” seems to be less precise than what the GPS device itself reports.
For example, here are the readings we observe:
Location from iOS device (systemLocation):
Position: <+41.4, +1.8> +/- 5.00m (speed 0.05 m/s / course 329.40)
Timestamp: 6/11/24, 12:01:50 Central European Standard Time
Horizontal Accuracy (from systemLocation): 5.0 meters (16 ft)
Vertical Accuracy (from systemLocation): 9.5 meters (31 ft)
Location from GPS device directly:
Horizontal Accuracy: 9.1 ft
Vertical Accuracy: 10.3 ft
It’s evident that the accuracy values displayed by iOS differ from the values available from the GPS device, especially in terms of horizontal and vertical accuracy.
Question: Is there a known reason for this discrepancy in accuracy values? Is there a way to obtain the GPS device’s native accuracy values in iOS, or is iOS applying additional filtering or adjustments that might explain this difference? If additional filtering is applied can be disabled?
Any insights would be greatly appreciated, as accurate location reporting is critical for our app’s functionality.
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
I am working on a duress app and would like to improve location accuracy by encouraging users to enable Wi-Fi. In Apple Maps, I noticed that when Wi-Fi is off, a dialog prompts users to turn on Wi-Fi to enhance location accuracy. I am looking to implement similar functionality in my app.
Specifically, I would like to check whether Wi-Fi is enabled on the user's device (even if it is not connected to a network). Despite exploring several methods, I have been unable to determine a reliable way to check the Wi-Fi status.
Can you guide me on whether it is possible to access this functionality in iOS, and if so, how I can implement it within my app?
I'm currently testing the CLMonitor API and have a question about CLServiceSession management.
When my app is relaunched from a terminated state in the background due to CLMonitor events, do I still need to create and maintain a CLServiceSession instance?
I'm wondering if CLServiceSession is necessary even when I don't need to continuously receive GPS updates through liveUpdates. Since CLMonitor can trigger app launches for region monitoring events without requiring constant location updates, I'm unclear about whether the CLServiceSession is still required in this scenario.
Any clarification on the proper implementation would be greatly appreciated.
Thanks!
hi,
When changing the map to Satellite in Apple Maps and centering it on Ōmuta City, Fukuoka Prefecture, Japan (as shown in the image), the app crashes when swiping to the right. This issue also occurs in MapKit, and I confirmed it happens in Apple Maps as well. It seems that either the satellite map tiles are missing or an error is occurring.
Our application is experiencing a crash, and this has become a serious issue.
Since September 1, crashes have increased significantly. Initially, we suspected that the issue was due to our application’s implementation, but our investigation revealed that the problem lies with the map tiles being called through MapKit.
Could you please investigate this issue and provide a fix?
As GeoCoder is now deprecated I am struggling to get the country only information from the new MKReverseGeocoding.
Maybe someone can guide me or give me direction? Or is this just not possible anymore?
let request = MKReverseGeocodingRequest(location: self.lastLocation ?? fallbackLocation)
request?.getMapItems { items, error in
guard let items = items else { return }
self.cityName = items.first?.addressRepresentations?.cityWithContext ?? ""
self.countryName = items.first?.addressRepresentations?.regionName ?? ""
}
I couldn't find anything here, sure you can get the full Address but I need single values to store so the user can search for (example City, Country)
In case the structure is always the same, let us say the country is always third part, sure I could split the string but it is not a reliable way to do this, at least for me.
Any help would be much appreciated.
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))
}
}
}
}
}
The easiest way to explain this is to show it. On any device, open Maps, set it to Driving (which will show traffic). Go to Baltimore Maryland. In the water just south east of the city there is a bridge (Francis Scott Key Bridge). . On Apple Maps the road is colored dark red.
At certain zoom levels, there is a "button" (red circle with a white - in it). When you click on that "button", it says 1 Advisory (Road Closed).
How do I show this "button" on my map. My map shows the dark red color, but no "button" appears.
The only "advisory" that I've been able to find is when you create a route. Of course you can't create a route over a road that fell into the water.
struct ContentView: View {
@State private var position = MapCameraPosition.region(
MKCoordinateRegion(
center: CLLocationCoordinate2D(latitude: 39.22742855118304, longitude: -76.52228412310761),
span: MKCoordinateSpan(latitudeDelta: 0.05407607689684113, longitudeDelta: 0.04606660133347873)
)
)
var body: some View {
Map(position: $position)
.mapStyle(.standard(pointsOfInterest: .all, showsTraffic: true))
.cornerRadius(25)
}
}
Is this a WCDWAD, or is there a way to show the "button"
(We Can't Do What Apple Does)
First of all, my English skills are not good, so I wrote an AI program and sent it to complete the questions. sorry.
I'm developing a safety monitoring application that requires continuous BLE scanning for temperature and humidity sensors. I need clarification on the technical feasibility of background and sleep mode operation.
Key Requirements:
Continuous monitoring of BLE advertisements from temperature/humidity sensors
Must detect critical temperature/humidity changes immediately
Data logging every minute
Includes navigation features showing routes
Technical Questions:
Background Mode Operation
If using background modes (bluetooth-central + location):
Can we receive BLE advertisements reliably?
What is the actual scanning interval limitation?
Will CBCentralManagerScanOptionAllowDuplicatesKey limitation affect critical monitoring?
Sleep Mode Operation
Can the app maintain BLE scanning during device sleep?
Would combining with navigation background mode help?
Are there any recommended approaches for continuous monitoring?
Sample Code of Current Approach:
let options: [String: Any] = [
CBCentralManagerOptionShowPowerAlertKey: true,
CBCentralManagerOptionRestoreIdentifierKey: "uniqueIdentifier"
]
centralManager = CBCentralManager(delegate: self, queue: nil, options: options)
// Scanning setup
centralManager.scanForPeripherals(
withServices: [serviceUUID],
options: [CBCentralManagerScanOptionAllowDuplicatesKey: true]
)
Has anyone successfully implemented continuous BLE monitoring in background/sleep modes? Are there any special entitlements or techniques that could help achieve this?
This is for a safety-critical application where missing sensor data could lead to serious issues.
Any guidance would be greatly appreciated.
This is a standalone SwiftUI app w/ watchOS 11.
To make things simple, I'm using the new concurrent API, like that:
for try await update in CLLocationUpdate.liveUpdates() { … }
watchOS is supposed to show the auth dialog, but it doesn't show up, even though update.authorizationRequestInProgress is true.
What could be the reason?
(Note that I also tried with the procedural old CLLocationManager API, it doesn't work that way as well)
Is there a way to obtain the information associated to multiple places at once? For example, instead of passing a single placeID, passing an array of placeIDs, and getting the basic info such as the name, the coordinates, etc.
Topic:
App & System Services
SubTopic:
Maps & Location
I want a solution to keep tracking the user once he started in driving state until parking.
I tried many solutions like use significant location changes, and silent push notifications and background tasks, but no one of them worked as expected.
I need when user started in driving the app be active until the user parked his car.
I'm using CoreMotion and CoreLocation.
The challenge is when the app is not active like killed or suspended.
So, how to do this? is this possible or not?
Hello,
I’m experiencing an issue with my iOS app that uses CoreBluetooth in combination with beacon monitoring. My app is designed to wake via beacon region monitoring and then start scanning for a specific BLE peripheral (with specific service UUIDs). When the device screen is bright (i.e., the device is unlocked, or locked but the screen is active/bright), everything works perfectly—the connection is established and maintained without any issues in both: foreground and background.
However, when the device is left alone for a while and the lock-screen dims (sleeps), the app continues to run in the background and range the beacon (I can confirm this via realtime console logs), but the connection attempt fails. Here’s what I observe:
The central manager’s delegate method didConnect is called, indicating that the peripheral was connected.
Almost immediately afterward, didDisconnect is triggered with the error message:
"The specified device has disconnected from us.".
The interesting part is (I repeatedly see this error in the console, because the app repeatedly tries to connect to peripheral until a success), when I touch the lockscreen (not unlock, but just touch, which makes the screen to light up brighter), the connection is being established without any further issues!
I have the necessary background modes enabled in the app’s capabilities (e.g., bluetooth-central, location-always-mode, etc..). My expectation was that, thanks to beacon monitoring, the app would be awakened when needed, and scanning/connection would work reliably in the background regardless of whether the device is active or dimmed.
My questions are:
Why might the connection fail with this error when the device is locked/dimmed?
Is this behavior expected due to iOS power management policies even if the app remains active in the background?
Is there a way to ensure a reliable connection in such cases?
Any insights, workarounds, or suggestions would be greatly appreciated. Thank you in advance!
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
Core Location
Background Tasks
Core Bluetooth
I am able to fetch the location in foreground and background.
I need just confirmation that can we get location apps killed state.
If It's possible then how can I do that.
According to the following article, the CLCircularGeographicCondition has a limit whereby only 20 conditions can be monitored by any single app.
Monitoring the user’s proximity to geographic regions
While I understand the rationale behind this limit, 20 conditions seems quite low for some apps. It would be good if an app could request that the user opt-in to allowing more conditions if they understand the impact this might have on the battery etc.
I'm migrating an app presently to use CLCircularGeographicCondition instead of the now deprecated CLCircularRegion. It would be good if there were more guidance on how to use the new Core Location API's to monitor how many conditions are in use within an app and how they can be deactivated when no longer required, allowing the app to free up more of the 20 conditions available.
I have tried to make colored annotations in mapView (shown in the commented sections) but they always appear in black. Any help would be appreciated.
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
let annotationView = MKAnnotationView(annotation: annotation, reuseIdentifier: "TempAnnotationView")
annotationView.canShowCallout = true
annotationView.rightCalloutAccessoryView = UIButton(type: .detailDisclosure)
let configuration = UIImage.SymbolConfiguration(pointSize: 10, weight: .thin, scale: .default)
if annotation.title == "Start" {
// let config = UIImage.SymbolConfiguration.preferringMulticolor()
// let image = UIImage(systemName: "flag.fill", withConfiguration: config)
// // palette
// let config2 = UIImage.SymbolConfiguration(paletteColors: [.systemRed, .systemGreen, .systemBlue])
// let image2 = UIImage(systemName: "person.3.sequence.fill", withConfiguration: config2)
// // hierarchical symbols
// let config3 = UIImage.SymbolConfiguration(hierarchicalColor: .systemIndigo)
// let image3 = UIImage(systemName: "square.stack.3d.down.right.fill", withConfiguration: config3)
// // color
// let image4 = UIImage(systemName: "cone.fill")?.withTintColor(.systemRed, renderingMode: .alwaysTemplate)
// annotationView.image = image4
annotationView.image = UIImage(systemName: "poweron", withConfiguration: configuration)
}
return annotationView
}
I'm calling .startUpdatingLocation() from the background to detect user's location but the updates stop shortly after they start.
The issue seem to also be discussed here:
https://developer.apple.com/forums/thread/726945
I wonder if any solution has been found?
This is a critical feature for our app.
I have:
kCLLocationAccuracyBestForNavigation
allowsBackgroundLocationUpdates = true
pausesLocationUpdatesAutomatically = false
Location Updates in background modes
distanceFilter not set or kCLDistanceFilterNone
Hello all,
I have a food delivery app that I am beginning to implement CarPlay support in. Route picking, navigation, turn-by-turn guidance features all work perfectly on iPhone, and on CarPlay while the iPhone is unlocked, or locked but screen on.
However, when the iPhone is locked and the screen is off, the CarPlay map view stops following the user's location and appears to be frozen. When this happens, the other "map buttons" that are part of the CPMapTemplate continue to accept user input (I can enter and exit the map panning mode for example), the user's location continues to update, and the turn-by-turn guidance continues as normal. It appears to be just the map view (which is drawn on the window and is not part of the CPMapTemplate) that stops updating in this state.
I've been through every page of Apple documentation on CarPlay but nothing references or addresses how to keep the CarPlay session active while the iPhone is locked. I'm not sure where else to look for answers and I'm out of theories as to why this might happen.
Any guidance around this would be greatly appreciated.
We developed a app in which the I need the app to update the User's location even in background( even after terminating from the recent UI ),
Currently I am receiving the location updates when the user has kept the app in open and if minimised,
But I want that it should update the location even when it is removed from recent app (minimised UI)(after terminating the app)
Is it possible to do so.???
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
Core Location
Maps and Location
SwiftUI
Background Tasks
Hey All,
Seem to be in a loop and unable to proceed.
New app specific for iOS being built on xCode. Project is configured only to deploy and use iOS, not macOS or anything else.
Trying to create a new App iD always see it default to all platforms which means "Background Modes" is not visible or available.
Automatic signing etc in xcode can't seem to get around this and just continues to flag I'm missing the entitlement for locations.background.
Not sure what I am missing as I cannot manually configure the ID for iOS only and xcode is also generating new ID's with the same platform structure and constraints.
Any thoughts or insights here please?
Loading tile overlays is slow even when the raster data is locally available on the device running iOS 18.2 and built with Xcode 16.2.
In this video (https://3dtopo.com/superSlowTileLoading.mov) it takes 38 seconds to load tiles readily available on the device. Then, the whole screen flashes when tiles that are already drawn are redrawn, making for a very poor user experience. 38 seconds to load a dozen or so small images (512x512) stored locally on the device is simply unacceptable. I can't release a product like this that I've spent the last 1.5 years building and many years developing the maps themselves. This severe issue is new since I committed to basing my app on MapKit.
Note that this issue does not occur with Apple's base map tiles.
I created a Feedback Assitant case, FB16110803, for this issue.
For the video, I disabled loading any tiles from the network and disabled loading any other data, such as polylines. Essentially all I am doing is loading the tiles stored on the device and returning them, such as:
public func loadTile(at path: MKTileOverlayPath, result: @escaping (Data?, Error?) -> Void) {
fetchData(forKey: key,
failure: {error in result(nil, error)},
success: {data in result(data, nil)})
}
open func fetchData(forKey key: String, failure fail: ((Error?) -> ())? = nil, success succeed: @escaping (Data) -> ()) {
let path = self.path(forKey: key)
do {
let data = try Data(
contentsOf: URL(fileURLWithPath: path),
options: Data.ReadingOptions())
succeed(data)
self.updateDiskAccessDate(atPath: path)
} catch {
if let block = fail {
block(error)
}
}
}