core-location

CLLocationManager startMonitoringForRegion: not relaunching app after device restart

两盒软妹~` 提交于 2019-12-24 05:06:22
问题 Ok, so I currently have an app where I register a geofence to be monitored using the CLLocationManager startMonitoringForRegion method. This works fine when the app is in the foreground and background. I also have the appropriate plist values set: UIBackgroundModes :{location} UIRequiredDeviceCapabilities: {location-services} What doesn't work After a device restart, the app is not being relaunched. I can force this to happen if I set startMonitoringSignificantLocationChanges before entering

CLLocationManager startMonitoringForRegion: not relaunching app after device restart

本小妞迷上赌 提交于 2019-12-24 05:06:06
问题 Ok, so I currently have an app where I register a geofence to be monitored using the CLLocationManager startMonitoringForRegion method. This works fine when the app is in the foreground and background. I also have the appropriate plist values set: UIBackgroundModes :{location} UIRequiredDeviceCapabilities: {location-services} What doesn't work After a device restart, the app is not being relaunched. I can force this to happen if I set startMonitoringSignificantLocationChanges before entering

iBeacons: how to get broadcasted beacon power (txPower)

寵の児 提交于 2019-12-24 04:19:07
问题 iBeacons seem to broadcast their txPower parameter (report RSSI power at 1 meter distance) which is used in calculating beacon.accuracy and beacon.proximity properties (details on iBeacon advertisements packet can be found here). However, CLBeacon class does not seem to have a property for txPower. Is there a way I can get txPower using Core Location framework, or need I to go down to Core Bluetooth? The reason I need this, is I want to experiment with custom beacon accuracy/proximity

startMonitoringSignificantLocationChanges but after some time didUpdateLocations is not called anymore

喜你入骨 提交于 2019-12-24 03:46:13
问题 I have a very strange behaviour. I'm writing an application that uses both fetch and location background mode (don't know it it's important for the problem). I correctly set up the CLLocationManager with a delegate and I start monitoring significant location changes ( startMonitoringSignificantLocationChanges ) in the AppDelegate. Immediately I get called didUpdateLocations that gives me some locations. After that no more events are fired even I simulate a different location in Xcode (also

startMonitoringSignificantLocationChanges but after some time didUpdateLocations is not called anymore

ε祈祈猫儿з 提交于 2019-12-24 03:46:06
问题 I have a very strange behaviour. I'm writing an application that uses both fetch and location background mode (don't know it it's important for the problem). I correctly set up the CLLocationManager with a delegate and I start monitoring significant location changes ( startMonitoringSignificantLocationChanges ) in the AppDelegate. Immediately I get called didUpdateLocations that gives me some locations. After that no more events are fired even I simulate a different location in Xcode (also

How to wait for variable in Swift before executing function? (Swift)

感情迁移 提交于 2019-12-24 01:07:27
问题 below is my code. I want the value for Latitude and Longitude in my Poststring. But When he do the poststring my values are still nil because swift didn't update the location yet. So how can I wait for latitude and longitude before poststring gets the Values? I heard something of didset but I don't know how to use it and where I have to use it. import Foundation import CoreLocation protocol FeedmodelProtocol: class { func itemsDownloaded(items: NSArray) } class Feedmodel: NSObject,

iOS Core Location - Get MOST Accurate Location Coordinates

自闭症网瘾萝莉.ら 提交于 2019-12-23 23:51:35
问题 On an app I am working on I need to track the a user's journey, and then map it to the user. In this scenario I need the most accurate location data possible. I have created a CLLocationManager for this task. In order to revive the most accurate location possible I set the desired accuracy filter of the manager to kCLLocationAccuracyBest. In order to ensure I don't get extra coordinates when the user is not moving, I set the distance filter the manager to 2.5 meters . However, I was still

Does a class being its own delegate follow iOS convention?

自古美人都是妖i 提交于 2019-12-23 21:03:11
问题 Sorry this question may sound "subjective" but I think it should have a pretty definitive answer. I have a class "LocationManager" that I want to manage my Core Location logic. I have two options: LocationManager has a strong property referencing an instance of CLLocationManager. LocationManager is a delegate of CLLocationManager and receives location updates from it as such. LocationManager is a subclass of CLLocationManager, and says self.delegate = self so that it can receive its own

CoreLocation Negative Values

给你一囗甜甜゛ 提交于 2019-12-23 20:42:34
问题 I am using the CoreLocation framework to get my speed and distance to calculate average speed. On the first update that CoreLocation sends out, it shows negative values for both speed and distance traveled. How can I fix this? Speed is locationController.locationManager.location.speed where locationController holds my CoreLocation delegate. Distance is calculated by taking the old location and the new location and calculating distance. //Distance - (void)locationManager:(CLLocationManager *

CLLocationManager Coordinates

跟風遠走 提交于 2019-12-23 19:11:51
问题 I have been working to implement route trace map for walking,biking and driving. However, as you see in the following screenshot, my coordinate jumps all of a sudden from time to time even though I did not walk/bike or drive that location. The circle has been drawn on the image to point out the problem. My question is why all of a sudden coordinates jumps ? Here is my implementation snapshot: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation