Maps and Location

RSS for tag

Build maps and location awareness capabilities into your apps.

Posts under Maps and Location tag

87 Posts
Sort by:
Post not yet marked as solved
0 Replies
347 Views
Does any Apple API support the Location management for the business? I am interested in if I am able to integrate an Apple business into my application. The first thing I care about is business location management (I would like to create/edit the location via an API call)
Posted Last updated
.
Post not yet marked as solved
0 Replies
355 Views
In our placation there are instances of crashes that are happening in production. That we cannot quite reproduce. Looking at the crash report doesn't reveal much as the crashed thread doesn't give too much information of where to look for the root cause of the problem. In our app we are also using third-party libraries but I didn't see that they might be the cause for the crash. Crash report If someone can point me in the right direction to look for or how to investigate it. It would much appreciated.
Posted
by kesleme.
Last updated
.
Post not yet marked as solved
1 Replies
314 Views
Hello. I've submitted a small update for my app and i received an email that said: "The “” value for the NSLocationWhenInUseUsageDescription key isn’t allowed " I have values for the above key in English and Greek in InfoPlist files and they are appearing correctly when the app is asking for location permissions. It has been like this for years and i didn't change anything related to this function. Can someone please explain to me why i received this email although i've set everything correctly?
Posted
by jimdem582.
Last updated
.
Post marked as solved
3 Replies
620 Views
At the moment with my app Users have to go to Privacy & Security -> Locations Services -> On -> Scroll down to my app and turn on their Location Preference. I am trying to incorporate in to my app the Code below to make it unecessary to leave the app to enable the User‘s location to be displayed but it does not work. Please tell me, what am I missing here? import MapKit import SwiftUI import CoreLocation // Prompt User to choose Location Preference // class ViewController: UIViewController, CLLocationManagerDelegate{ var locationManager: CLLocationManager? override func viewDidLoad() { super.viewDidLoad() locationManager = CLLocationManager() locationManager?.delegate = self locationManager?.requestWhenInUseAuthorization() view.backgroundColor = .gray } } // The rest of the Code which is working okay ( Map etc.) // struct Positions: Identifiable { let id = UUID() let name: String let latitude: Double let longitude: Double var coordinate: CLLocationCoordinate2D { CLLocationCoordinate2D(latitude: latitude, longitude: longitude) } } etc. etc.
Posted
by GMacD53.
Last updated
.
Post not yet marked as solved
0 Replies
413 Views
Is there a way of deleting an app from the Location Services in the Privacy Setting? Despite deleting the particular app evidence of it remains. Also with a particular app there are several of the same in the list. I do understand there may be one for the Playgrounds version and one for the actual downloaded version but I have more. Is there a way of starting with a clean slate?
Posted
by GMacD53.
Last updated
.
Post not yet marked as solved
0 Replies
316 Views
After installing 17.1 on test devices, I am seeing a lengthy difference in requesting a user location. Takes about 4-5 seconds. This issue doesn't occur on 16 or 17.0. Anyone else seeing this problem?
Posted
by autoliv.
Last updated
.
Post not yet marked as solved
0 Replies
360 Views
If you refresh the page after initially granting location permissions, you will be prompted for location permissions again and will need to grant permission again. Currently this only occurs on iOS. Is there a way? The tested iOS versions are 16.2 and 17. This is the code implemented when retrieving location information. <script> var options = { timeout: 15000, enableHighAccuracy: true, maximumAge: 86400000, }; function success(pos) { var crd = pos.coords; alert('Your current position is:'); alert(`Latitude : `+crd.latitude); alert(`Longitude: `+crd.longitude); }; function error(err) { alert(`ERROR(): `+err.message); }; navigator.geolocation.getCurrentPosition(success, error, options); </script>
Posted
by sanguk.
Last updated
.
Post not yet marked as solved
0 Replies
516 Views
If you refresh the page after initially granting location permissions, you will be prompted for location permissions again and will need to grant permission again. Currently this only occurs on iOS. Is there a way? I launched that web from app and the Safari settings didn't fix the issue. What should I do about this problem? The tested iOS versions are 16.2 and 17. This is the code implemented when retrieving location information. <script> var options = { timeout: 15000, enableHighAccuracy: true, maximumAge: 86400000, }; function success(pos) { var crd = pos.coords; alert('Your current position is:'); alert(`Latitude : `+crd.latitude); alert(`Longitude: `+crd.longitude); }; function error(err) { alert(`ERROR(): `+err.message); }; navigator.geolocation.getCurrentPosition(success, error, options); </script>
Posted
by sanguk.
Last updated
.
Post marked as solved
1 Replies
923 Views
I have a map (iOS 17) that displays the three Apple maps types (standard, hybrid, and imagery). When the hybrid or imagery map is displayed for the first time it is zoomed in to the max and out-of-focus. It appears to be a problem with the span. I would like to set the span to fix this, but I'm not sure if span has a new name or is no longer used. In previous versions of iOS I had a region that defined the span and coordinate center, It appears that this has now been deprecated: let span = MKCoordinateSpan(latitudeDelta: 0.005, longitudeDelta: 0.005) let region = MKCoordinateRegion(center: coordinate, span: span) MapView(region: region, mapType: mapType, coordinate: coordinate) Here is my actual code for display a map (iOS 17): struct DetailView: View { var item: TravelEntries // <-- coordinates arrive from CoreData Transaction @Binding var mapType: Int var coordinate: CLLocationCoordinate2D { CLLocationCoordinate2D( latitude: item.entryLat, longitude: item.entryLong) } var selectedMapStyle: MapStyle { return switch(mapType) { case 0: .standard(elevation: .realistic) case 1: .hybrid case 2: .imagery default: .standard(elevation: .realistic) } } var body: some View { VStack { Map() { Marker(item.entryCatName ?? "", coordinate: coordinate) .tint(.red) } .mapStyle(selectedMapStyle) ShowMapPicker(item: item, mapType: $mapType) ShowDetails(item: item) } } }
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.4k Views
Hello, I'm trying to figure out how to detect when user stops scrolling (panning) the map. The problem: I have a MapAnnotation that I want to always keep in the centre, even is user is panning/scrolling the map. When map is open first time, the original annotation location is user's current location. I request the name of the location to display it on top of the annotation. when user moves the map around, I want to track when he stop this action and select a location in the centre of map's new region and display the a location's name on top of the annotation I can't use .onChange() because region centre changes constantly as user moves the map, because it causes to many requests for location's name DragGesture .onEnded() is never called, so I have no idea when customer stops moving the map So my question is - how to detect in this case when customer stopped moving the map? Have anyone faced the same problem? Any ideas how to solve it?
Posted
by AndySh.
Last updated
.
Post not yet marked as solved
0 Replies
334 Views
I have a new app that I am starting using the Map() component in iOS17. That struct, creates a class which is a CLLocationManagerDelegate, and instantiates a CLLocationManager. In the Target's Info settings, I have Privacy - Location Always and When In Use Usage Description Privacy - Location Always Usage Description Privacy - Location Usage Description all three set. I have another Map app with these set which doesn't have this problem, so I am confused about why, in Privacy & Security->Location Services, the App only shows two selections for Location Services. It shows only "Never" and "When I Share" selections with "When I Share" selected. The location manager reports error: The operation couldn’t be completed. (kCLErrorDomain error 1.) after I get the CLAuthorizationStatus(rawValue: 0) auth=CLAccuracyAuthorization(rawValue: 0) value in public func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) status change in this callback for the delegate and then call: manager.requestAlwaysAuthorization() manager.startUpdatingLocation() What am I missing here?
Posted
by greggwon.
Last updated
.
Post not yet marked as solved
0 Replies
341 Views
We request for your kind support, whether it is a previous experience or even a comment will help us a lot! We received rejection for below issue from Apple : ** Guideline 4.0 - Design Your app's location feature is not integrated with the built-in mapping functionality, which limits users to a third-party maps app. Next Steps To resolve this issue, please revise your app to give users the option to launch the native Apple Maps app.** But, our app requires POI(point of interest) on google maps for the service, thus, utilizing apple map's data causes disruption and mismatch of POI data causes issues on business logic (If our app's function was just loading apple map with marker on it, we could solve the issue..) Has anyone faced this rejection issue? We look forward to your kind comment, we are on the verge of going under due to the continuous rejections and errors from app store connect. We are desperate and we request for your kind comments. Sincerely
Posted
by Jean_Kim.
Last updated
.
Post marked as solved
1 Replies
566 Views
My watch app records workouts including health (with HKWorkoutSession) and location data.The watch app is on the App Store and runs without any problems since long time. I updated my own Watch Ultra to watchOS10 and my app does not properly work anymore. Everything works with the exception that the app does not receive any CLLocationManager data on the physical device. On the simulator it works perfectly. I tried several devices in the simulator and they all work. Also I de-coupled the watch from the phone, deleted the watch completely and re-installed it. My app's target is watchOS9, I tried it with watchOS10 and the problems are the same CLLocationManager has correct and valid permissions CLLocationManager is setup like this: locationManager = CLLocationManager() locationManager.delegate = self locationManager.allowsBackgroundLocationUpdates = true locationManager.activityType = .fitness locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager.distanceFilter = kCLDistanceFilterNone locationManager.startUpdatingLocation() CLLocationManager's delegate is listening to: func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) The CLLocationManager is starting and correctly giving feedback on 'didFailWithError' and on 'didChangeAuthorization'. Nothing that tells me that something is wrong and points to a problem. No data is sent to didUpdateLocations. The function is never ever called. Of course I'm outside with my watch and the GPS signal is strong and I wait long enough. My app is adding the recorded workout to Apple Fitness app (my app uses HKWorkoutSession) and even though my own app does not receive any CLLocationManager data, the workout that it sent to Apple Fitness includes all the CLLocationManager data. It really seems like being a problem with my app only. Does someone have an idea or knows of a same problem? Thomas
Posted
by tompfe.
Last updated
.
Post not yet marked as solved
1 Replies
509 Views
I built an autopilot for my boat, and took it further by writing an IOS app to control it via bluetooth with my phone. Everything was working great, until I thought I'd add the ability to navigate a route. Here's what has me stumped... I've got location manager generating updates, as long as the phone is moving (ever so slightly) in my hand. I've got the display setup to never sleep, and the phone is plugged in to power. If I put the phone down, I get a few new locations, then the location freezes. The didUpdateLocations delegate is called, but the location never changes. I've tried a number of settings but no matter what I try, none have solved the still phone issue. My current design uses self.locationManager?.requestLocation() sent on at programmable interval, so that I get updates with reasonable spacing. The updates come, but the location is identical if the phone is still (laying on the dash of the boat). If I just "wiggle" the phone a bit, locations come with a new value. If I keep "wiggling the phone, I get new locations every call to requestLocation. Seems like there is some kind of inactivity timer associated with didUpdataLocations that prevents retrieving new locations. It just re-sends the previous location. This issue has nothing to do with using requestLocation, since I had the same issue when didUpdateLocations was running on its own timing. I added the code and logic to support requestLocation in an attempt to force a new location. Has anyone experienced this or have any idea how to force a "new" location when the phone is still? I'm using Xcode Version 14.3.1 (14E300c) The phone is an iPhone 12 and the deployment target is set to 15.3 Here's how I currently configure location manager... This is one of a number of attempts, but all have the same issue. if locationManager == nil{ print("****** instantiating locationManager ******") locationManager = CLLocationManager() locationManager!.distanceFilter = kCLDistanceFilterNone // locationManager!.distanceFilter = 3 locationManager!.desiredAccuracy = kCLLocationAccuracyNearestTenMeters locationManager!.delegate = self locationManager!.showsBackgroundLocationIndicator = true locationManager!.startUpdatingLocation() locationManager!.startUpdatingHeading() locationManager!.allowsBackgroundLocationUpdates = true } }
Posted
by Weecabin.
Last updated
.
Post not yet marked as solved
0 Replies
399 Views
In iOS 17 Beta (beta1 to RC versions all have this issue), my phone gets extremely hot when I open any app that continuously accesses GPS. The built-in Maps app heats up relatively well, but other third-party apps heat up quickly, causing the device to throttle, reduce brightness, and even lag. Device:iPhone 12
Posted
by zealotce.
Last updated
.
Post not yet marked as solved
2 Replies
650 Views
Hello, I am currently working on an app for a client. The concept is straightforward: the app allows users to view the location of other users on a map, even when they are not actively using the app. However, this feature is limited to a selected group of people, specifically those who have joined the same group as the user. To achieve this, I collect location data in the background. The primary objective of this app is to connect users with nearby individuals who can assist them with tasks or jobs. However, I encountered an issue during the app review process. The review team deemed it inappropriate for deployment because it displays users' locations on a map, without the necessary privacy safeguards in place. Nevertheless, the main purpose of the app is to allow users to be visible on the map, and people who download the app intend to be included in this display. Here is the comment provided by the reviewer: Your app enables the display of nearby users' locations on a map, but does not have the required privacy precautions in place. Additionally, here is the specific requirement: Require users to manually check-in each time they wish to have their location displayed on a map; there should be no option to enable automatic check-ins. If I understand correctly, this means that users would be required to open the app in order to appear on the map. However, this contradicts the purpose of the app, as users prefer to be passively visible without actively opening the app. On the other hand, I have noticed tracking apps like Life360 and others that provide similar functionalities. They display users' locations on a map in near-real-time. What am I missing to ensure the validity of my app? The reviewer mentioned being unable to provide any hints, so I am hopeful that someone here can assist me.
Posted
by ThomasMor.
Last updated
.
Post not yet marked as solved
1 Replies
1.7k Views
Hi, I'm new to wallet, but I already implemented a Loyalty Pass with some use cases: distributing, pushing updates, standard notifications, geofencing notifications with lock screen notifications. Until a month ago, all worked flawlessy, but now the majority of my audience (the users that have installed the pass in their Apple Wallet) don't see the notifications when they enter in the location radius. The strange thing is that with the same json content (same id, same locations list, same coordinates) some users see said notification without a hassle while the other see nothing, even toggling on and off all the related permissions. I suspect (only a suspect, I'm going by exclusion) that the new device subscriptions are those who don't see the notifications and only the old ones see everything as before. Any suggestion? Do a users dashboard (or at least a device subscription list) exist in my Apple Developer portal? Is a known bug, already reported? Thanks for all your replies
Posted Last updated
.
Post not yet marked as solved
4 Replies
1.1k Views
Hi, I updated Xcode to version 14.3 (14E222b) which comes with iOS 16.4 Also macOS has the latest update Ventura 13.3 (22E252) Mac hardware is a MacBook Pro M1 Max After the update in MapKit (Not SwiftUI) MKPolylineRenderer won't render any more in an iOS 16.4 emulator (but still works fine on a physical device). In the terminal I see many lines like this: "Compiler failed to build request" "PSO error: reading from a rendertarget is not supported" I don't see these lines on a physical device and the polylines render fine on a physical device. Has anybody else seen this? Anything I can do? Thanks Gerd P.S. workaround: works for me when I choose the target "My Mac (Designed for iPad)"
Posted
by gerdc.
Last updated
.
Post not yet marked as solved
1 Replies
443 Views
@Gualtier Malde, My app has not been able to send location updates in the background past 5hrs even after implementing all the changes you specified The debugger spits out nothing .... allowsBackgroundLocationUpdates must be set to TRUE distanceFilter must not be set desiredAccuracy must be kCLLocationAccuracyHundredMeters or better. If you’re using numeric values, it must be set to less than 1000 meters (We set it to 100m) We have been losing hundreds of enterprise clients as a result of this, is there something we can do to ensure the behaviour is similar or same to iOS <16.4?
Posted
by Idamezhim.
Last updated
.
Post not yet marked as solved
0 Replies
404 Views
Am looking to finally updating some old code now that we are dropping iOS 15 support and want to move to the new mkMapView configurations such as MKHybridMapConfiguration. However when I use that configuration I cannot get it to show traffic conditions, even though I am setting showsTraffic = true Bug, feature, dumb coding error on my part?
Posted
by hotngui.
Last updated
.