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

MKLocalSearch not returning Places in the specified region
Hi- I've never posted on here before! But ChatGPT hasn't been helpful with this. I have a call using MKLocalSearch (i have a waddled down version below) let region = MKCoordinateRegion( center: location, // the user's location span: MKCoordinateSpan( latitudeDelta: 0.005, longitudeDelta: 0.005 ) ) let req = MKLocalPointsOfInterestRequest(coordinateRegion: region) req.pointOfInterestFilter = MKPointOfInterestFilter(including: [.nightlife]) let search = MKLocalSearch(request: req) I made the latitude and longitude the lowest they can possibly be without throwing an error. Sometimes (and unreliably) when the user's location is at say, a bar, this list will give me like 10 bars that are not even within the region, and exclude the bar that the user is actually present in. How can i make this not the case? In other words, I just want this to return what I expect: a list of POIs with the category .nightLife within the defined region. Any help would be appreciated!
0
0
141
Jul ’25
Dynamic Location Tracking using CLServiceSession and CLBackgroundActivitySession
Hello, I'm currently implementing code to track routes and determine if users have arrived at their destination using CLServiceSession, CLBackgroundActivitySession, and CLLocationUpdate.liveUpdates. I want to obtain location data across all app states: foreground, background, and terminated. I have two questions: Background Location Indicator Issue: I'm using CLBackgroundActivitySession to get location updates in the background. Normally, the background location indicator (blue bar) doesn't appear at the top left of the screen for my app. However, when another app (e.g., LiveUpdatesSample) activates CLBackgroundActivitySession, my app's background location indicator suddenly becomes visible. Can you explain why this happens? or Can I Control showsBackgroundLocationIndicator in CLBackgroundActivitySession Session Management: Is there a way to terminate all currently active CLBackgroundActivitySessions? I understand that when CLBackgroundActivitySession is activated and the app is terminated and then relaunched, a new CLBackgroundActivitySession needs to be created. In this case, are the previously created and running CLBackgroundActivitySessions automatically released when the app is relaunched?
6
0
120
Jul ’25
How to Handle Periodic Background Location Reminders for an MDM-Managed Safety App?
Hello everyone, We've developed a safety application for schools that runs on supervised, MDM-managed iOS devices. The app requires "Location Always" to maintain a persistent background state for its core functionality. The Challenge: Our primary issue is with the periodic background location reminder prompts that iOS automatically presents to the user (e.g., "[App Name] has used your location X times in the past 3 days..."). A screenshot of the exact prompt is attached. While we educate users on the importance of selecting "Always Allow," these recurring prompts make it very easy for a student to downgrade the permission at a later date, which disables the app's safety features. This makes the solution unreliable in a school environment. Our Question: Since these are supervised devices managed by an educational institution, we are looking for a way to manage this behavior. Is there any Info.plist key, entitlement, or API available to developers to influence or suppress these recurring location reminders for our app? From an MDM perspective, is there a known payload or declarative management configuration that can prevent these specific prompts from appearing for a designated app? We understand these prompts are a key privacy feature. Our question is whether there are any provisions for managed, special-purpose environments like a school, where the app's function is considered essential and pre-approved by the device administrator (the school). We are looking for a way to provide a "set it and forget it" configuration for the school, but these reminders currently prevent that. Any architectural advice or insights would be greatly appreciated. Thank you.
2
0
88
Jul ’25
Apple Maps Server API Geocoding returns empty results for Japanese addresses with lang: 'ja-JP'
Hi, I'm using the Apple Maps Server API (/v1/geocode) to retrieve geocoding results for Japanese addresses. Until recently, requests like the one below returned correct results: GET https://maps-api.apple.com/v1/geocode?q=東京都千代田区千代田1-1&lang=ja-JP Authorization: Bearer <valid JWT> But now, the response is always: { "results": [] } However, when I use the same address with lang: en-US, it returns valid coordinates: GET https://maps-api.apple.com/v1/geocode?q=1-1 Chiyoda, Chiyoda-ku, Tokyo=en-US "東京都千代田区千代田1-1" is a Japanese address, and "1-1 Chiyoda, Chiyoda-ku, Tokyo" is the same address written in English. My Questions: Has there been a recent change to the geocoding behavior for Japanese addresses when lang: ja-JP is used? Does the lang parameter affect not only the response language but also the internal parsing logic? Is this a known issue or limitation? The access token is valid and I'm getting a 200 OK response, but results is always empty with lang: ja-JP. Thanks for your help!
0
0
94
Jul ’25
App not showing up in Apple Map's share location menu
I'm making an app that can have locations and links shared to it. I have gotten the share intent working for text and urls with: NSExtensionActivationSupportsWebURLWithMaxCount: 1 NSExtensionActivationSupportsWebPageWithMaxCount: 1 NSExtensionActivationSupportsText: true in Info.plist of the share extension. I am able to share Google Maps locations and safari websites. However, my app does not appear when I share a location on Apple Maps. I also tried the other options in the docs (https://developer.apple.com/documentation/bundleresources/information-property-list/nsextension/nsextensionattributes/nsextensionactivationrule) as well without success. When I share a location (i.e. a shop) in Apple Maps, it looks like a link but perhaps its something else? Does anyone know how to get an app to come up in the share menu of an Apple Maps location? Thanks!
0
0
25
Jul ’25
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
0
0
97
Jul ’25
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?
0
0
46
Jul ’25
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.
0
0
87
Jun ’25
Unexpected Immediate Delivery of Multiple UNLocationTrigger Notifications
Hello, I'm encountering an issue with UNLocationNotificationTrigger in my iOS app. I've scheduled three local notifications using UNLocationNotificationTrigger, each tied to a distinct geographic region. These regions are significantly distant from one another and should not trigger simultaneously under normal movement conditions. However, during testing, the user received all three notifications within one second, despite being physically located near only one of the regions. This behavior is unexpected and defeats the purpose of using location-based triggers. Could you please clarify why this might be happening? Is there a known issue with UNLocationTrigger, or is there a possibility that iOS preemptively triggers all scheduled location notifications? Any guidance or recommended practices to avoid this behavior would be greatly appreciated. Thank you!
5
0
91
Jun ’25
GPS HDOP
I have a marine navigation app which displays GPS quality information when receiving NMEA message from an external GPS. These include the number of satellites and Horizontal Dilution of Precision (HDOP). As far as I can see, the only additional information available through location services (for devices with built in GPS) is horizontal and vertical accuracy. Am I missing anything? Also does anyone know how horizontal accuracy is derived from HDOP?
1
0
58
Jun ’25
Ios26 CarPlay, not working
I have a Nissan Rogue 2021 and iPhone 14 Pro Max. Carplay was working fine until I decided to update to the new beta program and now my carplay does not seem to want to operate at all. I do the fixes online suggest in rebooting both systems, forgetting entirely and reconnecting. In the process of doing so, I can get the prompts to start with "Allow while unlocked?" But once selecting that I am unable to actually use the Carplay from the phone. It doesn't even give option to switch to it when I attempt to change audio output.
3
0
152
Jun ’25
Remove WeatherKit from existing app
One of my apps includes a free weather forecast using WeatherKit. Recently, it started to get more downloads and almost reached the limits of the free tier. I've removed the forecast in newer versions but there's still a substantial amount of users who do not update their apps. Is it possible to somehow remove the capability from existing apps? Thank you!
1
0
73
Jun ’25
WeatherKit always returns 401 NOT_ENABLED despite correct setup
Hi everyone, I’m trying to use WeatherKit REST API in my iOS app, but for several days now I always get the same response: WeatherKit capability is enabled in my App ID WeatherKit is enabled in App Services (in Certificates, Identifiers & Profiles) WeatherKit REST API is enabled in my developer account JWT is correctly signed with private key from AuthKey_XXXXX.p8 Token contains correct iss, kid, sub, exp, and scope Request is sent to https://weatherkit.apple.com/api/v1/weather/en/50.45/30.52 with Authorization: Bearer Still, the response is always 401 NOT_ENABLED. This is not a temporary issue — I’ve been testing this for over 5 days, regenerating keys, JWTs, and checking the setup. Everything seems correct — but WeatherKit just won’t respond with actual data. Has anyone experienced something similar? Is there something missing in the setup not documented? Thanks in advance!
0
0
46
Jun ’25
XCFramework Location Behavior Differs from Standalone App in Background/Sleep Mode
Hi Apple Dev Team & Community, We’ve encountered an issue with background location updates when using an XCFramework we’ve built from our main app. Context: We have a standalone app called TravelSafely that reliably performs background location updates and alerts, even during sleep mode. From this app, we extracted some core functionality into an XCFramework, including location management, and provided it as an SDK to a client. We created a demo app to test this SDK in isolation. Problem: In the demo app, we notice that location updates work fine in the foreground. However, in the background or sleep mode, location updates sometimes stop completely. When we bring the app to the foreground again, location resumes. This does not happen in the original standalone app. What We’ve Already Checked: UIBackgroundModes includes location Info.plist has the required permissions Location is started correctly using startUpdatingLocation We maintain strong references and use background tasks as needed Question: Why would an app using a binary XCFramework (with location logic) behave differently from the original app in terms of background execution? Is there any known issue or recommendation when working with SDKs/XCFrameworks that need to manage background tasks and location updates? Any insights or recommendations to maintain proper background behavior would be highly appreciated. Thank you!
10
0
92
Jun ’25
Background Modes Capability Missing in App ID Configuration
Hello, I upgraded my Apple Developer account from free to paid (Individual), but I cannot enable “Background Modes” (specifically “Location updates”) for any of my App IDs—including both old App IDs created while on the free account and brand new App IDs created after upgrading. When I go to Apple Developer Portal &gt; Identifiers &gt; [select App ID] &gt; Edit, the option for “Background Modes” is missing from the list of capabilities. This is preventing me from enabling required entitlements for background location in Xcode, and all provisioning profiles fail with errors such as: Provisioning profile "iOS Team Provisioning Profile: [my bundle id]" doesn't include the com.apple.developer.location.always and com.apple.developer.location.background entitlements. Steps I’ve Taken: Upgraded to a paid Apple Developer Program (verified in my account). Created new App IDs after upgrading—Background Modes is still missing. Created new Xcode projects with new App IDs and bundle identifiers—same result. Refreshed provisioning profiles, cleaned Xcode, logged out/in—no change. Contacted Apple Support; advised to file a Code-Level Support request, but the issue is with the portal/App ID capabilities, not my code. My Question: Has anyone experienced this issue where Background Modes capability is missing for all App IDs, even after upgrading to a paid account? Is there any workaround, or does this require intervention from Apple Developer Support to “unlock” the missing capabilities for my developer account? Any insight or advice would be appreciated! Thank you.
6
0
283
Jun ’25