Maps & Location

RSS for tag

Learn how to integrate MapKit and Core Location to unlock the power of location-based features in your app.

Maps & Location Documentation

Posts under Maps & Location subtopic

Post

Replies

Boosts

Views

Created

The Example App for Monitoring Location Changes Doesn't Work
Downloaded example app from here Xcode version: Version 26.1.1 (17B100) Simulator iOS Version: 26.1 & 18.5 Set custom location in the simulator to the center of the condition being monitored in the example. The only log entry was "Setup Monitor". Tried a custom gpx starting at the same point and moving 500m away. Same logs. Didn't change any of the source code, granted always permissions, allowed notifications, tapped "AddCircularGeographicCondition". Let me know if there is something I am missing or more information I can provide.
3
0
127
2w
iOS suspends app after BLE discovery even though I start Always-authorized location udpates (Target deployment: 16.3+)
I’m hitting a specific edge case with background execution that I can’t figure out. I'm using Flutter for the UI, but all the logic handles are in Swift using CoreBluetooth and CoreLocation. I need the app to wake up from a suspended state when it detects my specific BLE peripheral (OBD sensor), connect to it, and immediately start continuous location tracking for the duration of the drive. If I start this process while the app is in the foreground, or very shortly after going to BG, it works perfectly. The app stays alive for the whole trip. The issue only happens when the sequence starts from the background: The app is suspended. scanForPeripherals wakes the app when the sensor is found. In didDiscover, I immediately call locationManager.startUpdatingLocation(). locationd actually delivers updates successfully. However, 5-15 minutes later, iOS suspends the app again. Crucially, I never see the blue "Location In Use" pill on the status bar, even though I have showsBackgroundLocationIndicator = true set. Also, distance filter is set to None. Logs for reference (around suspending) locationd: {"msg":"Sending location to client","Client":"[appName]:","desiredAccuracy":"-1.000000"} runningboardd: Invalidating assertion ... from originator \\\[osservice<com.apple.bluetoothd>:...\\\] runningboardd: Removed last relative-start-date-defining assertion for process app<[appName]...> runningboardd: Calculated state ... running-suspended runningboardd: Suspending task locationd: Client [appName]: disconnected bluetoothd: State of application "[appName]" is now "suspended" Questions Why does invalidating the Bluetooth assertion cause an immediate suspend even though I called startUpdatingLocation() and am receiving updates? Does the missing blue location pill imply that the OS never fully "accepted" the location session? Is there a specific "handshake" required to transition from a BLE wake-up to a long-running location session? I'm wondering if I need to use a background task identifier to bridge the gap between the BLE wake and the location manager taking over. More context: Digging deeper in the comments, I just noticed the following patterns when the application is not suspended vs when it is recently suspended and got awaken by a BLE event. Not suspended: 303948:Jan 23 20:59:35.640118 locationd[6491] <Debug>: {"msg":"Client is setting ContinuousBackgroundLocationRequested", "Client":"[appName]:", "ContinuousBackgroundLocationRequested":1} 303949:Jan 23 20:59:35.640155 locationd[6491] <Debug>: {"msg":"Allowing process assertion due to foreground-ish status", "ClientKeyPath":"[appName]:"} Recently suspended and awaken by BLE: 564296:Jan 23 21:00:23.179125 locationd[6491] <Debug>: {"msg":"Client is setting ContinuousBackgroundLocationRequested", "Client":"[appName]:", "ContinuousBackgroundLocationRequested":1} 564298:Jan 23 21:00:23.179195 locationd[6491] <Notice>: {"msg":"#Warning Denying process assertion", "ClientKeyPath":"[appName]:"} The assertion fails for the second case and that's why the app could not persist. Most importantly, following the logs in the second case, I see the following: locationd[6491] <Notice>: {"msg":"computing freshAuthorizationContext", "Client":"[appName]:", "ClientDictionary":"{\n AlwaysServiceSession = 0;\n I suspect that the flag AlwaysServiceSession being 0 has to do with process assertion being denied for location.
0
0
125
1w
why mapkit js does not have LookAroundSceneRequest
I want to update coordinate of the lookaround instance object. But mapkit.js does not have LookAroundSceneRequest class, how am I going to do. In swift, there is MKLookAroundSceneRequest class, you can specify a new coordinate with this class, to get a new LookAroundScene object, then attach new LookAroundScene to the existing lookAround object, But how am I going to do the same with mapkit.js ?? it missing LookAroundSceneRequest class in js
2
0
88
1w
LocationButton (SwiftUI) broken or changed in iOS 26?
I just spend the morning debugging LocationButton and the associated CLLocationManagerDelegate only to realise that it works perfectly in iOS 18.5 but no longer works for me in iOS 26.0, 26.2 or 26.2.1 (the latter on-device). It does work when I run my app on macOS 26.2 (Designed for iPad). Is there a change in behaviour or requirements on iOS I am missing? On iOS 18.5 I observe that the authorisation status changes from .notDetermined to .authorizedWhenInUse after the LocationButton has been tapped and my delegate is able to obtain the location through locationManager(_ , didUpdateLocations:). On iOS 26.x the authorisation status remains .notDetermined and my delegate receives locationManager(_:didFailWithError:) with error code .denied. Setting NSLocationWhenInUseUsageDescription in my Info.plistdid not help. Just in case ;) FB21798098 (SwiftUI LocationButton fails to acquire authorization on iOS 26)
1
0
58
1w
ITMS-90118: Invalid routing app setting:
Hi everyone, I’m running into an App Store Connect issue that seems to be a misclassification, and I’m hoping someone (or Apple staff) can help clarify or advise. App: Quick Quote Calculator Platform: iOS (built with Expo) App type: Business No navigation, routing, maps, or turn-by-turn directions When submitting a new build, App Store Connect returns: ITMS-90118: Invalid routing app setting To upload a routing app coverage file, you must define the app binary as a routing app. However: There is no “Routing & Navigation” section in App Information There is no “Routing App Coverage File” section under App Store No routing metadata or coverage file has ever been uploaded The app does not provide routing or navigation functionality It appears the binary itself is being classified as a routing app, but there is no UI in App Store Connect to view or remove this classification. What I’ve tried Verified app metadata and screenshots Confirmed no routing/navigation APIs are used Reviewed Info.plist permissions (no routing language) Uploaded a new build with incremented build number Has anyone run into a case where a routing flag is applied at the binary level and the Routing App options are not exposed in App Store Connect? Is the only resolution to have Apple manually remove the routing classification via App Review / Developer Support? Any insight from Apple staff or devs who’ve resolved this would be hugely appreciated. Thanks in advance! Yes — the app is strictly a business quote calculator for trades. It calculates distance (Miles via addresses) but does not display maps, routes, directions, or navigation of any kind.
1
0
66
1w
NSLocationDefaultAccuracyReduced not taking effect after app update (YES -> NO) for first-time location authorization
Hello Apple Developer Technical Support / Core Location Team, I’m requesting clarification on the effective timing of the Info.plist key NSLocationDefaultAccuracyReduced. We shipped Version A with NSLocationDefaultAccuracyReduced = YES (reduced accuracy by default). In Version B we changed it to NO. After updating to Version B, on devices/users that have not previously granted location authorization for our app, the first authorization flow still behaves as if reduced accuracy is the default (i.e., the same behavior as Version A). Could you please confirm: When iOS evaluates/caches NSLocationDefaultAccuracyReduced (install time, app launch, or at first authorization prompt)? After an update changes this key from YES to NO, should the new value apply to users who have never authorized location for the app? Environment: Iphone 16 (IOS 26.0) I can provide a sysdiagnose and additional logs if needed. Thank you, Jack
0
1
104
4d
Scene-based Launch Detection
Our app supports UIScene. As a result, launchOptions in application(_:didFinishLaunchingWithOptions:) is always nil. However, the documentation mentions that UIApplication.LaunchOptionsKey.location should be present when the app is launched due to a location event. Given that our app is scene-based: How can we reliably determine whether the app was launched due to a location update, geofence, or significant location change? Is there a recommended pattern or API to detect this scenario in a Scene-based app lifecycle? This information is critical for us to correctly initialize location-related logic on launch. Relevant documentation: https://developer.apple.com/documentation/corelocation/cllocationmanager/startmonitoringsignificantlocationchanges()
0
0
35
3d
Does anyone know how to achieve this custom MKAnnotation?
I’ve notice that in Maps, some pins contain images and do not have the little triangle at the bottom of it, yet they still animate the same when clicked. How could this be achieved? I believe the name of this annotation is MKMapFeatureAnnotation. I've tried this and it did not give the same result. I'm able to create a custom MKMarkerAnnotationView but it does not animate the same (balloon animation like the MKMapFeatureAnnotation). I was looking forward to create a custom MKMapFeatureAnnotation similar in design which would animate the same. Unfortunately, I cannot create a custom MKMapFeatureAnnotation because everything is privated
0
0
132
1d