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

Activity

Beacon Exits region and is unavailable for extended periods
Hi, We are using beacon ranging methods to detect beacon in foreground and background in our app. We are using beacon's UUID, major and minor values to create a beacon region and then calling locationManager.startRangingBeacons to range beacons. We listen for beacon updates via the didRangeBeacons delegate method to get beacon data emitted. However, we've observed some inconsistent behavior: The beacon region frequently reports exit events even when the device is within close proximity (approximately 1.5 to 2 meters). There are instances where no beacon updates are received for extended periods (up to 15–20 minutes), despite the beacon being nearby. Generally, The distance between the device and the beacon is approximately 1.5 - 2 meters. What could be the reason for this behaviour and how can we avoid it and continuously receive beacon updates when the beacon is near without any delay? Thanks
1
0
11
1d
[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)
1
0
68
1d
MapKit JS Look Around not pointing camera towards the lat/lng entered
We are using MapKit JS Look Around and initializing it like this: window.lookAround = new mapkit.LookAround( document.getElementById('container'), new mapkit.Coordinate(listingLocation[1], listingLocation[0]), {openDialog: false}) ; This results in a Look Around scene being displayed correctly but the camera heading is not pointing towards the lat/lng that is passed to initialization. The example lat/lng that we're using is: lat=30.004195, lng=-95.59973 This lat/lng corresponds to the address: 11943 Laurel Meadow Dr, Tomball, TX 77377. The camera is pointing to the other side of the street to house number 11946. If you look for that address in Apple Maps the Look Around points to the correct house. Is there a way to either specify the heading so that Look Around points in the correct heading? Sample link: https://s.hartech.io/zFP2KnsCbsP
2
0
65
2d
Incorrect position rendering of WGS84 coordinate in MKMapView: Discrepancy between Apple Maps (Hong Kong) and Amap (Mainland China)
I am encountering a coordinate rendering issue using MKMapView in my iOS app. I have a GPS coordinate in WGS84 format, which corresponds to a location in Hong Kong. When my device is physically located in Hong Kong, MKMapView displays the map with the "Apple Maps" label, and the WGS84 coordinate is rendered at the correct position. However, when the device is in Mainland China, MKMapView switches to display "Amap" (Gaode Maps) branding, and the same WGS84 coordinate is rendered at an incorrect position. I understand that Amap in Mainland China uses the GCJ-02 coordinate system, while Apple Maps typically uses WGS84. This discrepancy suggests a potential coordinate system mismatch, but I cannot definitively confirm which map type (and corresponding coordinate system) MKMapView is actually using in different regions. My key questions are: How can I programmatically or visually confirm the underlying map type (Apple Maps vs. Amap) and its coordinate system within MKMapView? Is there a way to simulate the Apple Maps environment for testing when physically located in Mainland China?
4
0
117
2d
CLMonitor init function causes app crash
I'm experiencing app crashes when calling the CLMonitor initialization function: let monitor = await CLMonitor("my_monitor") According to WWDC 2023: Meet Core Location Monitor, when creating a CLMonitor object with the same identifier, it should access the existing monitor without any mention of app crashes or buggy behavior. However, in my actual testing, attempting to create a CLMonitor object with the same identifier immediately causes an app crash. Here's part of the crash log: Last Exception Backtrace: 0 CoreFoundation 0x19c4ab21c __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x199945abc objc_exception_throw + 88 (objc-exception.mm:356) 2 Foundation 0x19b7a9670 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 288 (NSException.m:252) 3 CoreLocation 0x1aa25cbb4 +[CLMonitor _requestMonitorWithConfiguration:locationManager:completion:] + 516 (CLMonitor.mm:516) 4 libswiftCoreLocation.dylib 0x22bf6085c CLMonitor.init(_:) + 488 (CLMonitor.swift:280) 5 libswiftCoreLocation.dylib 0x22bf604b9 <deduplicated_symbol> + 1 6 MiniPlengi 0x106372ec9 closure #1 in static CLMonitor.loplatMonitor.getter + 1 (CLMonitor+Extensions.swift:31) 7 MiniPlengi 0x1062ce325 0x106290000 + 254757 8 MiniPlengi 0x1062f6a29 specialized thunk for @escaping @isolated(any) @callee_guaranteed @async () -> (@out A) + 1 (/<compiler-generated>:0) 9 MiniPlengi 0x1062ce325 0x106290000 + 254757 10 libswift_Concurrency.dylib 0x1a7f75241 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:537) Furthermore, even though I've written code to create CLMonitor objects based on a singleton structure to handle these crash cases, the app still crashes: extension CLMonitor { static var loplatMonitor: CLMonitor { get async { struct Static { static var monitor: CLMonitor? static var initializationTask: Task<CLMonitor, Never>? } // If already initialized if let monitor = Static.monitor { return monitor } // If there's an initialization task in progress, wait for its result if let task = Static.initializationTask { return await task.value } // Create new initialization task let task = Task { let monitor = await CLMonitor("my_monitor") Static.monitor = monitor Static.initializationTask = nil // Clean up task after completion return monitor } Static.initializationTask = task return await task.value } } } Is the CLMonitor API still in a stabilization phase and not recommended for production release? I would appreciate guidance on the correct usage. If these issues are expected to persist, I'm wondering if I should continue using the existing CLCircularRegion API instead. Any insights or recommendations would be greatly appreciated.
1
0
39
6d
Empty `safeAreaInset` modifier breaks `Map` zoom region
Reported as FB20357097 In SwiftUI, an empty .safeAreaInset modifier attached to a Map causes the map to become zoomed out to planet level. Minimal reproduction: import SwiftUI import MapKit @main struct map_region_safe_area_inset_bugApp: App { var body: some Scene { WindowGroup { Map { // Any Map content MapCircle(center: .init(latitude: 35.6895, longitude: 139.6917), radius: 1000) } .safeAreaInset(edge: .top) { // No content, `EmptyView()`, `Color.clear` } } } } Note: ZStack { } inside the safeAreaInset prevents the bug. Empty safeAreaInset (bug) Non-empty
0
0
31
1w
iOS 26 share map location
I am having a problem with the following scenario. The user opens the Maps app, then selects a location like a store or restaurant, then tap on share and then on my app. On iOS 26, my app stopped showing altogether. After changing the NSExtensionActivationRule to TRUEPREDICATE to accept all, I see this difference between the OS versions. iOS 18.5 (lldb) po extensionContext?.inputItems ▿ Optional<Array<Any>> ▿ some : 1 element - 0 : <NSExtensionItem: 0x60000000c5d0> - userInfo: { NSExtensionItemAttachmentsKey = ( "<NSItemProvider: 0x600002930d20> {types = (\n \"public.plain-text\"\n)}", "<NSItemProvider: 0x600002930c40> {types = (\n \"com.apple.mapkit.map-item\"\n)}", "<NSItemProvider: 0x600002930bd0> {types = (\n \"public.url\"\n)}" ); NSExtensionItemAttributedContentTextKey = {length = 329, bytes = 0x7b5c7274 66315c61 6e73695c 616e7369 ... 656e7472 61616c7d }; "com.apple.UIKit.NSExtensionItemUserInfoIsContentManagedKey" = 0; } iOS 26 (lldb) po extensionContext?.inputItems ▿ Optional<Array<Any>> ▿ some : 1 element - 0 : <NSExtensionItem: 0x60000000cbd0> - userInfo: { NSExtensionItemAttachmentsKey = ( "<NSItemProvider: 0x60000293afb0> {types = (\n \"public.url\"\n)}", "<NSItemProvider: 0x60000293bf70> {types = (\n \"public.plain-text\"\n)}" ); "com.apple.UIKit.NSExtensionItemUserInfoIsContentManagedKey" = 0; } Please notice how iOS 26 is no longer sending com.apple.mapkit.map-item. Is there an alternative way to read the info from the map location shared to my app?
0
0
39
1w
iOS 26 share map location
I am having a problem with the following scenario. The user opens the Maps app, then selects a location like a store or restaurant, then taps on share and then on my app. On iOS 26, my app stopped showing as an option to receive the location altogether. After changing the NSExtensionActivationRule to TRUEPREDICATE to accept all, I see this difference between the OS versions. iOS 18.5 (lldb) po extensionContext?.inputItems ▿ Optional<Array<Any>> ▿ some : 1 element - 0 : <NSExtensionItem: 0x60000000c5d0> - userInfo: { NSExtensionItemAttachmentsKey = ( "<NSItemProvider: 0x600002930d20> {types = (\n \"public.plain-text\"\n)}", "<NSItemProvider: 0x600002930c40> {types = (\n \"com.apple.mapkit.map-item\"\n)}", "<NSItemProvider: 0x600002930bd0> {types = (\n \"public.url\"\n)}" ); NSExtensionItemAttributedContentTextKey = {length = 329, bytes = 0x7b5c7274 66315c61 6e73695c 616e7369 ... 656e7472 61616c7d }; "com.apple.UIKit.NSExtensionItemUserInfoIsContentManagedKey" = 0; } iOS 26 (lldb) po extensionContext?.inputItems ▿ Optional<Array<Any>> ▿ some : 1 element - 0 : <NSExtensionItem: 0x60000000cbd0> - userInfo: { NSExtensionItemAttachmentsKey = ( "<NSItemProvider: 0x60000293afb0> {types = (\n \"public.url\"\n)}", "<NSItemProvider: 0x60000293bf70> {types = (\n \"public.plain-text\"\n)}" ); "com.apple.UIKit.NSExtensionItemUserInfoIsContentManagedKey" = 0; } Please notice how iOS 26 stopped sending com.apple.mapkit.map-item Is it no longer possible to get a MKMapItem item out of the extension contents from the Maps app? I would appreciate any pointers on how to extract the info of the shared location from the Maps app.
0
0
22
1w
SwiftUI issue with onTap using Map using IOS 26
I have a sample that stop working on IOS 26, using the latest XCode and IOS sdk, the onTapGesture event is no longer happening. Maybe this is no longer the way to drop pins on the map. Also not working on the iPhone 17 sim or iPhone 16 max pro device upgrading to IOS 26 Thanks, any help Sample: import SwiftUI import MapKit import CoreLocation import Foundation struct Pin: Identifiable { let id = UUID() let coordinate: CLLocationCoordinate2D } struct ContentTestPinDropView: View { @State private var pins: [Pin] = [] var body: some View { MapReader { reader in Map(selection: .constant(nil)) { ForEach(pins) { pin in Marker("Pin", coordinate: pin.coordinate) } } .onTapGesture { screenPoint in if let coordinate = reader.convert(screenPoint, from: .local) { pins.append(Pin(coordinate: coordinate)) } } } } }
1
0
64
1w
kCLErrorLocationUnknown becoming a big issue
In the last few months we have seen a lot of the following errors in which it fails to retrieve location information. This seems to happen across multiple browsers and feels related to apple/mac OS more than the browsers. Error: "CoreLocationProvider: CoreLocation framework reported a kCLErrorLocationUnknown failure." Any suggestions or an ETA on when this can be fixed? I have seen other threads/posts on this but wanted a new one to highlight the issue is prevalent.
4
0
628
1w
Sync Conflict Between Contacts & Maps, Possible Cross-App Link with Home App Issue
Pinned 2 homes address for the same contact Steps Initial check in Apple Maps No saved places or pinned addresses appear. Open Personal Contacts You have two addresses stored in your contact card: Main and Home. Pin & Edit “Main” You pinned the Main address in Maps. Refined the location on the map. Renamed it (but still saved under the type “My Home”). Open “Home” Address in Contacts Refined the location again. Changed the type to “My Home.” Attempted to rename, but no option to change the label. Final Saved Places View Shows two entries both called “Main.” Opening either of them displays the same details for the Home address. Saved Places list only shows the full address text, without the ability to rename them inside Maps. Results Both addresses appear duplicated with the same name (“Main”), even though they point to different underlying addresses. When selecting either entry, Apple Maps incorrectly shows the same Home address details. The Saved Places section does not allow renaming; it defaults to showing the full address string. Issues Identified Sync Conflict Between Contacts & Maps Apple Maps pulls labels/types from Contacts, but the edits don’t update consistently across apps. Duplicate Naming Bug Both “Main” and “Home” collapse into “Main” in Saved Places, making them indistinguishable. One-to-One Mapping Failure Regardless of which saved place you open, Maps shows the same Home entry, meaning the system isn’t correctly binding each saved place to its respective contact address. Renaming Limitation Apple Maps doesn’t allow renaming saved addresses directly — it relies on Contacts. Since Contacts only supports preset labels (Home, Work, School, etc.), custom naming is blocked.
1
0
72
1w
Location via GPS jumps
We have a that relies on accurate GPS location but we’ve noticed that every now and then the location ‘jumps’ a few hundred meters to a different location but reports horizonal accuracy less than 10m. we think the device is picking up a rough location from a local WiFi rather than internal gps sensors. can we a) disable WiFi location Updates? b) identify WiFi location Updates? thank You
7
0
219
2w
Country from MKReverseGeocoding
As GeoCoder is now deprecated I am struggling to get the country only information from the new MKReverseGeocoding. Maybe someone can guide me or give me direction? Or is this just not possible anymore? let request = MKReverseGeocodingRequest(location: self.lastLocation ?? fallbackLocation) request?.getMapItems { items, error in guard let items = items else { return } self.cityName = items.first?.addressRepresentations?.cityWithContext ?? "" self.countryName = items.first?.addressRepresentations?.regionName ?? "" } I couldn't find anything here, sure you can get the full Address but I need single values to store so the user can search for (example City, Country) In case the structure is always the same, let us say the country is always third part, sure I could split the string but it is not a reliable way to do this, at least for me. Any help would be much appreciated.
1
0
90
3w
Apple Map App Crash, when witched to satellite view
hi, When changing the map to Satellite in Apple Maps and centering it on Ōmuta City, Fukuoka Prefecture, Japan (as shown in the image), the app crashes when swiping to the right. This issue also occurs in MapKit, and I confirmed it happens in Apple Maps as well. It seems that either the satellite map tiles are missing or an error is occurring. Our application is experiencing a crash, and this has become a serious issue. Since September 1, crashes have increased significantly. Initially, we suspected that the issue was due to our application’s implementation, but our investigation revealed that the problem lies with the map tiles being called through MapKit. Could you please investigate this issue and provide a fix?
4
0
49
3w
Nearby Interaction / DL-TDoA (Beta): Need NITLDOA params; 16 Pro shows distance-only, 13 has direction
Apple recently announced DL-TDoA (Downlink TDoA) support on iOS 26, and the API is currently marked Beta. Using two iPhones (16 Pro and 13) on iOS 26.0 Beta, I’m starting a Nearby Interaction session and need to read NITLDOA parameters (address, carrier frequency offset, signal strength/RSSI), but I can’t find a supported way. I’m also seeing asymmetry: iPhone 13 reports distance+direction, while 16 Pro reports distance only. Is there a supported workflow/API to access those parameters, and any known device/OS constraints that would cause direction to be unavailable on 16 Pro?
0
1
167
3w
Do I need to maintain CLServiceSession when app relaunches from terminated state due to CLMonitor events?
I'm currently testing the CLMonitor API and have a question about CLServiceSession management. When my app is relaunched from a terminated state in the background due to CLMonitor events, do I still need to create and maintain a CLServiceSession instance? I'm wondering if CLServiceSession is necessary even when I don't need to continuously receive GPS updates through liveUpdates. Since CLMonitor can trigger app launches for region monitoring events without requiring constant location updates, I'm unclear about whether the CLServiceSession is still required in this scenario. Any clarification on the proper implementation would be greatly appreciated. Thanks!
1
0
144
4w
Bluetooth permissions Query
Hi Team, when our customers turn on bluetooth connectivity whether Apple creates a profile of the user or their locations and if it is used for any other purpose. Could you please clarify this? we are getting the below message in the Bluetooth permissions popup below the map "Information from Bluetooth devices can be used to determine your location and create a profile of you." What is this profile? and what is the purpose of creating it while the user uses Bluetooth in ios app.
2
0
63
Aug ’25