Core Location

RSS for tag

Obtain the geographic location and orientation of a device using Core Location.

Posts under Core Location tag

200 Posts

Post

Replies

Boosts

Views

Activity

Apple Watch Ultra 2: headingAccuracy near 89° even with correct heading; intermittent 180° reversal
Apple Watch Ultra 2, watchOS 27.0, Xcode 27. I use CLLocationManager.startUpdatingHeading(), headingFilter=1 and CLHeading.magneticHeading directly, with no offset or GPS course. During surfing, my app and Apple Compass both showed an apparent error of about 180 degrees. The iPhone was not nearby or connected. Later, outside water, readings returned to normal. An analog compass on the opposite arm differed by about 30 degrees initially, then agreed. All saved Int(headingAccuracy) values were 89; it still displays 89 while the heading is correct. Raw fractional values were not saved. Is this an expected or sentinel value on watchOS? What calibration and diagnostics are recommended for the intermittent reversal? The app also uses an underwater-depth extended runtime session; its errors have not been linked to the heading issue.
0
0
21
2h
Xcode 27: CLLocationManager kCLErrorDomain Code=5
Dear Apple Developer Community, Our app monitors a user-defined region by using startMonitoring on an instance of CLLocationManager. While it works as intended on a real device, starting with Xcode 27, this method invocation always results in >locationManager ... monitoringDidFailFor< being called. The error code is always kCLErrorDomain Code=5 but this only occurs within iOS 27 simulators. It works perfectly in iOS 26 simulators. Additionally, CLLocationManager.isMonitoringAvailable(for: CLCircularRegion.self) always returns false on these iOS 27 simulators. This issue blocks parts of our automated system tests. Is it a bug or on purpose? Thank you in advance.
1
1
190
1d
iOS Background Location / Geofencing for Automatic Attendance — App Not Triggering Reliably
iOS Background Location / Geofencing for Automatic Attendance — App Not Triggering Reliably We are developing an enterprise attendance application called Attendo, which uses location-based geofencing for automatic employee check-in/check-out. Business requirement The application needs to work as follows: An employee is assigned an office/work location with a defined radius. When the employee enters the configured radius, the application should automatically record a Check-In. When the employee leaves the radius, the application should automatically record a Check-Out. This should happen without the employee having to open the application. The functionality needs to work even when the application is in the background and, where supported by iOS, after the application has been terminated. For example: «Office geofence = 200 meters Employee enters the 200 m radius → automatic Check-In Employee leaves the 200 m radius → automatic Check-Out» Current iOS implementation We are using iOS location services with: Location permission: Always Precise Location: enabled Background Location capability enabled Background location updates enabled Geofencing / region monitoring The application is intended to respond to location/geofence events without requiring the user to open the app. However, we are seeing cases where the application does not reliably receive/process the required location/geofence event when the application has been in the background for an extended period. The same business workflow works more reliably while the application is active. Our concern Our understanding is that iOS does not allow an application to maintain a continuously running background service in the same way that Android can. However, our requirement does not necessarily require continuous GPS polling if there is an Apple-supported mechanism that can reliably wake/relaunch the application when a user crosses a geofence. We would therefore like to understand the recommended architecture for this use case. Questions Is Core Location Region Monitoring the recommended mechanism for an enterprise geofencing application that needs to detect entry/exit while the app is not running? Can iOS relaunch the application after it has been terminated by the user/system when a monitored region is entered or exited? Is there any supported way to guarantee that an application will continue receiving location/geofence events after it has been in the background for a long period? Does enabling: "UIBackgroundModes = location" "allowsBackgroundLocationUpdates" "CLLocationManager" Region Monitoring provide the expected behavior, or are there additional requirements/configurations we should consider? Are there known limitations regarding: Low Power Mode device movement speed GPS/location accuracy stationary devices iOS terminating/suspending the application force-quitting the application from the App Switcher large/small geofence radius multiple monitored regions Is it possible to use significant-change location updates + region monitoring together for this type of attendance workflow? For an enterprise application where the user explicitly grants Always Allow Location permission and Precise Location is enabled, what level of reliability can realistically be expected from iOS geofencing? Important business constraint We cannot require employees to manually open the application every time they arrive at or leave the workplace. The objective is an automatic attendance system, where the employee's entry and exit from the workplace geofence is detected by iOS and the application records the corresponding attendance event. We understand that iOS is designed to protect battery life and user privacy and that continuous background execution may not be permitted. We are therefore looking for the Apple-recommended architecture for achieving this requirement using supported iOS APIs, rather than trying to circumvent iOS background execution policies. Any guidance from Apple engineers or developers who have implemented reliable enterprise geofencing would be greatly appreciated.
0
0
291
1w
Location Services stopped working across the system on macOS
MacBook Air (M4) Current build: macOS 27 Developer Beta (26A5368g) I have a system-wide Location Services failure affecting Apple Maps, Safari geolocation APIs, and any application requesting the current location. Symptoms: Apple Maps cannot determine current location. Safari and browser geolocation APIs fail. Websites report that location cannot be found. Location Services are enabled and permissions are granted. The issue has persisted across: macOS 26.5 beta macOS 26.6 beta macOS 26.6 beta 2 macOS 27 Developer Beta Troubleshooting already performed: Multiple Wi-Fi networks tested. iPhone hotspot tested. VPN enabled and disabled. Location Services reset. Permissions reset and reauthorized. New clean local user account created (no Apple ID, no third-party software). Issue reproduces identically in the clean account. Technical observations: locationd logs repeatedly show: knownCount = 0 AlsWifi = unknown while Wi-Fi scanning itself appears successful: queryMacAddresses.size = 57 The system sees dozens of nearby access points, but none appear to be recognized for Wi-Fi positioning. Additional findings: Wi-Fi hardware functions normally. Internet connectivity is normal. Bluetooth and Find My device presence work. GeoServices resources are present on disk. No successful location fix is ever produced. Has anyone seen similar CoreLocation / GeoServices behavior where Wi-Fi scans succeed but knownCount always remains 0 and no location fix is generated?
5
2
1.6k
1w
Background location indicator in Dynamic Island remains stuck after installing a new build over an app with an active location session
We are seeing a reproducible issue on a physical iPhone with Dynamic Island. Steps to reproduce Install and launch version 1 of the app locally. Start background location tracking using CLLocationUpdate.liveUpdates() together with CLBackgroundActivitySession. Move the app to the background. The blue location indicator appears in the Dynamic Island. While tracking is still active, install version 2 over the existing app. Open the updated app. Stop all location tracking: Cancel the CLLocationUpdate task. Call invalidate() on the CLBackgroundActivitySession. Release all references to the session. Move the app to the background again. Expected behavior The blue background location indicator disappears after the location updates and background activity session have been stopped. Actual behavior The blue location indicator remains permanently visible in the Dynamic Island, even though: No location updates are being received. No CLBackgroundActivitySession is retained. Starting and stopping another location session does not remove it. Force-quitting and reopening the app does not remove it. Only restarting the iPhone makes the indicator disappear. The problem occurs when a new build is installed over an existing installation while a background location session is active. Starting and stopping the same session normally within one installed version works as expected. Comparison with Live Activity background location The app also has a separate location feature that uses an active Live Activity to support background location updates without creating a CLBackgroundActivitySession. Installing a new build while that feature is active does not cause the blue location indicator to become stuck. The problem has only been reproduced when a CLBackgroundActivitySession is active during the installation. This suggests that the issue is specifically related to transferring or cleaning up CLBackgroundActivitySession state across an app update, rather than to CLLocationUpdate.liveUpdates() itself. Questions Is this a known issue with CLBackgroundActivitySession or CLLocationUpdate.liveUpdates()? Is there a supported way for the newly installed app process to invalidate or clean up a background location session created by the previous app process?
5
0
1k
1w
CLLocation.altitude under CarPlay reports 0.0 with a positive verticalAccuracy, and a second altitude outlier, both reproducible in Apple's Compass app
Hello, I'm Greg, the developer of EV Dashboard, an app for electric vehicle owners. I'm extending it with features that help drivers understand their efficiency, including elevation and grade along a drive. It works for most of my beta testers, but two behaviors have me stuck, and they raise the same question: both hand my app an altitude that is wrong by hundreds or thousands of meters while reporting a small, positive verticalAccuracy, so I have no field I can test to distinguish a measurement from a value that is not one. Both also reproduce in Apple's Compass app on a tester's phone, with none of my code in the path. A 35-second screen recording he sent me, at the same spot in Eagan, Minnesota, shows Compass reading 889ft (the true elevation, 271m), then 5996ft for about a second, then 889ft again, and then 0ft at the moment the "CarPlay - AirPlay Connected" banner appears. Screenshots attached. Setup in my app: one CLLocationManager per active scene, desiredAccuracy kCLLocationAccuracyBestForNavigation, standard location updates (not significant-change), authorization When In Use or Always depending on the tester. Elevation comes from CLLocation.altitude, with CMAltimeter relative altitude used to carry a known altitude between fixes. Case 1: accessory fixes under CarPlay report altitude 0.0 with a positive verticalAccuracy (FB24778173) On several vehicles, every fix whose sourceInformation.isProducedByAccessory is true arrives with altitude exactly 0.0 and a verticalAccuracy that is positive and constant for the whole session (19.0 on the cars I have traces from). In the same drives, the phone's own fixes read the true altitude, around 1,345m on one tester's route. ellipsoidalAltitude does not distinguish them either: it comes back as the geoid correction applied to the 0 (-16.5 to -17.4), so both fields agree on sea level. This is not fleet-wide, which is what makes it testable. Other vehicles deliver real altitude on accessory fixes, on the same app build, with verticalAccuracy 9.5 and values that agree with the phone within a few meters. So it appears to depend on the head unit, and an app cannot ask iOS for the phone's own fix while CarPlay is connected. The Compass recording above is the same behavior in a first-party app: 889ft before the connection, 0ft after it. Case 2: a fix with an altitude about 1,550m too high The same tester's iPhone has twice delivered fixes with altitude 1823.8 where the true elevation is about 271m, an error of roughly 1,552m, with verticalAccuracy 30.0 and horizontalAccuracy 5. These fixes report no speed and no course. The same value appeared on two separate days five days apart, at the same coordinates, identical to the tenth of a meter in both altitude (1823.8) and ellipsoidalAltitude (1796.4). Both times it was the first fix after a location manager started, with the vehicle at rest. Every other fix at that spot in his logs, 76 of them across a week, reads between 269.2m and 272.6m, most with verticalAccuracy 3.0. Compass showed 5996ft (1,827.6m) at that spot in the recording, within 4m of the value my app receives. Because the value repeats exactly across days, it does not look like a measurement. What I'm asking Are either of these known issues? My reading of the documentation is that a positive verticalAccuracy means the altitude is valid, with that value as one standard deviation. In both cases the error is 50 times the stated accuracy or more. Is there any supported way to recognize an altitude that CoreLocation did not measure? Should an accessory that supplies no altitude produce a negative verticalAccuracy, as an invalid altitude does elsewhere in CoreLocation? Is a fix with no speed and no course a reliable signal that it is not a live GNSS solution, and are cached or non-GNSS positions expected to carry an altitude at all? More generally, is there current guidance for obtaining elevation along a drive that I may have missed, particularly how CLLocation.altitude and CMAltimeter are intended to be combined, and what to expect from accessory-produced fixes under CarPlay? Happy to provide traces, the recording, or sysdiagnose for either case. Thanks, Greg
12
0
272
1w
CLServiceSession: how to check the diagnostics (authorisation status and accuracy authorisation) without prompting the user about location services (delay the prompt)?
Hello, I'm currently refactoring my app to use the new Core Location APIs introduced in iOS 17 (CLLocationUpdate) and iOS 18 (CLServiceSession). I'm not quite sure how best to reproduce the current flow I've in my app right now: At app launch: If location services are authorized when in use + full accuracy: get the user current location then stop. If the services are not yet determined or denied, do nothing. Later in the app, when a user taps on a button to get its current location: Not determined: prompt and get the user current location if authorised when in use with full accuracy, then stop. Denied: present an alert (open Settings). Authorised when in use Full accuracy: get the user current location then stop. Not full accuracy: present an alert (open Settings). My issue is that I can't find a way to determine the authorisation status without prompting the user. As soon as I create a CLServiceSession to inspect the diagnostics (CLServiceSession.Diagnostic), the user is prompted. So I can't use this at app launch as I want to delay the prompt until the user first interacts with the feature actually requiring location services. Do I still need to use CLLocationManager().authorizationStatus and CLLocationManager().accuracyAuthorization at app launch? Or am I missing something in the new APIs that allow me to check a session status without prompting? Thank you!
1
0
229
3w
NSLocationDefaultAccuracyReduced=true prevents upgrading location authorization from "When In Use" to "Always"
Setting NSLocationDefaultAccuracyReduced = true appears to prevent CLLocationManager.requestAlwaysAuthorization() from presenting the upgrade prompt after When In Use authorization has been granted. Repro https://github.com/Wenszel/core-location-always-repro Set NSLocationDefaultAccuracyReduced = true Start from a fresh location authorization state Call requestWhenInUseAuthorization() and choose Allow While Using App Call requestAlwaysAuthorization() Expected: The Always authorization upgrade prompt is presented. Actual: No prompt is presented Without NSLocationDefaultAccuracyReduced, the upgrade prompt is presented as expected. Additional case After granting When In Use, enable Precise Location in Settings and then call requestAlwaysAuthorization(). The upgrade prompt still does not appear, suggesting the issue is tied to NSLocationDefaultAccuracyReduced rather than the current CLAccuracyAuthorization. Environment iPhone 14 Pro, iOS 26.6.1 Also reproduced on iOS 26.4 Simulator
0
2
274
3w
MDM app cannot update a navigation app since iPadOs26.5?
Since iPadOS 26.5, when my application is running in background (non visible but with location fetching active in background), then my users are not able to update the application from their MDM application. The installation stays frozen, until the user manually kills my app. While in iPasOS 26.2 and older iOS, the MDM was able to terminate and update my app. My understanding: The MDM app can only terminate the non-interactive applications (maxTerminationResistance:NonInteractive). My application running in background with the location activated is seen as interactive. TestFlight and Appstore can terminate all applications (maxTerminationResistance:Absolute), so they are able to terminate and update my application. Can you confirm this has changed in the ios26 (after iPadOS26.2)? What are the recommendations to allow my users to update my app?
0
0
337
3w
Is activityType isolated between CLLocationManager and CLLocationUpdate.liveUpdates?
I am testing two Core Location clients running concurrently: V1: a delegate-based CLLocationManager with activityType set to .other V2: CLLocationUpdate.liveUpdates(.otherNavigation) I expect each client’s activityType and location processing to remain isolated. However, while V1 is running, V2 sometimes reports coordinates with a southward bend that appears aligned with a nearby mapped road. This occurs when traveling off-road beside that road. As a control, two independent delegate-based CLLocationManager instances remain independent and do not produce this bend. Reproduction steps: Grant Precise Location access with When In Use authorization. Start V1 and V2 together. Travel off-road beside a mapped road. Log each update’s source, timestamp, latitude, and longitude. Environment: iPhone 17 Pro iOS 26.6.1 (23G83) Xcode 26.6 (17F113) macOS 26.6.2 Is activityType expected to remain isolated when CLLocationManager and CLLocationUpdate run concurrently? What diagnostics would Apple recommend collecting to determine whether one client is affecting the other? I can provide the focused LocationActivityTypeBugSample project, raw logs, and an annotated screenshot.
2
0
376
Aug ’26
CLLocationManager: request for a maritime/sailing CLActivityType (low-acceleration, continuous-motion use case)
We 7develop a location-tracking backend for sailing regatta tracking (RegattaHero, GPS tracking of racing sailboats via a Flutter iOS app). We rely on CLLocationManager for continuous position updates during races that can last several hours. Problem: In light wind conditions, a sailboat can move at low but steady speed (e.g. 1-2 knots) with essentially no acceleration signature - unlike automotive or fitness activities, which involve intermittent acceleration/deceleration (starting, braking, footstrikes). We suspect Core Location's motion-based heuristics (built on accelerometer/motion coprocessor data, not solely GPS delta) interpret this near-constant, low-acceleration motion as "stationary" or low-priority, resulting in reduced update frequency or unexpected pausing of location updates. We have already set pausesLocationUpdatesAutomatically = false explicitly, which per documentation should prevent automatic pausing entirely - but we still observe degraded update behavior in these conditions. This suggests the effect is not limited to the auto-pause mechanism but also influences other parts of the positioning/update-frequency pipeline that key off activityType. We currently use activityType = .otherNavigation (the closest existing match, covering "boats" alongside cycling/trains/off-road vehicles), but this activity type appears tuned around vehicles with more typical acceleration profiles, not low-speed, low-acceleration marine drift. Steps to Reproduce: Set activityType = .otherNavigation, pausesLocationUpdatesAutomatically = false, desiredAccuracy = kCLLocationAccuracyBestForNavigation Track a device moving continuously at 1-3 knots with minimal acceleration variance (e.g. sailboat drifting/sailing in light wind, or equivalent slow, smooth continuous motion) over an extended period (30+ minutes) Compare update frequency/consistency to a scenario with typical stop-and-go motion (e.g. driving in traffic) Expected: Consistent location update delivery reflecting actual continuous movement, independent of acceleration variance, when pausesLocationUpdatesAutomatically is explicitly disabled. Actual: Update frequency/consistency appears to degrade during sustained low-acceleration, low-to-moderate-speed motion at sea, despite auto-pause being disabled. Suggestion: Either: (a) Add a dedicated CLActivityType case for marine/nautical navigation, with pause/throttling heuristics based on speed-over-ground rather than acceleration signatures, or (b) Document/expose a way to fully decouple update-frequency behavior from the motion-coprocessor-based heuristic when pausesLocationUpdatesAutomatically = false is set, so this flag reliably covers all related throttling behavior, not just the auto-pause feature itself.
0
0
260
Aug ’26
Does background CMDeviceMotion delivery depend on an active Core Location session?
I'm working on an iPhone app that continuously monitors device tilt with Core Motion. When the device has been held tilted forward past a threshold angle for a sustained period, the app raises a local notification. The detection has to keep running while my app is in the background. The situation I need to detect is, by definition, one where the user is looking at some other app — if my app were in the foreground, there would be nothing to detect. So a foreground-only implementation would not implement the feature at all. While testing this I ran into a behavior I would like to understand properly before I rely on it. What I observe CMMotionManager device-motion updates to a backgrounded app stop within a few seconds of the app leaving the foreground — unless a Core Location session is running at the same time. With location updates started under When In Use authorization and allowsBackgroundLocationUpdates = true, the device-motion callbacks continue for the whole time the app is backgrounded. Stop the location session, and they stop again. I built a focused sample to measure this. It starts device-motion updates at 10 Hz on a background OperationQueue and counts every callback, records the count on didEnterBackground, and on willEnterForeground logs how many arrived during the interval against how many would be expected at 10 Hz. Measured on an iPhone running iOS 26.5.2, launched from the Home screen with no debugger attached: location ON | background 137s | received 1366 / expected ~1373 (99.5%) location OFF | background 129s | received 2 / expected ~1286 (0.16%) Both callbacks in the second run arrived immediately after the transition to the background; nothing arrived over the remaining two minutes. One thing that cost me a test cycle, in case it saves someone else one: the difference only shows up when the app is launched from the Home screen. With the Xcode debugger attached the app is not suspended, and both cases deliver callbacks for the entire interval. The location session in the sample is configured as low as I can make it, since the app never reads the coordinates: manager.desiredAccuracy = kCLLocationAccuracyThreeKilometers manager.distanceFilter = 3000 manager.activityType = .other manager.pausesLocationUpdatesAutomatically = false manager.requestWhenInUseAuthorization() // started from the foreground, once authorization is granted manager.allowsBackgroundLocationUpdates = true manager.startUpdatingLocation() func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { // Intentionally empty. This sample does not use the location values. } My questions Is continuous CMDeviceMotion delivery to a backgrounded app dependent on an active Core Location session? Is that intended and expected behavior on current iOS versions, or an implementation detail I should not be relying on? If it is expected behavior, what configuration would you recommend for an app in this situation? Specifically, is kCLLocationAccuracyThreeKilometers with a large distanceFilter sufficient to sustain the session, or does reliable delivery require a higher accuracy or a smaller distance filter? Is there another supported API or background execution mechanism that delivers continuous device-motion or accelerometer data to a backgrounded app? I am aware of CMSensorRecorder for retrospective retrieval, but I need to react in near real time. I would like to be sure I am not overlooking a more appropriate API. Environment: iOS 18.0 and later, iPhone only, Swift / SwiftUI. I have the focused sample project available if it would be useful. Thanks very much for any help.
9
0
2.0k
Aug ’26
Does CloudKit persist all properties of a CLLocation instance?
I am preparing to save CLLocation data to CloudKit. In the dashboard, when you create a location object, you only can specify lat/long. In the archived CloudKit web services reference, the location dictionary shows more than that is being saved. https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/Types.html#//apple_ref/doc/uid/TP40015240-CH3-SW5 However, this is in the archive. I want to know via documentation if all of the current properties of a CLLocation are saved, and if it is reasonable to assume future fields would be too. The documentation was likely archived BEFORE properties like speedAccuracy, courseAccuracy, source, information floor, and ellipsoidal altitude. FB24049646 - CloudKit: Do all properties of CLLocation get persisted in CloudKit when setting a record value as CLLocation - CKWS archive reference Location Dictionary doesn't show new fields (speed/course accuracy, source info, floor, ellipsoidalAltitude)
0
0
660
Jul ’26
Inquiry about Compatibility Issues in iOS 26​
Dear Apple Team,​ We are reaching out regarding several compatibility issues our app users have encountered after upgrading to iOS 26. These issues not only affect our application but also seem to impact the system's native settings, which has raised concerns about the universality of these problems.​ Problem Description​ Bluetooth Functionality: When users attempt to use the Bluetooth feature within our app after upgrading to iOS 26, the app freezes completely. What's more, when accessing the Bluetooth section in the system Settings app, it also freezes and ultimately crashes.​ Location Service: The location service on the device becomes inoperable after the iOS 26 upgrade. However, both the Bluetooth and location service issues are resolved after the user restarts the device.​ 2. Questions​ Universality: We are eager to know if these issues are exclusive to our app or are a more widespread problem among other applications on iOS 26. Are these known compatibility glitches in iOS 26? ​ Avoidance: Is there any guidance or best - practice that we, as developers, can follow to avoid these issues in our app? For example, are there specific API calls or configurations that need to be adjusted? ​ System - level Impact: If these are system - level bugs related to Bluetooth and location services, will they affect all apps that rely on these features? Or are there certain app - level mitigations that can be implemented? ​ We would greatly appreciate it if you could provide us with any insights, solutions, or information regarding these issues. Your prompt response will be crucial for us to address these problems and ensure a smooth user experience for our customers.​ Thank you in advance for your assistance.​ Best regards,
2
1
1k
Jul ’26
Track workouts with HealthKit on iOS + GPS tracking
I've built an iOS app according to this WWDC25 video (https://developer.apple.com/videos/play/wwdc2025/322). I added GPS tracking for workouts. In Xcode, I've enabled Signing & Capabilities > Background Modes: Location Updates. And in my code, I request CLAuthorisationStatus.authorizedAlways. Everything works as expected, but I am unsure if .authorizedWhenInUse will not be sufficient for this kind of app. It seems even to work when I use .authorizedWhenInUse as either the Dynamic Island or the Live Activity is shown when the app is not in the foreground. I need clarification by an expert.
1
0
1.1k
Jul ’26
CLMonitor related crash - EXC_BAD_ACCESS (SIGSEGV)
Hello I started using CLMonitor on my App, and I am noticing the following crash on Xcode Organizer for dozens of my app users: Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000001 Exception Codes: 0x0000000000000001, 0x0000000000000001 VM Region Info: 0x1 is not in any region. Bytes before following region: …………. REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT ………-…….. [ 176K] r-x/r-x SM=COW /var/containers/Bundle/Application/.........../MyApp Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler […..] Thread 4 name: Thread 4 Crashed: 0 libswiftCoreLocation.dylib 0x000000021680b4c8 @objc completion handler block implementation for @escaping @callee_unowned @convention(block) (@unowned CLMonitor) -> () with result type CLMonitor + 44 (<compiler-generated>:0) 1 CoreLocation 0x0000000196cdddd4 __76-[CLMonitorConfiguration vendMonitorWithIdentityAndAuthorizationAttributes:]_block_invoke + 216 (CLMonitorConfiguration.m:195) 2 libdispatch.dylib 0x0000000191138370 _dispatch_call_block_and_release + 32 (init.c:1549) 3 libdispatch.dylib 0x000000019113a0d0 _dispatch_client_callout + 20 (object.m:576) 4 libdispatch.dylib 0x00000001911416d8 _dispatch_lane_serial_drain + 744 (queue.c:3934) 5 libdispatch.dylib 0x00000001911421e0 _dispatch_lane_invoke + 380 (queue.c:4025) 6 libdispatch.dylib 0x000000019114d258 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193) 7 libdispatch.dylib 0x000000019114caa4 _dispatch_workloop_worker_thread + 540 (queue.c:6787) 8 libsystem_pthread.dylib 0x0000000211933c7c _pthread_wqthread + 288 (pthread.c:2696) 9 libsystem_pthread.dylib 0x0000000211930488 start_wqthread + 8 Does anyone have similar issue when using CLMonitor? How can I debug / fix this issue? Is it an CLMonitor API bug? Should I file a bug report?
10
0
1.9k
Jul ’26
On Swift 6 func locationManager( _ manager: CLLocationManager, didUpdateLocations locations: [CLLocation] ) is never called
I did not modify in any way the relative code when porting to Swift 6, still locationManager( _ manager: CLLocationManager, didUpdateLocations locations: [CLLocation] ) is never called, notwithstanding of course there is the property in the info files and all required steps were performed. What did change in Swift 6 hampering the calling of the location callbacks?
4
1
913
Jul ’26
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
872
Jun ’26
Apple Watch Ultra 2: headingAccuracy near 89° even with correct heading; intermittent 180° reversal
Apple Watch Ultra 2, watchOS 27.0, Xcode 27. I use CLLocationManager.startUpdatingHeading(), headingFilter=1 and CLHeading.magneticHeading directly, with no offset or GPS course. During surfing, my app and Apple Compass both showed an apparent error of about 180 degrees. The iPhone was not nearby or connected. Later, outside water, readings returned to normal. An analog compass on the opposite arm differed by about 30 degrees initially, then agreed. All saved Int(headingAccuracy) values were 89; it still displays 89 while the heading is correct. Raw fractional values were not saved. Is this an expected or sentinel value on watchOS? What calibration and diagnostics are recommended for the intermittent reversal? The app also uses an underwater-depth extended runtime session; its errors have not been linked to the heading issue.
Replies
0
Boosts
0
Views
21
Activity
2h
Xcode 27: CLLocationManager kCLErrorDomain Code=5
Dear Apple Developer Community, Our app monitors a user-defined region by using startMonitoring on an instance of CLLocationManager. While it works as intended on a real device, starting with Xcode 27, this method invocation always results in >locationManager ... monitoringDidFailFor< being called. The error code is always kCLErrorDomain Code=5 but this only occurs within iOS 27 simulators. It works perfectly in iOS 26 simulators. Additionally, CLLocationManager.isMonitoringAvailable(for: CLCircularRegion.self) always returns false on these iOS 27 simulators. This issue blocks parts of our automated system tests. Is it a bug or on purpose? Thank you in advance.
Replies
1
Boosts
1
Views
190
Activity
1d
iOS Background Location / Geofencing for Automatic Attendance — App Not Triggering Reliably
iOS Background Location / Geofencing for Automatic Attendance — App Not Triggering Reliably We are developing an enterprise attendance application called Attendo, which uses location-based geofencing for automatic employee check-in/check-out. Business requirement The application needs to work as follows: An employee is assigned an office/work location with a defined radius. When the employee enters the configured radius, the application should automatically record a Check-In. When the employee leaves the radius, the application should automatically record a Check-Out. This should happen without the employee having to open the application. The functionality needs to work even when the application is in the background and, where supported by iOS, after the application has been terminated. For example: «Office geofence = 200 meters Employee enters the 200 m radius → automatic Check-In Employee leaves the 200 m radius → automatic Check-Out» Current iOS implementation We are using iOS location services with: Location permission: Always Precise Location: enabled Background Location capability enabled Background location updates enabled Geofencing / region monitoring The application is intended to respond to location/geofence events without requiring the user to open the app. However, we are seeing cases where the application does not reliably receive/process the required location/geofence event when the application has been in the background for an extended period. The same business workflow works more reliably while the application is active. Our concern Our understanding is that iOS does not allow an application to maintain a continuously running background service in the same way that Android can. However, our requirement does not necessarily require continuous GPS polling if there is an Apple-supported mechanism that can reliably wake/relaunch the application when a user crosses a geofence. We would therefore like to understand the recommended architecture for this use case. Questions Is Core Location Region Monitoring the recommended mechanism for an enterprise geofencing application that needs to detect entry/exit while the app is not running? Can iOS relaunch the application after it has been terminated by the user/system when a monitored region is entered or exited? Is there any supported way to guarantee that an application will continue receiving location/geofence events after it has been in the background for a long period? Does enabling: "UIBackgroundModes = location" "allowsBackgroundLocationUpdates" "CLLocationManager" Region Monitoring provide the expected behavior, or are there additional requirements/configurations we should consider? Are there known limitations regarding: Low Power Mode device movement speed GPS/location accuracy stationary devices iOS terminating/suspending the application force-quitting the application from the App Switcher large/small geofence radius multiple monitored regions Is it possible to use significant-change location updates + region monitoring together for this type of attendance workflow? For an enterprise application where the user explicitly grants Always Allow Location permission and Precise Location is enabled, what level of reliability can realistically be expected from iOS geofencing? Important business constraint We cannot require employees to manually open the application every time they arrive at or leave the workplace. The objective is an automatic attendance system, where the employee's entry and exit from the workplace geofence is detected by iOS and the application records the corresponding attendance event. We understand that iOS is designed to protect battery life and user privacy and that continuous background execution may not be permitted. We are therefore looking for the Apple-recommended architecture for achieving this requirement using supported iOS APIs, rather than trying to circumvent iOS background execution policies. Any guidance from Apple engineers or developers who have implemented reliable enterprise geofencing would be greatly appreciated.
Replies
0
Boosts
0
Views
291
Activity
1w
Location Services stopped working across the system on macOS
MacBook Air (M4) Current build: macOS 27 Developer Beta (26A5368g) I have a system-wide Location Services failure affecting Apple Maps, Safari geolocation APIs, and any application requesting the current location. Symptoms: Apple Maps cannot determine current location. Safari and browser geolocation APIs fail. Websites report that location cannot be found. Location Services are enabled and permissions are granted. The issue has persisted across: macOS 26.5 beta macOS 26.6 beta macOS 26.6 beta 2 macOS 27 Developer Beta Troubleshooting already performed: Multiple Wi-Fi networks tested. iPhone hotspot tested. VPN enabled and disabled. Location Services reset. Permissions reset and reauthorized. New clean local user account created (no Apple ID, no third-party software). Issue reproduces identically in the clean account. Technical observations: locationd logs repeatedly show: knownCount = 0 AlsWifi = unknown while Wi-Fi scanning itself appears successful: queryMacAddresses.size = 57 The system sees dozens of nearby access points, but none appear to be recognized for Wi-Fi positioning. Additional findings: Wi-Fi hardware functions normally. Internet connectivity is normal. Bluetooth and Find My device presence work. GeoServices resources are present on disk. No successful location fix is ever produced. Has anyone seen similar CoreLocation / GeoServices behavior where Wi-Fi scans succeed but knownCount always remains 0 and no location fix is generated?
Replies
5
Boosts
2
Views
1.6k
Activity
1w
Background location indicator in Dynamic Island remains stuck after installing a new build over an app with an active location session
We are seeing a reproducible issue on a physical iPhone with Dynamic Island. Steps to reproduce Install and launch version 1 of the app locally. Start background location tracking using CLLocationUpdate.liveUpdates() together with CLBackgroundActivitySession. Move the app to the background. The blue location indicator appears in the Dynamic Island. While tracking is still active, install version 2 over the existing app. Open the updated app. Stop all location tracking: Cancel the CLLocationUpdate task. Call invalidate() on the CLBackgroundActivitySession. Release all references to the session. Move the app to the background again. Expected behavior The blue background location indicator disappears after the location updates and background activity session have been stopped. Actual behavior The blue location indicator remains permanently visible in the Dynamic Island, even though: No location updates are being received. No CLBackgroundActivitySession is retained. Starting and stopping another location session does not remove it. Force-quitting and reopening the app does not remove it. Only restarting the iPhone makes the indicator disappear. The problem occurs when a new build is installed over an existing installation while a background location session is active. Starting and stopping the same session normally within one installed version works as expected. Comparison with Live Activity background location The app also has a separate location feature that uses an active Live Activity to support background location updates without creating a CLBackgroundActivitySession. Installing a new build while that feature is active does not cause the blue location indicator to become stuck. The problem has only been reproduced when a CLBackgroundActivitySession is active during the installation. This suggests that the issue is specifically related to transferring or cleaning up CLBackgroundActivitySession state across an app update, rather than to CLLocationUpdate.liveUpdates() itself. Questions Is this a known issue with CLBackgroundActivitySession or CLLocationUpdate.liveUpdates()? Is there a supported way for the newly installed app process to invalidate or clean up a background location session created by the previous app process?
Replies
5
Boosts
0
Views
1k
Activity
1w
CLLocation.altitude under CarPlay reports 0.0 with a positive verticalAccuracy, and a second altitude outlier, both reproducible in Apple's Compass app
Hello, I'm Greg, the developer of EV Dashboard, an app for electric vehicle owners. I'm extending it with features that help drivers understand their efficiency, including elevation and grade along a drive. It works for most of my beta testers, but two behaviors have me stuck, and they raise the same question: both hand my app an altitude that is wrong by hundreds or thousands of meters while reporting a small, positive verticalAccuracy, so I have no field I can test to distinguish a measurement from a value that is not one. Both also reproduce in Apple's Compass app on a tester's phone, with none of my code in the path. A 35-second screen recording he sent me, at the same spot in Eagan, Minnesota, shows Compass reading 889ft (the true elevation, 271m), then 5996ft for about a second, then 889ft again, and then 0ft at the moment the "CarPlay - AirPlay Connected" banner appears. Screenshots attached. Setup in my app: one CLLocationManager per active scene, desiredAccuracy kCLLocationAccuracyBestForNavigation, standard location updates (not significant-change), authorization When In Use or Always depending on the tester. Elevation comes from CLLocation.altitude, with CMAltimeter relative altitude used to carry a known altitude between fixes. Case 1: accessory fixes under CarPlay report altitude 0.0 with a positive verticalAccuracy (FB24778173) On several vehicles, every fix whose sourceInformation.isProducedByAccessory is true arrives with altitude exactly 0.0 and a verticalAccuracy that is positive and constant for the whole session (19.0 on the cars I have traces from). In the same drives, the phone's own fixes read the true altitude, around 1,345m on one tester's route. ellipsoidalAltitude does not distinguish them either: it comes back as the geoid correction applied to the 0 (-16.5 to -17.4), so both fields agree on sea level. This is not fleet-wide, which is what makes it testable. Other vehicles deliver real altitude on accessory fixes, on the same app build, with verticalAccuracy 9.5 and values that agree with the phone within a few meters. So it appears to depend on the head unit, and an app cannot ask iOS for the phone's own fix while CarPlay is connected. The Compass recording above is the same behavior in a first-party app: 889ft before the connection, 0ft after it. Case 2: a fix with an altitude about 1,550m too high The same tester's iPhone has twice delivered fixes with altitude 1823.8 where the true elevation is about 271m, an error of roughly 1,552m, with verticalAccuracy 30.0 and horizontalAccuracy 5. These fixes report no speed and no course. The same value appeared on two separate days five days apart, at the same coordinates, identical to the tenth of a meter in both altitude (1823.8) and ellipsoidalAltitude (1796.4). Both times it was the first fix after a location manager started, with the vehicle at rest. Every other fix at that spot in his logs, 76 of them across a week, reads between 269.2m and 272.6m, most with verticalAccuracy 3.0. Compass showed 5996ft (1,827.6m) at that spot in the recording, within 4m of the value my app receives. Because the value repeats exactly across days, it does not look like a measurement. What I'm asking Are either of these known issues? My reading of the documentation is that a positive verticalAccuracy means the altitude is valid, with that value as one standard deviation. In both cases the error is 50 times the stated accuracy or more. Is there any supported way to recognize an altitude that CoreLocation did not measure? Should an accessory that supplies no altitude produce a negative verticalAccuracy, as an invalid altitude does elsewhere in CoreLocation? Is a fix with no speed and no course a reliable signal that it is not a live GNSS solution, and are cached or non-GNSS positions expected to carry an altitude at all? More generally, is there current guidance for obtaining elevation along a drive that I may have missed, particularly how CLLocation.altitude and CMAltimeter are intended to be combined, and what to expect from accessory-produced fixes under CarPlay? Happy to provide traces, the recording, or sysdiagnose for either case. Thanks, Greg
Replies
12
Boosts
0
Views
272
Activity
1w
CLServiceSession: how to check the diagnostics (authorisation status and accuracy authorisation) without prompting the user about location services (delay the prompt)?
Hello, I'm currently refactoring my app to use the new Core Location APIs introduced in iOS 17 (CLLocationUpdate) and iOS 18 (CLServiceSession). I'm not quite sure how best to reproduce the current flow I've in my app right now: At app launch: If location services are authorized when in use + full accuracy: get the user current location then stop. If the services are not yet determined or denied, do nothing. Later in the app, when a user taps on a button to get its current location: Not determined: prompt and get the user current location if authorised when in use with full accuracy, then stop. Denied: present an alert (open Settings). Authorised when in use Full accuracy: get the user current location then stop. Not full accuracy: present an alert (open Settings). My issue is that I can't find a way to determine the authorisation status without prompting the user. As soon as I create a CLServiceSession to inspect the diagnostics (CLServiceSession.Diagnostic), the user is prompted. So I can't use this at app launch as I want to delay the prompt until the user first interacts with the feature actually requiring location services. Do I still need to use CLLocationManager().authorizationStatus and CLLocationManager().accuracyAuthorization at app launch? Or am I missing something in the new APIs that allow me to check a session status without prompting? Thank you!
Replies
1
Boosts
0
Views
229
Activity
3w
NSLocationDefaultAccuracyReduced=true prevents upgrading location authorization from "When In Use" to "Always"
Setting NSLocationDefaultAccuracyReduced = true appears to prevent CLLocationManager.requestAlwaysAuthorization() from presenting the upgrade prompt after When In Use authorization has been granted. Repro https://github.com/Wenszel/core-location-always-repro Set NSLocationDefaultAccuracyReduced = true Start from a fresh location authorization state Call requestWhenInUseAuthorization() and choose Allow While Using App Call requestAlwaysAuthorization() Expected: The Always authorization upgrade prompt is presented. Actual: No prompt is presented Without NSLocationDefaultAccuracyReduced, the upgrade prompt is presented as expected. Additional case After granting When In Use, enable Precise Location in Settings and then call requestAlwaysAuthorization(). The upgrade prompt still does not appear, suggesting the issue is tied to NSLocationDefaultAccuracyReduced rather than the current CLAccuracyAuthorization. Environment iPhone 14 Pro, iOS 26.6.1 Also reproduced on iOS 26.4 Simulator
Replies
0
Boosts
2
Views
274
Activity
3w
MDM app cannot update a navigation app since iPadOs26.5?
Since iPadOS 26.5, when my application is running in background (non visible but with location fetching active in background), then my users are not able to update the application from their MDM application. The installation stays frozen, until the user manually kills my app. While in iPasOS 26.2 and older iOS, the MDM was able to terminate and update my app. My understanding: The MDM app can only terminate the non-interactive applications (maxTerminationResistance:NonInteractive). My application running in background with the location activated is seen as interactive. TestFlight and Appstore can terminate all applications (maxTerminationResistance:Absolute), so they are able to terminate and update my application. Can you confirm this has changed in the ios26 (after iPadOS26.2)? What are the recommendations to allow my users to update my app?
Replies
0
Boosts
0
Views
337
Activity
3w
Is activityType isolated between CLLocationManager and CLLocationUpdate.liveUpdates?
I am testing two Core Location clients running concurrently: V1: a delegate-based CLLocationManager with activityType set to .other V2: CLLocationUpdate.liveUpdates(.otherNavigation) I expect each client’s activityType and location processing to remain isolated. However, while V1 is running, V2 sometimes reports coordinates with a southward bend that appears aligned with a nearby mapped road. This occurs when traveling off-road beside that road. As a control, two independent delegate-based CLLocationManager instances remain independent and do not produce this bend. Reproduction steps: Grant Precise Location access with When In Use authorization. Start V1 and V2 together. Travel off-road beside a mapped road. Log each update’s source, timestamp, latitude, and longitude. Environment: iPhone 17 Pro iOS 26.6.1 (23G83) Xcode 26.6 (17F113) macOS 26.6.2 Is activityType expected to remain isolated when CLLocationManager and CLLocationUpdate run concurrently? What diagnostics would Apple recommend collecting to determine whether one client is affecting the other? I can provide the focused LocationActivityTypeBugSample project, raw logs, and an annotated screenshot.
Replies
2
Boosts
0
Views
376
Activity
Aug ’26
CLLocationManager: request for a maritime/sailing CLActivityType (low-acceleration, continuous-motion use case)
We 7develop a location-tracking backend for sailing regatta tracking (RegattaHero, GPS tracking of racing sailboats via a Flutter iOS app). We rely on CLLocationManager for continuous position updates during races that can last several hours. Problem: In light wind conditions, a sailboat can move at low but steady speed (e.g. 1-2 knots) with essentially no acceleration signature - unlike automotive or fitness activities, which involve intermittent acceleration/deceleration (starting, braking, footstrikes). We suspect Core Location's motion-based heuristics (built on accelerometer/motion coprocessor data, not solely GPS delta) interpret this near-constant, low-acceleration motion as "stationary" or low-priority, resulting in reduced update frequency or unexpected pausing of location updates. We have already set pausesLocationUpdatesAutomatically = false explicitly, which per documentation should prevent automatic pausing entirely - but we still observe degraded update behavior in these conditions. This suggests the effect is not limited to the auto-pause mechanism but also influences other parts of the positioning/update-frequency pipeline that key off activityType. We currently use activityType = .otherNavigation (the closest existing match, covering "boats" alongside cycling/trains/off-road vehicles), but this activity type appears tuned around vehicles with more typical acceleration profiles, not low-speed, low-acceleration marine drift. Steps to Reproduce: Set activityType = .otherNavigation, pausesLocationUpdatesAutomatically = false, desiredAccuracy = kCLLocationAccuracyBestForNavigation Track a device moving continuously at 1-3 knots with minimal acceleration variance (e.g. sailboat drifting/sailing in light wind, or equivalent slow, smooth continuous motion) over an extended period (30+ minutes) Compare update frequency/consistency to a scenario with typical stop-and-go motion (e.g. driving in traffic) Expected: Consistent location update delivery reflecting actual continuous movement, independent of acceleration variance, when pausesLocationUpdatesAutomatically is explicitly disabled. Actual: Update frequency/consistency appears to degrade during sustained low-acceleration, low-to-moderate-speed motion at sea, despite auto-pause being disabled. Suggestion: Either: (a) Add a dedicated CLActivityType case for marine/nautical navigation, with pause/throttling heuristics based on speed-over-ground rather than acceleration signatures, or (b) Document/expose a way to fully decouple update-frequency behavior from the motion-coprocessor-based heuristic when pausesLocationUpdatesAutomatically = false is set, so this flag reliably covers all related throttling behavior, not just the auto-pause feature itself.
Replies
0
Boosts
0
Views
260
Activity
Aug ’26
Does background CMDeviceMotion delivery depend on an active Core Location session?
I'm working on an iPhone app that continuously monitors device tilt with Core Motion. When the device has been held tilted forward past a threshold angle for a sustained period, the app raises a local notification. The detection has to keep running while my app is in the background. The situation I need to detect is, by definition, one where the user is looking at some other app — if my app were in the foreground, there would be nothing to detect. So a foreground-only implementation would not implement the feature at all. While testing this I ran into a behavior I would like to understand properly before I rely on it. What I observe CMMotionManager device-motion updates to a backgrounded app stop within a few seconds of the app leaving the foreground — unless a Core Location session is running at the same time. With location updates started under When In Use authorization and allowsBackgroundLocationUpdates = true, the device-motion callbacks continue for the whole time the app is backgrounded. Stop the location session, and they stop again. I built a focused sample to measure this. It starts device-motion updates at 10 Hz on a background OperationQueue and counts every callback, records the count on didEnterBackground, and on willEnterForeground logs how many arrived during the interval against how many would be expected at 10 Hz. Measured on an iPhone running iOS 26.5.2, launched from the Home screen with no debugger attached: location ON | background 137s | received 1366 / expected ~1373 (99.5%) location OFF | background 129s | received 2 / expected ~1286 (0.16%) Both callbacks in the second run arrived immediately after the transition to the background; nothing arrived over the remaining two minutes. One thing that cost me a test cycle, in case it saves someone else one: the difference only shows up when the app is launched from the Home screen. With the Xcode debugger attached the app is not suspended, and both cases deliver callbacks for the entire interval. The location session in the sample is configured as low as I can make it, since the app never reads the coordinates: manager.desiredAccuracy = kCLLocationAccuracyThreeKilometers manager.distanceFilter = 3000 manager.activityType = .other manager.pausesLocationUpdatesAutomatically = false manager.requestWhenInUseAuthorization() // started from the foreground, once authorization is granted manager.allowsBackgroundLocationUpdates = true manager.startUpdatingLocation() func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { // Intentionally empty. This sample does not use the location values. } My questions Is continuous CMDeviceMotion delivery to a backgrounded app dependent on an active Core Location session? Is that intended and expected behavior on current iOS versions, or an implementation detail I should not be relying on? If it is expected behavior, what configuration would you recommend for an app in this situation? Specifically, is kCLLocationAccuracyThreeKilometers with a large distanceFilter sufficient to sustain the session, or does reliable delivery require a higher accuracy or a smaller distance filter? Is there another supported API or background execution mechanism that delivers continuous device-motion or accelerometer data to a backgrounded app? I am aware of CMSensorRecorder for retrospective retrieval, but I need to react in near real time. I would like to be sure I am not overlooking a more appropriate API. Environment: iOS 18.0 and later, iPhone only, Swift / SwiftUI. I have the focused sample project available if it would be useful. Thanks very much for any help.
Replies
9
Boosts
0
Views
2.0k
Activity
Aug ’26
Does setting "activityType" make sense?
I'm wondering if setting the correct activityType after initializing CLLocationManager will make the location results more accurate. locationManager = CLLocationManager() locationManager.distanceFilter = 20 locationManager.activityType = .fitness
Replies
2
Boosts
0
Views
832
Activity
Aug ’26
Does CloudKit persist all properties of a CLLocation instance?
I am preparing to save CLLocation data to CloudKit. In the dashboard, when you create a location object, you only can specify lat/long. In the archived CloudKit web services reference, the location dictionary shows more than that is being saved. https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/Types.html#//apple_ref/doc/uid/TP40015240-CH3-SW5 However, this is in the archive. I want to know via documentation if all of the current properties of a CLLocation are saved, and if it is reasonable to assume future fields would be too. The documentation was likely archived BEFORE properties like speedAccuracy, courseAccuracy, source, information floor, and ellipsoidal altitude. FB24049646 - CloudKit: Do all properties of CLLocation get persisted in CloudKit when setting a record value as CLLocation - CKWS archive reference Location Dictionary doesn't show new fields (speed/course accuracy, source info, floor, ellipsoidalAltitude)
Replies
0
Boosts
0
Views
660
Activity
Jul ’26
Inquiry about Compatibility Issues in iOS 26​
Dear Apple Team,​ We are reaching out regarding several compatibility issues our app users have encountered after upgrading to iOS 26. These issues not only affect our application but also seem to impact the system's native settings, which has raised concerns about the universality of these problems.​ Problem Description​ Bluetooth Functionality: When users attempt to use the Bluetooth feature within our app after upgrading to iOS 26, the app freezes completely. What's more, when accessing the Bluetooth section in the system Settings app, it also freezes and ultimately crashes.​ Location Service: The location service on the device becomes inoperable after the iOS 26 upgrade. However, both the Bluetooth and location service issues are resolved after the user restarts the device.​ 2. Questions​ Universality: We are eager to know if these issues are exclusive to our app or are a more widespread problem among other applications on iOS 26. Are these known compatibility glitches in iOS 26? ​ Avoidance: Is there any guidance or best - practice that we, as developers, can follow to avoid these issues in our app? For example, are there specific API calls or configurations that need to be adjusted? ​ System - level Impact: If these are system - level bugs related to Bluetooth and location services, will they affect all apps that rely on these features? Or are there certain app - level mitigations that can be implemented? ​ We would greatly appreciate it if you could provide us with any insights, solutions, or information regarding these issues. Your prompt response will be crucial for us to address these problems and ensure a smooth user experience for our customers.​ Thank you in advance for your assistance.​ Best regards,
Replies
2
Boosts
1
Views
1k
Activity
Jul ’26
Track workouts with HealthKit on iOS + GPS tracking
I've built an iOS app according to this WWDC25 video (https://developer.apple.com/videos/play/wwdc2025/322). I added GPS tracking for workouts. In Xcode, I've enabled Signing & Capabilities > Background Modes: Location Updates. And in my code, I request CLAuthorisationStatus.authorizedAlways. Everything works as expected, but I am unsure if .authorizedWhenInUse will not be sufficient for this kind of app. It seems even to work when I use .authorizedWhenInUse as either the Dynamic Island or the Live Activity is shown when the app is not in the foreground. I need clarification by an expert.
Replies
1
Boosts
0
Views
1.1k
Activity
Jul ’26
CLMonitor related crash - EXC_BAD_ACCESS (SIGSEGV)
Hello I started using CLMonitor on my App, and I am noticing the following crash on Xcode Organizer for dozens of my app users: Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000001 Exception Codes: 0x0000000000000001, 0x0000000000000001 VM Region Info: 0x1 is not in any region. Bytes before following region: …………. REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT ………-…….. [ 176K] r-x/r-x SM=COW /var/containers/Bundle/Application/.........../MyApp Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler […..] Thread 4 name: Thread 4 Crashed: 0 libswiftCoreLocation.dylib 0x000000021680b4c8 @objc completion handler block implementation for @escaping @callee_unowned @convention(block) (@unowned CLMonitor) -> () with result type CLMonitor + 44 (<compiler-generated>:0) 1 CoreLocation 0x0000000196cdddd4 __76-[CLMonitorConfiguration vendMonitorWithIdentityAndAuthorizationAttributes:]_block_invoke + 216 (CLMonitorConfiguration.m:195) 2 libdispatch.dylib 0x0000000191138370 _dispatch_call_block_and_release + 32 (init.c:1549) 3 libdispatch.dylib 0x000000019113a0d0 _dispatch_client_callout + 20 (object.m:576) 4 libdispatch.dylib 0x00000001911416d8 _dispatch_lane_serial_drain + 744 (queue.c:3934) 5 libdispatch.dylib 0x00000001911421e0 _dispatch_lane_invoke + 380 (queue.c:4025) 6 libdispatch.dylib 0x000000019114d258 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193) 7 libdispatch.dylib 0x000000019114caa4 _dispatch_workloop_worker_thread + 540 (queue.c:6787) 8 libsystem_pthread.dylib 0x0000000211933c7c _pthread_wqthread + 288 (pthread.c:2696) 9 libsystem_pthread.dylib 0x0000000211930488 start_wqthread + 8 Does anyone have similar issue when using CLMonitor? How can I debug / fix this issue? Is it an CLMonitor API bug? Should I file a bug report?
Replies
10
Boosts
0
Views
1.9k
Activity
Jul ’26
On Swift 6 func locationManager( _ manager: CLLocationManager, didUpdateLocations locations: [CLLocation] ) is never called
I did not modify in any way the relative code when porting to Swift 6, still locationManager( _ manager: CLLocationManager, didUpdateLocations locations: [CLLocation] ) is never called, notwithstanding of course there is the property in the info files and all required steps were performed. What did change in Swift 6 hampering the calling of the location callbacks?
Replies
4
Boosts
1
Views
913
Activity
Jul ’26
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
872
Activity
Jun ’26