What location settings does Skobbler iOS SDK use for current location? - ios

So we are using Skobbler iOS SDK and offline maps functionality for our iOS app and we were testing it while we were in Spain, and we were able to see our current location but as we moved around the current location didn't move with us.
What values does Skobbler use for the desiredAccuracy and distanceFilter and also does it use standard location updates of significant location updates? Is there a way to set these values ourselves?

If you would like to have the map follow your position you have to set:
mapView.settings.followUserPosition = YES;
For accuracy it's used kCLLocationAccuracyBest but you cannot change it at this time.
The distance filter is 1 for normal location updates and 500 for significant location updates.
You can choose to have normal location updates or significant location updates using startSignificantLocationUpdate/cancelSignificantLocationUpdate and startLocationUpdate/cancelLocationUpdate methods from SKPositionerService.

Related

how to get the location with the CLLocationManager every 10 secondes?

I want to get the different locations of the users in order to display him the trips he did. But in order to save my user's battery, I want to get his location just every 10 seconds with my CLLocation manager.
I first thought about not implementing the 10 seconds interval and get the user's location every time he move with the didUpdateLocations of the CLLocationManager, but when I simulate a drive I get new location every second and I think this is really bad for the battery, am I right ?
Do not try to second guess the location manager. Your job is to set its properties appropriately, such as distanceFilter, desiredAccuracy and activityType. Apple will use every trick in the book to keep battery usage reasonable given your settings. As the docs tell you:
Core Location manages power aggressively by turning off hardware when it is not needed. For example, setting the desired accuracy for location events to one kilometer gives the location manager the flexibility to turn off GPS hardware and rely solely on the WiFi or cell radios, which can lead to significant power savings.
If the goal is track location in the background, there are special modes for that, which save even more.
Check location every 10 second a lot frequent, it will be drain user's battery too fast.
If you would save battery, you should learn apple guide about location manager.
You need use distanceFilter and desiredAccuracy
Base guide CLLocationManager
Energy Efficiency Guide for iOS Apps
Location Awareness Programming Guide - Tips for Conserving Battery Power
Update
Also you can check how fast user moving CLLocation have speed and adjust activityType

Does desiredAccuracy affect region monitoring?

Does DesiredAccuracy property affect region monitoring ? My guess is that it just affects location updates, but I want to be sure. Apple documentation doesn't specifically say anything about that.
No, it won't affect region monitoring.
But a delay may be observed based on which source the framework fetched the location updates.
Setting a desiredAccuracy property will enable LocationFramework to provide you location updates & significant location changes based on the property. If you choose it to be a value "best", the framework will take care of sending location updates as per that value, depending on the location updates being fetched from either wifi, or cellular or GPS.
If you set it to "navigation", you will get location updates from all the possible ways the framework can detect the location changes.
Hope that helps.

How to get location from different sources in iOS?

I am new to iOS and Objective C programming. I am trying to build Core Location Framework to get location. In Android, we can get location from different providers, like GPS,network,WiFi and fused.
Now, in iOS, I can get location by specifying only accuracy,
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
But, how I make sure, that location is coming from GPS, or Network or any other provider?
Thanks
In iOS you need not worry about location provider. Based on the accuracy you are setting, iOS framework will itself take decision and will push the location. You can not specify location provider in iOS.

How to get the location provider name in iOS?

In Android whenever you get location object you could call "location.getProvider" on the instance to get value like "wifi". Is there something similar in iOS (CLLocation)?
The Location Awareness Programming Guide says:
The [CoreLocation] framework uses information obtained from the built-in cellular, Wi-Fi, or GPS hardware to triangulate a location fix for the device. It reports that location to your code and, depending on how you configure the service, also provides periodic updates as it receives new or improved data
Having said that, you do not have access to how precisely the CLLocationManager determined your location (other than, if you used significant change, that it probably used cell towers). You theoretically could use Reachability to see if you have Wi-Fi availability, but you have no assurances as to what mix of GPS, cellular, and Wi-Fi it used to get your location (even if you happen to have WiFi connection).
What you do have is horizontalAccuracy, which tells you approximately how accurate the location you received is. From a user's perspective, that's probably a more important piece of information.
There isn't a concept of what system provided you with the location on iOS. What you can do is check what the accuracy of the location is. Based on how precise the location is, you can probably surmise if the location was provided by a GPS signal.
The reason this isn't given is that iOS will provide you with an initial location which won't be very accurate (likely based on geo-ip or cell triangulation) and then update the location with more and more precise coordinates if GPS is available.
If your application requires the accuracy provided by a GPS chip, you can add UIRequiredDeviceCapabilities = gps to your Info.plist.

Getting GPS satellites and atomic clock time stamp in iOS

Is it possible to get the GPS atomic clock time stamp in iOS?
Also, is it possible to see which satellites were used in a certain sample?
As far as I know GPS receivers get this info, but I didn't find any way to get access to it.
iOS is not providing any such public APIs to access those details.
As per Apple documents:
A location manager object provides support for the following
location-related activities:
Tracking large or small changes in the user’s current location with a
configurable degree of accuracy.
Reporting heading changes from the onboard compass. (iOS only)
Monitoring distinct regions of interest and generating location events
when the user enters or leaves those regions.
Deferring the delivery of location updates while the app is in the
background. (iOS only)
Reporting the range to nearby beacons.
Nowhere it says about GPS atomic clock time stamp.
This works to get the GPS time:
#import <CoreLocation/CoreLocation.h>
CLLocation* gps = [[CLLocation alloc]
initWithLatitude:(CLLocationDegrees) 0.0
longitude:(CLLocationDegrees) 0.0];
NSDate* now = gps.timestamp;
I haven't seen anything that would lead me to believe you could get the satellite numbers through the official API. Perhaps through unpublished methods? But fwiw that would exclude your app from the App Store.

Resources