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

165 Posts
Sort by:
Post not yet marked as solved
3 Replies
1.4k Views
On iOS 16.4. when I try to import a jpeg image that has Exif with latitude and longitude in the selection screen from a browser (Safari, Chrome...), the latitude and longitude information is missing. When trying to import an image into the browser from the selection screen of a browser (Safari, Chrome...), the latitude and longitude are missing (other Exif information is still present). (The other Exif information is still there.) I have confirmed that the latitude and longitude information remains in iOS 16.3, so I believe this is due to the upgrade. Does anyone have a solution for this? To add, we have confirmed that the latitude and longitude information has been missing for some time for images with a .heic extension, but there was no problem before for .jpeg images.
Posted
by
Post not yet marked as solved
2 Replies
771 Views
I'm following Apple guidelines to add the Location Push Service Extension to our app. I followed these steps: I applied and got approved for Location Push Service Extension. My app already asks the user for "Always" permissions for location updates I added the entitlement key com.apple.developer.location.push = TRUE I added to the project a new Target, and selected Location Push Service Extension from the iOS Application Extension group I encouter the following issue. When I run the app and call startMonitoringLocationPushes(completion:) I receive the following error: Error Domain=CLLocationPushServiceErrorDomain Code=1 "(null)" By looking at Apple documentation for CLLocationPushServiceErrorDomain, code 1 stands for: missingPushExtension An error code that indicates the app is missing a Location Push Service Extension. As mentioned beofore I already added the Location Service Extension Target to the project. Any idea of why I receive this error? Thanks
Posted
by
Post marked as solved
3 Replies
792 Views
I'm trying to create an application that keeps track of an anchored boat, and sounds an alarm if the boat moves outside of a certain radius (indicating the anchor is dragging instead of holding, or the boat is swinging around it to an undesirable location). However, right off the bat, I've got an issue retrieving the device's location: the latitude and longitude values stop changing when the device is sitting still on the slow moving boat. I'm setting desiredAccuracy to kCLLocationAccuracyBestForNavigation, but if I'm not holding the device in my hands, latitude and longitude updates stop coming in, and they won't come in regularly unless I pick up the device and rotate it around a little bit. It seems to me like the GPS is being put to sleep at the system level because it's detecting that the device isn't moving very fast, and accelerometer data doesn't look like an active user, but I need to override that somehow so my app can stay on top of a boat's real-time location. I've been able to reproduce this on multiple iOS devices, which is why I feel like something's going on at the system level, and isn't device-specific. Is there any way for me to work around this behavior (other than building a motorized tray to keep physically rotating the device, of course :D)?
Posted
by
Post marked as solved
1 Replies
339 Views
I'm working on an app that needs real-time location updates in the background, and while I've got it working, it seems like there's no way for users to actually kill the app. Swiping up on the multitasking screen looks like it's closing the app, but the app resumes instantly when I launch it (no splash screen or startup flow), and battery usage is still affected by the high-frequency location updates I'm requesting after I swipe up on it. Is there any way for me to allow users to actually kill the app via the multitasking screen the way they'd expect? While they could use the "Stop" button in my app to end location updates and save battery that way, I fear most users will just swipe up on it and then wonder why their battery is still draining fast.
Posted
by
Post not yet marked as solved
0 Replies
718 Views
I've been getting duplicate visits sent to my CLLocationManagerDelegate. This is new since iOS 16, I did not see this behavior in iOS 15--the observed effect is a quite severe regression in the behavior of CoreLocation. Here is what I'm seeing: The visits have already been delivered When they're sent 'again', they're sent in dozens of callbacks When they're sent 'again', they're sent in batches irrespective of app state I have had a debug app on my phone running since November to capture sysdiagnose for FB12107066. My app simply records data from CoreLocation into a mini Core Data table. Since November 11th, I have had 3808 visits, but when I do some distinct queries on arrival and departure I get a fraction of that. Select distinct arrivalDate: 929 Select distinct departureDate: 799 Select distinct arrivalDate + departureDate: 1172 I wrote some logic to attempt to deduplicate and filter out garbage visits that have already been delivered to me, but my filtering isn't bullet proof. This issue has been happening for me on multiple devices since Nov (iOS 16.2 days?). This happens on an iPhone 13 Pro and an iPad Pro 11-inch (4th gen). This is a real nasty bug as it also keeps waking my app up in the background when I don't expect it to since the OS is delivering me old / replay visits. :/ Has anyone else seen issue with the Core Location Visit API in iOS 16? What deduplication and filtering logic did you come up with? While the issue is affecting me via CoreLocation, I would suspect the same might also occur for anyone using the visits API in SensorKit too.
Posted
by
Post not yet marked as solved
0 Replies
370 Views
Hello, first of all apologies for my bad english. The webview application I made for a company does not work in Turkey and stays on the white screen. When using VPN and running the application, the application opens without any problems. Unfortunately, the application made for users in Turkey cannot be accessed from Turkey. You can login without any problems with any VPN application.
Posted
by
Post not yet marked as solved
0 Replies
410 Views
Hello team, for our app we are utilizing location services and ibeacon services along with background mode, we request users to choose Always Allow access and in our code we use startMonitoringSignificantLocationChanges and Geofencing. When it goes to background we stop fetching the location…but we see Apple Location notification popup is being shown on.. From the attached screen shot we understood that our application has requested Locations in background for these many times and its showing map locations as well. Our users are getting annoyed with these popups. I would like to understand . On what basis apple shows these notifications to user, how they fetch the information. Is that our application hits for location and apple grabs it or when we choose always access automatically system makes these calls and saves information. Can we prevent this popup from displaying to users via code / iPhone settings ? Please clarify.
Posted
by
Post not yet marked as solved
0 Replies
579 Views
Hello there! I open a URL with SFSafariViewController inside my app. The URL that opens should ask for permission for the location information as the first step. It works seamlessly through the normal safari application. But when it is opened with SafariServices in the app, I cannot get the location information. When I press the aA icon in the upper right corner of SafariServices UI and open the website settings, although the location part is selected as "Ask", it does not ask for permission for location information and does not see the location.
Posted
by
Post not yet marked as solved
5 Replies
1.5k Views
Below resources says that I cannot. I don't see satellite count related API in Core Location framework document also. 1)This is not possible using any publicly available iOS API. (2012/11/8) https://stackoverflow.com/a/13309242/809671 2)There is no public available API that allows you to get this kind of detailed information about the GPS satellites. (2010/8/24) https://stackoverflow.com/questions/3555732/is-there-a-way-to-get-detailled-gps-satellites-info-on-iphone 3)Confirmed that your app does not have access to the private API used to suss that information. (2017) https://developer.apple.com/forums/thread/73220 4)Since ios does not provide the number of satellites, and since phone gap is designed as a subset of functionality that runs on all phoneplattform, the num satellites is not available. (2015/11/4) https://stackoverflow.com/questions/33516688/phonegap-cordova-get-number-of-gps-satellites 5)The Public SDK doesn't expose that. (2009/12/17) https://stackoverflow.com/questions/1919553/is-it-possible-to-get-gps-satellite-numbers-via-iphone-sdk 6)Can iOS 8 provide info on satellites? No. (2014/8/20) https://forums.macrumors.com/threads/can-ios-8-provide-info-on-satellites.1766861/ Above posts are little old so I want to double confirm. If an Apple developer can reply this then it would be better thanks.
Posted
by
Post not yet marked as solved
1 Replies
618 Views
A new feature in Settings > privacy & Security> Location Services that allows users to disable location access for all installed 3rd party applications. I think this is a great idea. It would save battery life and improve privacy for users. It would also be helpful for tracking kids and teenagers, as well as for people with Alzheimer's or dementia and syndrome down people. Apple and Google should store children and teenagers' school locations on their Apple or Google accounts. I think this is a good idea, but I don't think it should be mandatory. Parents should have the option of whether or not to share their child's school location. this helps to protect our teenagers to be safe. Apple should distinguish between known locations, such as home, work, and school. This would be a helpful feature for apps that need to know where the user is located. For example, a delivery app or Amazon iOS App could use this information to let the user know when their package is expected to arrive. Apple should create a Location Known Kit for Location access. This would allow apps to share location information with each other. and there is no need to check over and over by different 3rd party who installed multiple and different applications to check the Locations over and over and it's a disaster that if users are at home or at workplace or at school most majority of the time. please note above new enhancement might help a lot of Apple home and Google Home's routine and automation feature to make them possible This would save battery life and improve performance. I think these are all great ideas. I hope that Apple will consider implementing them in future versions of iOS and iPadOs and Watch OS. Thanks in advance. Best Pooya Mohammadhossein Pooya M
Posted
by
Post not yet marked as solved
1 Replies
757 Views
Hello, I have a few questions regarding the new CLMonitor that would be really helpful to hear answers to: How many conditions can the CLMonitor monitor at once? The analogous CLRegions had a limit of 20 in iOS 16. Is there a limit, or a larger limit with CLMonitor? What's the range of radii that CircularGeographicCondition can monitor? With CLRegions, we observed a functional minimum radius of 100m. Finally, the session video notes that CLMonitor events can arrive unpredictably: can any further elaboration be given on these events? When might there be more or less predictability of these events? Thanks! Liam
Posted
by
Post not yet marked as solved
1 Replies
555 Views
First of all : Thanks for the great presentation (wwdc2023-10180), Siraj ! This new, simple API looks like what we've been looking for for easy manageable background location updates with 'automatic battery drain minimization' :-) There were two questions that came to my mind. As far as I understood, the CLLocationUpdate.LiveConfiguration is used to help the location services to improve the location fixes. Are there other options planned to specify the granularity of delivered locations e.g., how accurate the locations need to be (as the desiredAccuracy and distanceFilter settings for the olden CLLocationManager)? Does the Implementation switch between significant location changes and regular, more expensive ways (like GPS hardware) or just deliver the most feasible accuracy available at the time of notification? I'm just curious - if I get the most feasible granularity, everything is fine for me anyway :-) Thanks again, Michael
Posted
by
Post not yet marked as solved
3 Replies
585 Views
When running Xcode 15.0 beta, and targeting watchOS 10.0, I'm getting the following error message when I invoke the object. I am using the line import CoreLocation at the top of my ContentView.swift directly below the line import SwiftUI. 'CLMonitor' is unavailable in watchOS
Posted
by
Post not yet marked as solved
2 Replies
642 Views
We are no longer getting a different value for trueHeading vs magneticHeading with the new ipad pro 6th generation M2 device. The M1 iPad Pro works and other iPad and iPhone devices work fine. Apple told one of our users that we need to update our app - but we did only 4 weeks ago. Has something changed to the use of the CLHeading api for the M2 chip?
Posted
by
Post not yet marked as solved
0 Replies
559 Views
I saw in https://developer.apple.com/videos/play/wwdc2023/10180/ at 12:51 that the CLBackgroundActivitySession will relaunch the app to resume location updates even if user closed the app (which I interpret to mean swiping the app from app switcher) -- despite the fact that the CLBackgroundActivitySession only require a when-in-use location permission. Since this api can give the app location updates even after the user swiped the app from the switcher, how is the api different than using the current always allow authorisation system to continuously record user movements? For the use case of continously tracking them whenever they move (let's say you wanted to record their driving behaviours), can't the app just launch the CLBackgroundActivitySession and continue to recreate this session every time the app is relaunched to keep on tracking?
Posted
by
Post not yet marked as solved
9 Replies
4k Views
hi, everyone! i travelled to a different time zone and the time has not updated to my new location. i seem to remember this worked ok before sonoma. system settings - privacy & security - location services - system services - details - setting time zone ON (if this is changed to off it does not stay off, if i leave that window pressing done, when i open that setting again it is still set to on, so changing it has no effect) system settings - general - date & time all set to ON (if Set time zone automatically using your current location is set to off the the Time zone stays greyed out and cannot be changed and only the Closest city can be changed, which is of no use as cities to select from are still not in the time zone i want to change to). this is probably a bug in the new macos sonoma and just wanted to make this known and hopefully have a solution to it. thank you!
Posted
by