Core Location

RSS for tag

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

Posts under Core Location tag

69 Posts

Post

Replies

Boosts

Views

Activity

Any update during WWDC26 on UWB direction-finding for 3rd party devices using the NI framework, etc?
Kind folks, Was all setup for online access to several Q&A sessions at this WWDC, even posted some questions. But other priorities on my project prevented me from attending. Did any of you hear any news on direction finding with 3rd party devices at this year's WWDC? My current understanding is that (for iPhones later than 15) the NI framework returns null for direction. Apple recommends use of the ARkit in conjunction with NI (tech session way back in WWDC22!) FYI, I've been trying hard to get any information on this topic. Would be happy to share what public information/speculation I've found (including how Apple get's such good range and direction info in their Find My app for their AirTag 2 😉). Perhaps we can set up a small discussion group for sharing insights and experiences with emerging UWB technology. Comments appreciated. Mike
2
0
87
2d
CLLiveLocationUpdates stops delivering updates after several weeks with app never launched – Diagnostics report "Service Session Required"
Hi, I'm working on a trip detection and recording app that relies on CLLiveLocationUpdates for the location tracking. We've observed a recurring issue where trip recording eventually stops working if the app is not opened for an extended period of time (approximately 2–3 weeks). What we observe The app continues to be installed on the device. The user does not manually open the app during this period. Eventually, trip detection and recording stop. Location diagnostics indicate: Service Session Required At this point, CLLiveLocationUpdates no longer appears to deliver location events. Recovery attempts We've tried several ways to recover without launching the app: Turning Location Services off/on Rebooting the device Changing location permissions None of these restore location updates. The only reliable recovery method we've found is: Open the app manually. Leave it running for some time. Kill the app again. After doing this, location tracking resumes and works normally for 4-5 days before eventually failing again with the same "Service Session Required" diagnostic. Questions Why would a valid location setup eventually transition into a "Service Session Required" state after the app has not been launched for several weeks? Are there any documented conditions under which an existing CLServiceSession expires, becomes invalid, or requires recreation? Is there a recommended way to recover from this state programmatically without requiring the user to manually launch the app? Is this expected behavior or a potential issue with CLLiveLocationUpdates / CLServiceSession? Additional details iOS version: 26 App uses: CLLiveLocationUpdates, Beacon Ranging & Beacon Monitoring, SLC updates, Motion Activity Updates Background location enabled: Yes Authorization type: Always Device models tested: iPhone 14 Pro Max Service session creation code: private var serviceSession: CLServiceSession? serviceSession = CLServiceSession( authorization: .always, fullAccuracyPurposeKey: "Trip" ) Has anyone else encountered a similar issue after long periods where the app is not launched? Thanks.
0
0
20
2d
iPad Compass Calibration Issues: Impact of Magnetic Cover
We have developed an iPad application using the ARCL (AR + CoreLocation) library to render Point of Interest (POI) annotations in both an AR view and a standard MapView. The application performs as expected on standard devices. However, we have some iPad covered with strong magnet. This creates significant magnetic interference, resulting in a 90° to 180° heading offset, rendering the AR POI placement and MapView orientation unusable. Technical Challenges & Constraints: Hardware Lock: The magnetic cover is a mandatory business requirement and cannot be removed during field use. Sensor Failure: The internal magnetometer cannot provide an accurate North reference due to the proximity of the cover’s magnets. While CoreLocation and CoreMotion use sensor fusion, the magnetometer remains the primary source for absolute heading. Alternative Orientation Tracking: Is there a documented method to bypass the magnetometer and derive device orientation using only the Gyroscope and Accelerometer (e.g., relative tracking) while still maintaining alignment with geographic coordinates in CoreLocation? Programmatic Offsets: Are there known APIs or mathematical workarounds to programmatically "nullify" or offset a constant magnetic bias once the device is inside the cover? so we can use that offset for ARView and in Mapview as well.
2
0
381
1w
Core location Accuracy is worst on WiFi network but works best with Cellular network
I am currently using Core location to get user's current location and few surrounding coordinates to draw annotations in Augmented reality. It works best on Cellular network and on Wifi network few times it is working ok and sometimes orientation is completely changed when device is connected to WiFi. Checked on Apple map as well, there itself it was giving wrong orientation and even after user is at same location, current location on map got fluctuating. On WiFi only models GPS accuracy is not good.
1
0
342
1w
Is our background location strategy correct?
Hey everyone, in our project, the architecture sets all location services through one CLLocationManager, configured for navigation accuracy with background updates enabled. Start/stop is condition driven, so we track location while navigating, free-driving, connected to CarPlay or to a BLE device and stop immediately (no timeout) when none of those hold and the app is backgrounded. On stop() we tear down everything, including startMonitoringSignificantLocationChanges . BLE Device connection forces full background location for as long as it's paired and requires “Always authorization”. We keep one continuously-updating CLLocationManager (navigation accuracy, no distance filter, no auto pause) alive in the background whenever we're navigating, free-driving, connected to CarPlay, or to a BLE device using a CLBackgroundActivitySession on iOS 17+. Is a single always-best-accuracy manager the right approach, or should we be downgrading accuracy / using pausesLocationUpdatesAutomatically in some states for battery or performance? Any pitfalls with CLBackgroundActivitySession lifecycle we should watch for? As I wrote above, when the BLE accessory connects we force full background location on for the entire duration it's paired, and we require “Always authorization” for the BLE link to survive backgrounding. Is keeping location running the whole time an accessory is connected the right model? Thanks for the opportunity and have a great day!
1
0
131
1w
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
3
0
429
1w
[Regression] Core Location underground positioning inaccurate on iOS 26.1 beta (23B5044i)
Summary While parallel testing Core Location on the new iOS 26.1 beta (23B5044i), I observed what I believe to be a regression of the issue described here: https://developer.apple.com/forums/thread/779192 Specifically, user positioning underground subway stations is noticeably inaccurate on the beta, whereas the same scenarios remain accurate on the unupgraded device below. I work with the MTA (New York City) and work with the OP of that thread. Happy to provide additional testing or details if helpful. Please let me know what else you need. Test Info Riding NYCT from Wall St to 34th St Penn Station on the 2 train carrying two iphones Recording: https://limewire.com/d/dpTWi#pDC3GRYIdE Expected: Consistent underground positioning comparable to prior releases. Actual: Degraded/inaccurate underground positioning on iOS 26.1 beta. Test Devices Left Screen: iPhone 15 Pro Max - iOS 26.1 beta (23B5044i) Right Screen: iPhone 11 - iOS 18.6.2 (22G100) Blue dots show location set by CoreLocation. Red dot on iphone 11 shows the actual location of both devices as I was able to manually place while travelling through a station. Placement through tunnels is not easy to verify and not usually indicated. Timestamps Comparison of when train was actually observed in a station vs when 26.1 and 18.6.2 CoreLocation updated to the station Fulton St 1:48 iOS 26.1 correctly updates (correctly) 2:16 iOS 18.6.2 updates (28sec late) Park Place 4:12 train arrives 4:15 iOS 18.6.2 updates to ~near Park Place 5:04 iOS 18.6.2 updates to Park Place (correctly) 6:07 iOS 26.1 update to ~near Park Place (over 2 mins late) Chambers St 6:02 train arrives / iOS 18.6.2 updates (correctly) 6:14 iOS 26.1 updates to ~near Chambers 6:18 iOS 26.1 update to Chambers (correctly) Franklin St 6:52 train arrives 6:55 iOS 18.6.2 updates (correctly) x:xx iOS 26.1 does not update Canal St: 7:16 train arrives 7:18 iOS 18.6.2 updates (correctly) x:xx iOS 26.1 does not update Houston St 7:54 train arrives 8:00 iOS 18.6.2 updates (correctly) x:xx iOS 26.1 does not update Christopher St 8:37 iOS 26.1 presumably between Houston St and Christopher St 8:40 train arrives / iOS 18.6.2 updates (correctly) x:xx iOS 26.1 does not update 14 St 9:22 train arrives 9:28 iOS 18.6.2 updates (correctly) 11:01 as train departs station iOS 26.1 updates (1.5 mins late)
4
0
614
1w
Navigation Directional Information Permissions
I am developing a navigation application. My goal is for this navigation app to also work in the background and provide the user with real-time directional updates. When apps request access to location services, users see a TCC (Transparency, Consent, and Control) prompt. This prompt allows the user to choose under what conditions the app can access location services (for example: “While Using the App”, “Always”, etc.). If the user selects the “While Using the App” option, can the navigation app still access location in the background and provide directional information to the user? Is something like this technically possible? Does Apple allow this behavior for navigation apps or similar use cases?
1
0
192
1w
Working with visits and significant location changes following Core Location updates in iOS 17 and iOS 18
Hello, I'm working on an application that requires the use of significant location changes and visits, in addition to region monitoring and standard continuous location delivery (foreground and background). iOS 17 and iOS 18 introduced changes to how we can monitor distinct regions of interest (with CLMonitor) as well as receive location updates (with CLLocationUpdate). But I couldn't find any information regarding how to work with Significant location changes. Do we still need to create a location manager and call startMonitoringSignificantLocationChanges()? Where are the updates received in this case, in the locationManager(_:didUpdateLocations:) or in the liveUpdates async sequence? Visits. Same question here, for visit monitoring to work, do we still have to create a location manager then call startMonitoringVisits()? Where are the visits being notified? Still in locationManager(_:didVisit:) or in the liveUpdates asynchronous sequence? I just want to be sure I understand correctly how to use the updates, and if some features of Core Location still need to use a location manager and the delegate to receive the events. Maybe additional CLCondition will be added to cover both of these technologies as it seems highly related to monitoring conditions (significant location change, and visit). Thank you, Axel
1
0
271
1w
Location Verification API's
Dear Apple Team, I am reaching out regarding the need for more sophisticated location verification APIs beyond basic IP lookup capabilities. As online fraud continues to evolve, IP-based geolocation has proven insufficient for many business use cases requiring accurate location verification. Would it be possible to discuss this proposal with your API development team? I believe this would be valuable for the entire iOS and macOS developer ecosystem while maintaining Apple's commitment to user privacy.
1
0
194
1w
Background Location Tracking Not Reliably Relaunching App After Termination
We are developing a mileage tracking application that depends on continuous background location updates on iOS. Our app has the required background modes enabled: <key>UIBackgroundModes</key> <array> <string>remote-notification</string> <string>processing</string> <string>fetch</string> <string>location</string> </array> We are observing inconsistent behavior with background location tracking in app terminated state. In some cases, after a period of time, location updates stop completely. Sometimes iOS successfully relaunches the app when movement is detected and location updates resume correctly. However, in other cases, the app is not relaunched by the system, and we stop receiving location updates entirely. We reviewed Apple’s documentation on handling background location updates: https://developer.apple.com/documentation/corelocation/handling-location-updates-in-the-background Based on our observations, we would appreciate clarification on the following points: Is this considered expected iOS behavior or a system limitation? Under what conditions does iOS decide not to relaunch a terminated app for location events? Are there recommended best practices to improve the reliability of background location relaunch behavior? Is there any logging, diagnostics, or debugging mechanism available to determine why the app was not relaunched? Apple’s documentation mentions that location updates may be queued while the app is terminated and later delivered after relaunch. However, in some scenarios we do not receive those queued updates after the app restarts. Under what conditions can queued location updates be discarded or not delivered? Additional notes: We are using standard Core Location background updates. “Always” location permission is granted. Background App Refresh is enabled. The issue is observed intermittently across multiple iOS devices.
4
0
509
2w
iOS 26 — significant location changes & region monitoring no longer relaunching terminated apps
I'm observing significant location changes & region monitoring no longer relaunching terminated apps on iOS 26. Configuration: Deployment target: iOS 17, tested on iOS 26.4.2 UIBackgroundModes: location NSLocationAlwaysAndWhenInUseUsageDescription granted (authorizationStatus = .authorizedAlways) allowsBackgroundLocationUpdates = true Using legacy APIs: startMonitoringSignificantLocationChanges() and startMonitoring(for: CLCircularRegion) NSLocationRequireExplicitServiceSession key is NOT set (relying on implicit service session) Data logged into UserDefaults Observed behavior on iOS 26.4.2: Scenario A — app suspended in background (not force-quit): Both significant location changes and CLCircularRegion exit events deliver reliably for the entire trip. didUpdateLocations and didExitRegion fire as expected with appState = .background. Scenario B — app force-quit by user from App Switcher: Over a 30km / 1-hour drive crossing many SLC distance thresholds and many 2km region boundaries, the app is never relaunched. application(_:didFinishLaunchingWithOptions:) is never called with UIApplicationLaunchOptionsLocationKey. No background delegate callbacks fire. The same code on iOS 18 and earlier did relaunch the app from force-quit via SLC. Questions: Is the iOS 26 behavior in Scenario B intentional — i.e., has Apple tightened enforcement of the documented "user-terminated apps do not receive SLC until reopened/rebooted" policy? Does this enforcement now also cover region monitoring (CLCircularRegion and CLMonitor), as our test indicates? If intentional, is there any supported API path that allows a Pro location-aware app to be relaunched after force-quit WITHOUT displaying the persistent location indicator (blue arrow / pill)? CLBackgroundActivitySession appears to always show the indicator.
0
0
262
May ’26
Guidance needed on iOS location-based local notification accuracy
We are working on a feature that uses geo-based local notifications to target users when they arrive at an airport. Our implementation uses UNLocationNotificationTrigger with CLCircularRegion. The local notification is scheduled after the user has granted notification permission and location permission. We are currently using “While Using the App” location permission and with enabled location updates in capabilities We have used CLMonitor as well for the same. However, we are seeing inconsistent accuracy and missed triggers, even after testing with users who have granted the required permissions. we did use CLMonitor as well but we are getting the trigger on the entry of specified region. Could you please help us understand the constraints and expected behavior for location-based notification triggers on iOS? Specifically, we would like guidance on the following: What parameters influence UNLocationNotificationTrigger accuracy and reliability? What is the recommended minimum radius for geofencing around large areas such as airports? Does “While Using the App” permission have any practical limitations for location-based local notification delivery? Are there system-level conditions that may prevent or delay the trigger, such as Precise Location being off, Low Power Mode, Focus mode, Background App Refresh, airplane mode, or poor GPS/network availability or any others? Are there recommended best practices for improving reliability for an airport-arrival use case?
0
0
170
May ’26
Lifecycle and Usage of CLServiceSession after the app is terminated
Hi, I am creating a Driving Behaviour Monitoring app in which I range beacons and I require location updates in foreground, background and in terminated state all the time. I am using CLServiceSession with "Always Authorisation" to get location events. I create CLServiceSession object in the foreground and start monitoring driving and then re-create it when the app is relaunched after termination. Doing this works fine. But sometimes when app is terminated and is not opened again, the app runs on its own even when the device is stationary ( I can see the app is using Location in the Control Centre) and after that Location updates are not received and I am not able to track the driving behaviour. I tried to add diagnostics to know the cause and found "Insufficiently In Use" and then "Service Session Required" in the diagnostics. It would be of great help if the proper usage of CLServiceSession is provided. Important Question: When does the CLServiceSession gets invalidated or destroyed that was created when the app was in foreground ? What happens to the CLServiceSession which was created in the foreground if the app is not opened for long duration, let's say a day or two?
2
0
462
May ’26
WeatherKit fails with WeatherDaemon JWT permission denied despite valid entitlement/profile
Hi, I’m seeing WeatherKit fail on device with a JWT permission error even though the app appears to be signed correctly with the WeatherKit entitlement. Error: Failed to generate jwt token for: com.apple.weatherkit.authservice Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)" Setup verified: iOS physical device, tested after clean install/reboot Tested on more than one physical device Bundle ID: com.elilindenDinematch.Al-Outfits Team ID: FYGW4LHN42 App ID has WeatherKit capability enabled Fresh provisioning profile includes: application-identifier = FYGW4LHN42.com.elilindenDinematch.Al-Outfits com.apple.developer.team-identifier = FYGW4LHN42 com.apple.developer.weatherkit = true Signed app binary entitlements also include com.apple.developer.weatherkit = true codesign -dv confirms TeamIdentifier=FYGW4LHN42 Cleared DerivedData and regenerated/reinstalled with a fresh profile Toggled WeatherKit capability off/on in Developer portal and regenerated profile The failure occurs when calling: let weather = try await WeatherKit.WeatherService.shared.weather(for: location) The request takes a few seconds before failing, which makes it seem like the WeatherKit daemon is reaching Apple’s auth service but being rejected during JWT generation. Has anyone seen WeatherKit entitlement propagation get stuck server-side for a specific Team ID + Bundle ID? Is there anything else I can verify locally, or does this require Apple to inspect the WeatherKit auth service registration for this App ID?
0
1
302
May ’26
Sending 'geoRegion' risks causing data races
I have this simple piece of code that of course correctly ran in Swift 5: func geoRegion()-> CLRegion?{ guard let location=referenceLocation else{ return nil } return CLCircularRegion(center:location.coordinate, radius:50000, identifier:"georeferencing") } func placemarksForAddress(_ address: String) async throws -> [CLPlacemark]?{ if let placemark=placemarkCache[address]{ if placemark.location!.distance(from: referenceLocation!)<100000{ return [placemark] } } do{ guard let geoRegion=self.geoRegion() else { return nil } let placemarks = try await georeferenceQueue.geocodeAddressString( address, in: geoRegion) if placemarks.count>=0{ self.placemarkCache[address]=MKPlacemark(placemark: placemarks[0]) return placemarks } } catch { let placemarks=try await self.placemarkForLocation(referenceLocation) return placemarks } return nil } That now presents error: Sending task-isolated 'geoRegion' to actor-isolated instance method 'geocodeAddressString(_:in:)' risks causing data races between actor-isolated and task-isolated uses
4
0
1.3k
May ’26
Using CLRequireExplicitServiceSession correctly
I found this documentation that instructs you how to use CLServiceSession to defer any accidental/premature locacation permission prompts: https://developer.apple.com/documentation/corelocation/suspending-authorization-requests It says "Add the CLRequireExplicitServiceSession property to your app’s Info.plist file to opt into this control behavior." I pretty much followed this example to a T. It seemed to work, however in some cases I still manage to get a location permission prompt on a fresh install before the part of the onboarding where we'd ask the user for location permissions (with CLServiceSession now). Is there any additional information on using CLRequireExplicitServiceSession than this blurb? Googling brings up nothing. I presumed the property is a BOOL but I'm not even sure of that, as it doesn't show up in Info.plist's autocomplete suggestions and I have to manually set the type.
1
1
245
Apr ’26
Any update during WWDC26 on UWB direction-finding for 3rd party devices using the NI framework, etc?
Kind folks, Was all setup for online access to several Q&A sessions at this WWDC, even posted some questions. But other priorities on my project prevented me from attending. Did any of you hear any news on direction finding with 3rd party devices at this year's WWDC? My current understanding is that (for iPhones later than 15) the NI framework returns null for direction. Apple recommends use of the ARkit in conjunction with NI (tech session way back in WWDC22!) FYI, I've been trying hard to get any information on this topic. Would be happy to share what public information/speculation I've found (including how Apple get's such good range and direction info in their Find My app for their AirTag 2 😉). Perhaps we can set up a small discussion group for sharing insights and experiences with emerging UWB technology. Comments appreciated. Mike
Replies
2
Boosts
0
Views
87
Activity
2d
CLLiveLocationUpdates stops delivering updates after several weeks with app never launched – Diagnostics report "Service Session Required"
Hi, I'm working on a trip detection and recording app that relies on CLLiveLocationUpdates for the location tracking. We've observed a recurring issue where trip recording eventually stops working if the app is not opened for an extended period of time (approximately 2–3 weeks). What we observe The app continues to be installed on the device. The user does not manually open the app during this period. Eventually, trip detection and recording stop. Location diagnostics indicate: Service Session Required At this point, CLLiveLocationUpdates no longer appears to deliver location events. Recovery attempts We've tried several ways to recover without launching the app: Turning Location Services off/on Rebooting the device Changing location permissions None of these restore location updates. The only reliable recovery method we've found is: Open the app manually. Leave it running for some time. Kill the app again. After doing this, location tracking resumes and works normally for 4-5 days before eventually failing again with the same "Service Session Required" diagnostic. Questions Why would a valid location setup eventually transition into a "Service Session Required" state after the app has not been launched for several weeks? Are there any documented conditions under which an existing CLServiceSession expires, becomes invalid, or requires recreation? Is there a recommended way to recover from this state programmatically without requiring the user to manually launch the app? Is this expected behavior or a potential issue with CLLiveLocationUpdates / CLServiceSession? Additional details iOS version: 26 App uses: CLLiveLocationUpdates, Beacon Ranging & Beacon Monitoring, SLC updates, Motion Activity Updates Background location enabled: Yes Authorization type: Always Device models tested: iPhone 14 Pro Max Service session creation code: private var serviceSession: CLServiceSession? serviceSession = CLServiceSession( authorization: .always, fullAccuracyPurposeKey: "Trip" ) Has anyone else encountered a similar issue after long periods where the app is not launched? Thanks.
Replies
0
Boosts
0
Views
20
Activity
2d
kCLErrorDomain Code=1 location failure even with full location permission granted
I'm facing a persistent location error on real iOS device: Error Domain=kCLErrorDomain Code=1 The operation couldn’t be completed. (kCLErrorDomain error 1.)
Replies
1
Boosts
0
Views
381
Activity
1w
26.4.2 CoreLocation changes
It seems that with the latest update ellipsoidalAltitude of the CLLocation is always 0.0 where it had the correct value before. Also, velocity used to be -1 when not moving. The regular altitude still has sensible values. Did anybody else experience this ? Rgds Lob
Replies
1
Boosts
0
Views
265
Activity
1w
iPad Compass Calibration Issues: Impact of Magnetic Cover
We have developed an iPad application using the ARCL (AR + CoreLocation) library to render Point of Interest (POI) annotations in both an AR view and a standard MapView. The application performs as expected on standard devices. However, we have some iPad covered with strong magnet. This creates significant magnetic interference, resulting in a 90° to 180° heading offset, rendering the AR POI placement and MapView orientation unusable. Technical Challenges & Constraints: Hardware Lock: The magnetic cover is a mandatory business requirement and cannot be removed during field use. Sensor Failure: The internal magnetometer cannot provide an accurate North reference due to the proximity of the cover’s magnets. While CoreLocation and CoreMotion use sensor fusion, the magnetometer remains the primary source for absolute heading. Alternative Orientation Tracking: Is there a documented method to bypass the magnetometer and derive device orientation using only the Gyroscope and Accelerometer (e.g., relative tracking) while still maintaining alignment with geographic coordinates in CoreLocation? Programmatic Offsets: Are there known APIs or mathematical workarounds to programmatically "nullify" or offset a constant magnetic bias once the device is inside the cover? so we can use that offset for ARView and in Mapview as well.
Replies
2
Boosts
0
Views
381
Activity
1w
Core location Accuracy is worst on WiFi network but works best with Cellular network
I am currently using Core location to get user's current location and few surrounding coordinates to draw annotations in Augmented reality. It works best on Cellular network and on Wifi network few times it is working ok and sometimes orientation is completely changed when device is connected to WiFi. Checked on Apple map as well, there itself it was giving wrong orientation and even after user is at same location, current location on map got fluctuating. On WiFi only models GPS accuracy is not good.
Replies
1
Boosts
0
Views
342
Activity
1w
Is our background location strategy correct?
Hey everyone, in our project, the architecture sets all location services through one CLLocationManager, configured for navigation accuracy with background updates enabled. Start/stop is condition driven, so we track location while navigating, free-driving, connected to CarPlay or to a BLE device and stop immediately (no timeout) when none of those hold and the app is backgrounded. On stop() we tear down everything, including startMonitoringSignificantLocationChanges . BLE Device connection forces full background location for as long as it's paired and requires “Always authorization”. We keep one continuously-updating CLLocationManager (navigation accuracy, no distance filter, no auto pause) alive in the background whenever we're navigating, free-driving, connected to CarPlay, or to a BLE device using a CLBackgroundActivitySession on iOS 17+. Is a single always-best-accuracy manager the right approach, or should we be downgrading accuracy / using pausesLocationUpdatesAutomatically in some states for battery or performance? Any pitfalls with CLBackgroundActivitySession lifecycle we should watch for? As I wrote above, when the BLE accessory connects we force full background location on for the entire duration it's paired, and we require “Always authorization” for the BLE link to survive backgrounding. Is keeping location running the whole time an accessory is connected the right model? Thanks for the opportunity and have a great day!
Replies
1
Boosts
0
Views
131
Activity
1w
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
Replies
3
Boosts
0
Views
429
Activity
1w
[Regression] Core Location underground positioning inaccurate on iOS 26.1 beta (23B5044i)
Summary While parallel testing Core Location on the new iOS 26.1 beta (23B5044i), I observed what I believe to be a regression of the issue described here: https://developer.apple.com/forums/thread/779192 Specifically, user positioning underground subway stations is noticeably inaccurate on the beta, whereas the same scenarios remain accurate on the unupgraded device below. I work with the MTA (New York City) and work with the OP of that thread. Happy to provide additional testing or details if helpful. Please let me know what else you need. Test Info Riding NYCT from Wall St to 34th St Penn Station on the 2 train carrying two iphones Recording: https://limewire.com/d/dpTWi#pDC3GRYIdE Expected: Consistent underground positioning comparable to prior releases. Actual: Degraded/inaccurate underground positioning on iOS 26.1 beta. Test Devices Left Screen: iPhone 15 Pro Max - iOS 26.1 beta (23B5044i) Right Screen: iPhone 11 - iOS 18.6.2 (22G100) Blue dots show location set by CoreLocation. Red dot on iphone 11 shows the actual location of both devices as I was able to manually place while travelling through a station. Placement through tunnels is not easy to verify and not usually indicated. Timestamps Comparison of when train was actually observed in a station vs when 26.1 and 18.6.2 CoreLocation updated to the station Fulton St 1:48 iOS 26.1 correctly updates (correctly) 2:16 iOS 18.6.2 updates (28sec late) Park Place 4:12 train arrives 4:15 iOS 18.6.2 updates to ~near Park Place 5:04 iOS 18.6.2 updates to Park Place (correctly) 6:07 iOS 26.1 update to ~near Park Place (over 2 mins late) Chambers St 6:02 train arrives / iOS 18.6.2 updates (correctly) 6:14 iOS 26.1 updates to ~near Chambers 6:18 iOS 26.1 update to Chambers (correctly) Franklin St 6:52 train arrives 6:55 iOS 18.6.2 updates (correctly) x:xx iOS 26.1 does not update Canal St: 7:16 train arrives 7:18 iOS 18.6.2 updates (correctly) x:xx iOS 26.1 does not update Houston St 7:54 train arrives 8:00 iOS 18.6.2 updates (correctly) x:xx iOS 26.1 does not update Christopher St 8:37 iOS 26.1 presumably between Houston St and Christopher St 8:40 train arrives / iOS 18.6.2 updates (correctly) x:xx iOS 26.1 does not update 14 St 9:22 train arrives 9:28 iOS 18.6.2 updates (correctly) 11:01 as train departs station iOS 26.1 updates (1.5 mins late)
Replies
4
Boosts
0
Views
614
Activity
1w
Why does isSimulatedBySoftware not detect fake locations from tools like iTool AnyTo on real devices?
I tried detecting fake locations using CLLocationSourceInformation.isSimulatedBySoftware, but it doesn’t work with spoofing tools like iTool AnyTo. It never gets flagged as simulated. Is this a limitation of the API, and is there any recommended way to detect virtual location tools on real devices?
Replies
2
Boosts
0
Views
212
Activity
1w
Navigation Directional Information Permissions
I am developing a navigation application. My goal is for this navigation app to also work in the background and provide the user with real-time directional updates. When apps request access to location services, users see a TCC (Transparency, Consent, and Control) prompt. This prompt allows the user to choose under what conditions the app can access location services (for example: “While Using the App”, “Always”, etc.). If the user selects the “While Using the App” option, can the navigation app still access location in the background and provide directional information to the user? Is something like this technically possible? Does Apple allow this behavior for navigation apps or similar use cases?
Replies
1
Boosts
0
Views
192
Activity
1w
Working with visits and significant location changes following Core Location updates in iOS 17 and iOS 18
Hello, I'm working on an application that requires the use of significant location changes and visits, in addition to region monitoring and standard continuous location delivery (foreground and background). iOS 17 and iOS 18 introduced changes to how we can monitor distinct regions of interest (with CLMonitor) as well as receive location updates (with CLLocationUpdate). But I couldn't find any information regarding how to work with Significant location changes. Do we still need to create a location manager and call startMonitoringSignificantLocationChanges()? Where are the updates received in this case, in the locationManager(_:didUpdateLocations:) or in the liveUpdates async sequence? Visits. Same question here, for visit monitoring to work, do we still have to create a location manager then call startMonitoringVisits()? Where are the visits being notified? Still in locationManager(_:didVisit:) or in the liveUpdates asynchronous sequence? I just want to be sure I understand correctly how to use the updates, and if some features of Core Location still need to use a location manager and the delegate to receive the events. Maybe additional CLCondition will be added to cover both of these technologies as it seems highly related to monitoring conditions (significant location change, and visit). Thank you, Axel
Replies
1
Boosts
0
Views
271
Activity
1w
Location Verification API's
Dear Apple Team, I am reaching out regarding the need for more sophisticated location verification APIs beyond basic IP lookup capabilities. As online fraud continues to evolve, IP-based geolocation has proven insufficient for many business use cases requiring accurate location verification. Would it be possible to discuss this proposal with your API development team? I believe this would be valuable for the entire iOS and macOS developer ecosystem while maintaining Apple's commitment to user privacy.
Replies
1
Boosts
0
Views
194
Activity
1w
Background Location Tracking Not Reliably Relaunching App After Termination
We are developing a mileage tracking application that depends on continuous background location updates on iOS. Our app has the required background modes enabled: <key>UIBackgroundModes</key> <array> <string>remote-notification</string> <string>processing</string> <string>fetch</string> <string>location</string> </array> We are observing inconsistent behavior with background location tracking in app terminated state. In some cases, after a period of time, location updates stop completely. Sometimes iOS successfully relaunches the app when movement is detected and location updates resume correctly. However, in other cases, the app is not relaunched by the system, and we stop receiving location updates entirely. We reviewed Apple’s documentation on handling background location updates: https://developer.apple.com/documentation/corelocation/handling-location-updates-in-the-background Based on our observations, we would appreciate clarification on the following points: Is this considered expected iOS behavior or a system limitation? Under what conditions does iOS decide not to relaunch a terminated app for location events? Are there recommended best practices to improve the reliability of background location relaunch behavior? Is there any logging, diagnostics, or debugging mechanism available to determine why the app was not relaunched? Apple’s documentation mentions that location updates may be queued while the app is terminated and later delivered after relaunch. However, in some scenarios we do not receive those queued updates after the app restarts. Under what conditions can queued location updates be discarded or not delivered? Additional notes: We are using standard Core Location background updates. “Always” location permission is granted. Background App Refresh is enabled. The issue is observed intermittently across multiple iOS devices.
Replies
4
Boosts
0
Views
509
Activity
2w
iOS 26 — significant location changes & region monitoring no longer relaunching terminated apps
I'm observing significant location changes & region monitoring no longer relaunching terminated apps on iOS 26. Configuration: Deployment target: iOS 17, tested on iOS 26.4.2 UIBackgroundModes: location NSLocationAlwaysAndWhenInUseUsageDescription granted (authorizationStatus = .authorizedAlways) allowsBackgroundLocationUpdates = true Using legacy APIs: startMonitoringSignificantLocationChanges() and startMonitoring(for: CLCircularRegion) NSLocationRequireExplicitServiceSession key is NOT set (relying on implicit service session) Data logged into UserDefaults Observed behavior on iOS 26.4.2: Scenario A — app suspended in background (not force-quit): Both significant location changes and CLCircularRegion exit events deliver reliably for the entire trip. didUpdateLocations and didExitRegion fire as expected with appState = .background. Scenario B — app force-quit by user from App Switcher: Over a 30km / 1-hour drive crossing many SLC distance thresholds and many 2km region boundaries, the app is never relaunched. application(_:didFinishLaunchingWithOptions:) is never called with UIApplicationLaunchOptionsLocationKey. No background delegate callbacks fire. The same code on iOS 18 and earlier did relaunch the app from force-quit via SLC. Questions: Is the iOS 26 behavior in Scenario B intentional — i.e., has Apple tightened enforcement of the documented "user-terminated apps do not receive SLC until reopened/rebooted" policy? Does this enforcement now also cover region monitoring (CLCircularRegion and CLMonitor), as our test indicates? If intentional, is there any supported API path that allows a Pro location-aware app to be relaunched after force-quit WITHOUT displaying the persistent location indicator (blue arrow / pill)? CLBackgroundActivitySession appears to always show the indicator.
Replies
0
Boosts
0
Views
262
Activity
May ’26
Guidance needed on iOS location-based local notification accuracy
We are working on a feature that uses geo-based local notifications to target users when they arrive at an airport. Our implementation uses UNLocationNotificationTrigger with CLCircularRegion. The local notification is scheduled after the user has granted notification permission and location permission. We are currently using “While Using the App” location permission and with enabled location updates in capabilities We have used CLMonitor as well for the same. However, we are seeing inconsistent accuracy and missed triggers, even after testing with users who have granted the required permissions. we did use CLMonitor as well but we are getting the trigger on the entry of specified region. Could you please help us understand the constraints and expected behavior for location-based notification triggers on iOS? Specifically, we would like guidance on the following: What parameters influence UNLocationNotificationTrigger accuracy and reliability? What is the recommended minimum radius for geofencing around large areas such as airports? Does “While Using the App” permission have any practical limitations for location-based local notification delivery? Are there system-level conditions that may prevent or delay the trigger, such as Precise Location being off, Low Power Mode, Focus mode, Background App Refresh, airplane mode, or poor GPS/network availability or any others? Are there recommended best practices for improving reliability for an airport-arrival use case?
Replies
0
Boosts
0
Views
170
Activity
May ’26
Lifecycle and Usage of CLServiceSession after the app is terminated
Hi, I am creating a Driving Behaviour Monitoring app in which I range beacons and I require location updates in foreground, background and in terminated state all the time. I am using CLServiceSession with "Always Authorisation" to get location events. I create CLServiceSession object in the foreground and start monitoring driving and then re-create it when the app is relaunched after termination. Doing this works fine. But sometimes when app is terminated and is not opened again, the app runs on its own even when the device is stationary ( I can see the app is using Location in the Control Centre) and after that Location updates are not received and I am not able to track the driving behaviour. I tried to add diagnostics to know the cause and found "Insufficiently In Use" and then "Service Session Required" in the diagnostics. It would be of great help if the proper usage of CLServiceSession is provided. Important Question: When does the CLServiceSession gets invalidated or destroyed that was created when the app was in foreground ? What happens to the CLServiceSession which was created in the foreground if the app is not opened for long duration, let's say a day or two?
Replies
2
Boosts
0
Views
462
Activity
May ’26
WeatherKit fails with WeatherDaemon JWT permission denied despite valid entitlement/profile
Hi, I’m seeing WeatherKit fail on device with a JWT permission error even though the app appears to be signed correctly with the WeatherKit entitlement. Error: Failed to generate jwt token for: com.apple.weatherkit.authservice Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)" Setup verified: iOS physical device, tested after clean install/reboot Tested on more than one physical device Bundle ID: com.elilindenDinematch.Al-Outfits Team ID: FYGW4LHN42 App ID has WeatherKit capability enabled Fresh provisioning profile includes: application-identifier = FYGW4LHN42.com.elilindenDinematch.Al-Outfits com.apple.developer.team-identifier = FYGW4LHN42 com.apple.developer.weatherkit = true Signed app binary entitlements also include com.apple.developer.weatherkit = true codesign -dv confirms TeamIdentifier=FYGW4LHN42 Cleared DerivedData and regenerated/reinstalled with a fresh profile Toggled WeatherKit capability off/on in Developer portal and regenerated profile The failure occurs when calling: let weather = try await WeatherKit.WeatherService.shared.weather(for: location) The request takes a few seconds before failing, which makes it seem like the WeatherKit daemon is reaching Apple’s auth service but being rejected during JWT generation. Has anyone seen WeatherKit entitlement propagation get stuck server-side for a specific Team ID + Bundle ID? Is there anything else I can verify locally, or does this require Apple to inspect the WeatherKit auth service registration for this App ID?
Replies
0
Boosts
1
Views
302
Activity
May ’26
Sending 'geoRegion' risks causing data races
I have this simple piece of code that of course correctly ran in Swift 5: func geoRegion()-> CLRegion?{ guard let location=referenceLocation else{ return nil } return CLCircularRegion(center:location.coordinate, radius:50000, identifier:"georeferencing") } func placemarksForAddress(_ address: String) async throws -> [CLPlacemark]?{ if let placemark=placemarkCache[address]{ if placemark.location!.distance(from: referenceLocation!)<100000{ return [placemark] } } do{ guard let geoRegion=self.geoRegion() else { return nil } let placemarks = try await georeferenceQueue.geocodeAddressString( address, in: geoRegion) if placemarks.count>=0{ self.placemarkCache[address]=MKPlacemark(placemark: placemarks[0]) return placemarks } } catch { let placemarks=try await self.placemarkForLocation(referenceLocation) return placemarks } return nil } That now presents error: Sending task-isolated 'geoRegion' to actor-isolated instance method 'geocodeAddressString(_:in:)' risks causing data races between actor-isolated and task-isolated uses
Replies
4
Boosts
0
Views
1.3k
Activity
May ’26
Using CLRequireExplicitServiceSession correctly
I found this documentation that instructs you how to use CLServiceSession to defer any accidental/premature locacation permission prompts: https://developer.apple.com/documentation/corelocation/suspending-authorization-requests It says "Add the CLRequireExplicitServiceSession property to your app’s Info.plist file to opt into this control behavior." I pretty much followed this example to a T. It seemed to work, however in some cases I still manage to get a location permission prompt on a fresh install before the part of the onboarding where we'd ask the user for location permissions (with CLServiceSession now). Is there any additional information on using CLRequireExplicitServiceSession than this blurb? Googling brings up nothing. I presumed the property is a BOOL but I'm not even sure of that, as it doesn't show up in Info.plist's autocomplete suggestions and I have to manually set the type.
Replies
1
Boosts
1
Views
245
Activity
Apr ’26