Maps and Location

RSS for tag

Build maps and location awareness capabilities into your apps.

Posts under Maps and Location tag

101 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

MKReverseGeocodingRequest and CNPostalAddress from MKMapItem
My app is currently using CLGeocoder to get a CLPlacemark, then using placemark.postalAddress with CNPostalAddressFormatter to get an attributed string for the full address, I then enumerate its attributes to pull out specific elements like just the street or state or zip etc. This is deprecated in iOS 26 with MKReverseGeocodingRequest being the intended replacement. This API returns an MKMapItem which doesn’t provide a CNPostalAddress - you can get a full address as a String but not structured address data that I’m seeing. Am I missing some way to get the postal address? Or is it a non-goal to provide that anymore? Thanks!
2
0
44
1d
Problem receiving Remote Notification in the background after Review Rejected
I created an app. One if its functionalities is receive Remote Notification in the background, while app is monitoring Significant Location Changes (SLC). This functionality worked fine. I was receiving these notifications correctly. Sometimes instantly, sometime with small or large delay. And then I send the app for review. It was rejected with 3 remarks: The app or metadata includes information about third-party platforms that may not be relevant for App Store users, who are focused on experiences offered by the app itself (I wrote that app communication works both for iOS and Android.) The app declares support for audio in the UIBackgroundModes key in your Info.plist but we are unable to locate any features that require persistent audio. EULA (End User License Agreement) is missing for in-app purchases. After the rejection the app is no longer receiving these notifications. They are there, since the app receives them, when I open app, or significant location change is detected. It also works, when I run the app directly from Xcode (in debug mode), not from TestFlight nor in Sandbox. It seem to me like Apple somehow spoiled my background capabilities on purpose or accidentally. Is it possible? What can I do with it? Is it the case that I should just fix the review remarks and send the app back to review, and once the app passes it, it will work again? Or should I not count on it? Any suggestions? I asked Apple using: https://developer.apple.com/contact/topic/#!/topic/select but so far no response.
2
0
100
1d
Live Weather Radar Overlay in CarPlay Maps
Hi all — I wanted to share an idea I recently submitted through Feedback Assistant that I think could improve safety and usability for drivers using CarPlay: Add an option to overlay live weather radar (rain, snow, storms, etc.) directly onto CarPlay Maps while navigating. Similar to how traffic conditions are shown now, this would allow drivers to visually track incoming weather in real time without switching apps or relying on separate devices. Why this matters: • Enhances driver safety by increasing situational awareness • Helps with trip planning and route adjustments around severe weather • Reduces distractions by integrating everything into one screen • Useful for everyday drivers, long-haul travelers, and first responders I submitted this via Feedback Assistant, but I’d love to know what others think. If you also see value in this feature, consider submitting your own version via Feedback Assistant so Apple sees there’s interest. Let’s push for smarter, safer navigation — thanks for reading!
3
0
666
1w
Replacement for deprecated CLPlacemark.region?
Hello, I use CLGeocoder to get the CLLocationCoordinate2D and CLRegion for an address. Now that this is deprecated in OS 26, I don't see a replacement for that property on MKMapItem via MKMapItemRequest and PlaceDescriptor. I've filed FB19027378 on this issue. Basically I have some addresses that have a street address, and others that just have a city. With CLGeocoder, when geocoding just the city, the CLRegion was set such that I could show my map zoomed out just right. I'm not sure how to do that now. Thanks!
0
0
71
1w
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
97
1w
Flutter: abnormal delay on iOS in position recovery on first opening
Good morning everyone, I am developing a Flutter app for Android and iOS. When I press a button, the app detects the location of the device (obviously with permissions already granted). On Android everything works correctly. On iOS, however, when I press the button for the first time after opening the app, the location is detected after about 30-50 seconds. On the other hand, if I repeat the operation later, the response time is drastically reduced (only a few seconds). I am using the location package (https://pub.dev/packages/location), and the code to get the location is as follows: var currentLocation = await location.getLocation(); Has anyone experienced this problem before or knows how to solve it? Thank you very much! Federico
0
0
103
3w
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
85
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
39
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
75
Jun ’25
Submission Rejected: Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage
Hello Experts, I am in need of your help with this feedback from the App Reviewer. Issue Description: One or more purpose strings in the app do not sufficiently explain the use of protected resources. Purpose strings must clearly and completely describe the app's use of data and, in most cases, provide an example of how the data will be used. Next Steps: Update the location purpose string to explain how the app will use the requested information and provide a specific example of how the data will be used. See the attached screenshot. Resources: Purpose strings must clearly describe how an app uses the ability, data, or resource. The following are hypothetical examples of unclear purpose strings that would not pass review: "App would like to access your Contacts" "App needs microphone access" Feedback #2 "Regarding 5.1.1, we understand why your app needs access to location. However, the permission request alert does not sufficiently explain this to your users before accessing the location. To resolve this issue, it would be appropriate to revise the location permission request, specify why your app needs access, and provide an example of how your app will use the user's data. To learn more about purpose string requirements, watch a video from App Review with tips for writing clear purpose strings. We look forward to reviewing your app once the appropriate changes have been made." May I know how can I update my purpose string? I appealed on the first feedback by explaining what is the purpose of it but got the Feedback #2. TYIA!!
1
0
162
Jun ’25
In Safari's JavaScript geolocation, is altitude based on MSL or WGS84 ellipsoid?
Hello all, I'm trying to retrieve geolocation data on the web, but I'm having trouble with the altitude value, which seems to differ from what I get on Android. When using navigator.geolocation.getCurrentPosition in Safari, is the altitude value based on mean sea level, or is it ellipsoidal altitude based on the WGS84 ellipsoid? altitude (WebKit JS): https://developer.apple.com/documentation/webkitjs/coordinates/1631861-altitude altitude (Core Location): https://developer.apple.com/documentation/corelocation/cllocation/altitude ellipsoidalAltitude (Core Location): https://developer.apple.com/documentation/corelocation/cllocation/ellipsoidalaltitude If anyone has any insight into this topic I would greatly appreciate it!
0
0
29
Jun ’25
Uploaded Build Missing NSLocationAlwaysAndWhenInUseUsageDescription Key Despite this Key Being in the Info.plist File
Hey All! I keep receiving an email from Apple stating "You have a missing purpose string in your Info.plist" for the key "NSLocationAlwaysAndWhenInUseUsageDescription". The thing is, though, that we are setting that value within our build Info.plist. The data in that value is even reflected into the application after build, with the correct purpose string showing up when requesting location services. We currently do our builds via Azure Devops CI/CD, where we use xcodebuild for this process. The archive also generates an Info.plist without the location key, so I tried manually inserting it before deployment. Also no luck. Anyone else had this issue or know how to resolve it? Snippet to show how the location key is currently set during build: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>NSLocationWhenInUseUsageDescription</key> <string>Application uses location data for accurate maps display</string> </dict> </plist> Thanks!
1
0
46
Jun ’25
Live Activity does not work as a proxy for CLBackgroundActivitySession
Hi, I've watched the WWDC video "Discover streamlined location updates" As detailed here: https://developer.apple.com/videos/play/wwdc2023/10180/?time=364 In order for my app to receive location updates in the background, the video states that I can either use a live activity or a CLBackgroundActivitySession My app has a live activity, however the location updates stop shortly (10 seconds, this is the normal "grace period" described) after backgrounding the app, even when the live activity is visible. If I acquire a CLBackgroundActivitySession, location updates continue in the background. I have reproduced this behavior in the Simulator in a barebones app for testing and confirmed that it's not working as described. My question is: Should I hold a CLBackgroundActivitySession even when I already have a Live Activity?
0
0
53
Jun ’25
When should I convert coordinates to GCJ02?
Our backend management system uses Google for Location, and Apple Maps is just one of the solutions in our map component. When should I convert coordinates to GCJ02? Maybe you would say that when you are in mainland China? BUT NOT AT ALL! What if the user does not enable location permission? What if the user has not inserted a SIM card? Or not Chinese SIM card but location in China? OR the user location in China, But use VPN with en overseas IP? All solutions are not perfect, unless you open the API to developers and tell us whether Apple Maps currently uses the wgs84 coordinate system or gcj02, which is the most reliable.
1
0
69
Jun ’25
Clustering on MapKit for SwiftUI iOS17+
Hi What would be the best way to achieve clustering on MapKit within SwiftUI? We're building a decentralized commerce auction platform that is currently live in Switzerland with 3'500 live auctions that can be discovered on a map. We're now running into the issue that the map gets cluttered, when zooming out and haven't been able to find a way to cluster We moved back to UIKit, where clustering works, but UIKit has other drawdowns. So ideally there is a way to handle it within SwiftUI without having to wrap UIKit or move back entirely to UIKit. Thanks for any help or suggestions! Developer Documentation https://developer.apple.com/documentation/mapkit/mapkit-for-swiftui Julius Ilg AuctionShack
2
1
64
Jun ’25
Apple Maps directions not starting on first launch in CarPlay
In my app, I want to launch Apple Maps and start turn-by-turn navigation when the user taps a button. I referred to Apple’s documentation and sample projects and implemented the following code: if let url = URL(string: "maps://?t=m&daddr=(addr)") { self.carplayScene?.open(url, options: nil, completionHandler: nil) } This works only if Apple Maps has been launched at least once on the iPhone or in the CarPlay environment. If Apple Maps has never been opened before, it launches the app but does not automatically start navigation. However, once the user has opened Apple Maps at least once — either on the phone or through CarPlay — then navigation starts as expected from that point on. Is this behavior expected? Or is it a bug?
3
0
52
Jun ’25
Re-enabling Background Location Services When Reconnecting to a Bluetooth Device
Hi all, We’re running into a challenge with our iOS app DriveSmarter, which uses background location updates when connected to a physical Bluetooth device (e.g., dash cam, radar detector). For battery efficiency, we disable location services in the background when no device is connected. The problem we’re now facing is: How can we programmatically re-enable location services when a Bluetooth device reconnects while the app is still in the background? From what I understand, Core Location doesn’t allow re-enabling background location updates unless the app returns to the foreground. But our core use case requires this to happen seamlessly in the background when the user starts driving and the device connects again. To clarify: We stop location updates when the device disconnects. We want to resume location updates only when the device reconnects, even if the app is still in the background. Manually bringing the app to the foreground is not a reliable or user-friendly option. So my questions: Is it possible to programmatically restart background location services upon a Bluetooth connection event while staying in the background? If not, are there any best practices or Apple-recommended alternatives to achieve a similar result? Any guidance, patterns, or creative solutions would be greatly appreciated! Thanks in advance
1
0
56
Jun ’25
Location streaming onto Live Activity
Hello forum, I want to keep my app running in the background after user swaps up, for the purpose of workout tracking. start up the task and continuously receipt GPS updates process the location data show the data on a live activity Two examples Strava paddlelogger Question: Does this mean, these two apps would just pause when the .backgroundTimeRemaining becomes 0? How does a workout app "work" in background mode, do I need to handle budget running out?
2
0
62
Jun ’25