Core Location

RSS for tag

Obtain the geographic location and orientation of a device using Core Location.

Core Location Documentation

Posts under Core Location tag

135 Posts
Sort by:
Post marked as solved
6 Replies
847 Views
Can anyone explain why I need to provide location service capabilities to get BSSID info for the Wi-Fi network device? Here some notes from CWNetwork header language /*! @property @abstract Returns the basic service set identifier (BSSID) for the Wi-Fi network device, returned as UTF-8 string. @discussion Returns a UTF-8 string using hexadecimal characters formatted as XX:XX:XX:XX:XX:XX. @note BSSID information is not available unless Location Services is enabled and the user has authorized the calling app to use location services. @seealso CLLocationManager / @property(readonly, nullable) NSString *bssid NS_AVAILABLE_MAC(10_6);
Posted
by
Post not yet marked as solved
1 Replies
486 Views
I'm planning to develop an application for iOS that tracks the user's location and would like to better understand the location data (i.e. coordinates) stream that iOS provides to applications. In particular does the hardware or platform already employ some kind of filtering for the location stream or is this something that the application developers need to do? Does this differ per iPhone, iOS version or GNSS system used? Where could I find more detailed info on this? marko
Posted
by
Post marked as Apple Recommended
2.3k Views
There's new API and some header documentation for "Location Push Service Extension"s. I haven't seen any sessions related to Core Location scheduled beyond Meet the Location Button Is there any documentation for this I have missed?
Posted
by
Post not yet marked as solved
1 Replies
751 Views
My iOS-app shows a map and may be the user's location. At some point it will request the "always" location permission. On iOS all is well. The app also runs pretty neat on M1 macs so far, except for the part where it wants to request that permission. I also think it never asked me for the "Permission when in use" on the M1. However, after the user granted the always-permission on iOS, he'll be shown the screen of the GPS tracker. Since recording GPS tracks doesn't make much sense on M1, I'd like to show the user that screen, but disable the start button. So how do I test for M1? P.S. I'd not ask such a dumb question, if I didn't get this error: (including these strange quotes) „POI Toolbox“ kann nicht installiert werden Domain: IDEInstallLocalMacService Code: 1 Failure Reason: Versuche es später noch einmal. Recovery Suggestion: Failed to finalize LSBundleWrapper mutator instance for {...BUNDLE_ID...} -- System Information macOS Version 11.4 (Build 20F71) Xcode 12.5.1 (18212) (Build 12E507) Timestamp: 2021-06-28T12:31:13+02:00 The "failure reason" doesn't say anything helpful. It means "Try again later."
Posted
by
Post not yet marked as solved
1 Replies
344 Views
I am developing an iOS app in the field of aviation. Now I have a feature request of a customer that requires to solely use the ellipsoid height (WGS84) for calculations. I know from another question / answer that the CLLocationManager returns the converted geoid height via its "altitude" property. Is there any possibility to get the ellipsoid height (WGS84) or the used geoid undulation to translate the given geoid height from CLLocationManager back to ellipsoid height? If not does anyone know a third party lib for conversion using EGM2008?
Posted
by
Post marked as solved
1 Replies
387 Views
please let me know, is it possible to track location. when app is in TERMINATED or SUSPENDED STATE.
Posted
by
Post not yet marked as solved
0 Replies
285 Views
I test with VLC as RTSP audio client on MacOS. Every 5 minutes, I hear noise. The noise continue for 3 sec, happens every 5 min exactly. During noise period, kernel_task use +25% CPU for 3 sec, Console->wifi.log put message staring with SCAN request received from pid ??? (locationd) with priority=2, qos=-1 (default), frontmost=no I checked Wireshark, it receives RTP/UDP packets every 20ms. But during noise period, no package for 140ms. That makes no sound period and noise. If I disable WiFi and use Ether cable, the noise is gone. If I disable Settings -> Security & Privacy -> Location Services, the noise is gone. Is there any way to receive RTP/UDP package during locationd's scan? My environment: macOS Big Sur ver 11.4 iMac (Retina 5K, 27-inch, 2017) VLC 3.0.16(Intel 64bit)
Posted
by
Post not yet marked as solved
1 Replies
579 Views
I'm developing a workout app and the app uses routeBuilder to save the workout route along with workout data. The app did as expected (retrieves and saves GPS data) when app is in foreground mode and even in background mode when Apple Watch display is ON ... the problem is when the watch enters the dim state (blur on Always On) then GPS data is received 10-15 more seconds and after that the app stops receiving updates until display is ON again. Background Mode - Location Updates and Workout Processing capabilities are ON , allowsBackgroundLocationUpdates is true, Location When In Use permission is granted. App works fine on simulator. The previous behavior is on an Apple Watch 6, 44mm WatchOS 7.5 (Watch only app)
Posted
by
Post not yet marked as solved
0 Replies
317 Views
When we ask users for permission to use their location, they'll be able to grant permission to "WhenInUse" in the first step. After that the app may ask for "Always" authorization and the user taps 'Change to always'. That's fine. So far... But there is something missing: Issue on the 1st step: An app can't tell the user that the wrong permission button was tapped ('Allow once' is sometimes wrong, see step 2) and to go to the settings to correct that. 'Allow once' is okay to show the user's location on a map. BUT if the app later needs BG permission, step 2 will fail silently. That's confusing to the user, and to the developer! Also, some users get nervous if they encounter such system pop-ups (i.e. see your mothers and fathers) and tend to tap 'Allow once'. (My app shows a map, where 'Allow once' is okay, but it also is a GPS tracker in the 2nd use-case) Issues on the 2nd step: (2.1) Well, the user asks the app to record a GPX track and before he chose 'Allow once' (because he wanted the map to locate himself; the same app session). Guess what? Nothing at all happens. To the user the app appears to be buggy. Since it didn't get any explicit callback by the system it never was able to determine whether another permission request could be successful or not. (2.2) The user selected "WhenInUse" in step (1) and decided to "Keep 'WhenInUse'". Nothing at all happens. Again. Problem here: The user tapped a button and the app doesn't get any callback on this. That probably breaks functionality. I have also tried to receive notifications (about key windows: UIWindowDidBecomeKeyNotification and UIApplicationDidBecomeActiveNotification). But the pop up seems not to be anything like a window or ... whatever would cause the app to resign the active state. So here are my 2 cents. If I'd be the engineer of CLLocationManager, I'd like to change the following (R = Request): (R1) Add CLAuthorizationStatusTemporary (That is: "Allow once only" and means: "You don't even need to ask for 'Always' authorization") (R2) Some in-app mechanism, that would allow the user to correct the choice to "Allow 'WhenInUse'" once. (R3) Always give a feedback on the current authorization status, after the user taps a button. Can we please have these changes?
Posted
by
Post not yet marked as solved
0 Replies
502 Views
Hi! I am doing a project with location simulators, and I am trying to figure out how to simulate my location with latitude longitude coordinates via Xcode. I am able to do so with a GPX file, but my location returns to its actual one after a few hours. Is there a way to hardcode it into the system to stay intact until the phone is reset or for n amount of hours? I would like my location to only be accessed when I allow it, specifically through find my. Thank you for any help in advance.
Posted
by
pjp
Post not yet marked as solved
2 Replies
1.3k Views
Hi I am working on my app to support ipad split view. My problem is that the location permission request popup doesn't appear immediately when split view is activated. The summarized code is below. import CoreLocation class MyViewController: UIViewController {   var locationManager = CLLocationManager()   //skip code...    @objc func touchUpInsideLocationButton(_ sender: Any) {     self.locationManager.requestWhenInUseAuthorization()   } } After the code that handles the button touch is executed, the system popup requesting the location permission does not appear. When I close the iPad split view (Drag the app divider to the left or right edge of the screen), a system popup appears at that time. When requesting permission to access photos in iPad split view, a system pop-up appeared immediately. The location information permission popup should also appear immediately, but I'm not sure if it's a bug or the intended behavior. Please help. Have a nice day 😄
Posted
by
Post not yet marked as solved
0 Replies
239 Views
When “Don’t allow" (or any other option) is selected on the permission confirmation screen of location service, and no other permission (camera or photo library access permission) selection operation is performed. Application name will not appear on settings screen. However, application is appearing in Settings -> Privacy -> Location Services
Posted
by
Post not yet marked as solved
1 Replies
702 Views
The latest betas have new API in Core Location around "location pushes" including: CLLocationManager.startMonitoringLocationPushes CLLocationManager.stopMonitoringLocationPushes protocol CLLocationPushServiceExtension CLLocationPushServiceError Does anyone know what these are for? I couldn't find anything in the WWDC sessions, or general web searches.
Posted
by
Post not yet marked as solved
0 Replies
239 Views
Hello, Developing an app using third party template "Good Barber". Need to implement geo-restricting by device location to a specific region to get the app approved. They are telling me it is not possible with their template. Can anyone one help guide me to a possible solution?
Posted
by
Post not yet marked as solved
0 Replies
419 Views
I am using MapKit to show navigation directions between source and destination location like in apple and google maps. With the help of MKRoute object, i am showing distance required for the user to make his next turn in x distance. For distance i'm using the below method. Eg: Take Right(route.step.instructions) 0.8 mi (route.step.distance)     for monitoredRegions in locationManager.monitoredRegions {       locationManager.stopMonitoring(for: monitoredRegions)     }     let steps = route.steps     self.steps = steps     for i in 0 ..< steps.count {       let step = steps[i]       print(step.instructions)       print(step.distance)       let region = CLCircularRegion(center: step.polyline.coordinate,                      radius: 20, identifier: "\(i)")       locationManager.startMonitoring(for: region)     }     stepCounter += 1     let directionText = steps[stepCounter].instructions     self.titleLabel.text = directionText     self.distanceLabel.text = "\(steps[stepCounter].distance)"   } I want to change the distance as user navigates closer to the take the right turn, and minimise the distance from 0.8 to 0.0 and update it continuously in real time. Kindly check the image and let me know a simple way to achieve it.
Posted
by
Post not yet marked as solved
1 Replies
278 Views
Hi, I'm working on an app that uses the users location to trigger an event when the user enters a location and leaves. I was looking at using core location but don't want to track the user and use all their battery power trying to see when they enter or leave a given area. What I'm looking to do is use the phones wifi list to check if a BSSID from within my list is available, then check the dBm for that access point. If it is within a range, I ping the CL service to confirm the location and trigger the action. I could then test using GPS or CL significant-change to see when the user leaves the area. Looking at the wifi-API, there is no specific api for this use case. Would using the NEhotspotHelper, wifi scanner work for this? Also, would using this data since I'm not accessing the phones BSSID comply with the new location rules? Thanks, Chris
Posted
by
Post not yet marked as solved
0 Replies
287 Views
Hi Everyone, Our app is using location based features and our content at the moment is for Singapore located users. We were not able to restrict by countries in app store as our users were using other country app store though they were located in Singapore and users are unwilling to change app store country settings as they do have credits in their respective country stores. We have changed our app to allow singapore located users to access app content and our app review is getting rejected multiple times though instruction to use Singapore VPN to review the app was provided in App review section and our current version is in review for a longer time. Last version when we introduced this restrictions was reviewed fine after we instructed to use Singapore VPN
Posted
by
Post not yet marked as solved
0 Replies
244 Views
I have an image in my SwiftUI code which doesn't stretch in the landscape orientation. The code is listed here:                 GeometryReader { geo in                     Image("RubyChard")                         .resizable()                         .aspectRatio(contentMode: .fit)                         .frame(width: geo.size.width)                 } The image in the portrait and landscape orientation. The .png file size is 730x638 pixels. I have exhausted my efforts to get the image to stretch in landscape orientation. I need help! Thanks in advance for your help Lloyd