cllocationmanager

objective-c source locationManager out in own class

怎甘沉沦 提交于 2019-12-24 10:45:06
问题 I want to source the locationManager out in an own class that I can call from different other classes. What I did. Created an iPhone Application, and added the locationManger code in the ViewController. Worked. Now I created a class Lokation where I shifted all locationManager Code to this new class and called that code from the ViewController. Result: The function getLocation is called but locationmanager:manager didUpdateToLocation:newLocation fromLocation:oldLocation is not called. Output

Stopping CoreLocation background updates

无人久伴 提交于 2019-12-24 09:39:16
问题 My app registers for background location updates (not Significant Change. I need more granularity than kilometers) That part works fine. I just want to stop the updates after the app has been in the background for 60 minutes. The way I'm doing it right now is to call stopUpdatingLocation in my CLLocationManager delegate. However, I am unsure if this will actually stop my app from receiving background location updates, or if it will , but will just ignore them. Ideally, I'd like to not have my

Beacon / IOS CLLocationManager get current region

喜你入骨 提交于 2019-12-24 08:42:33
问题 I'm doing a program who is looking for beacon, I implemented CLLocationManager and my apps works except one point. I'm calling startMonitoringForRegion() in order to get the didEnterRegion/didExitRegion callback. Inside these function I'm doing startRangingBeaconsInRegion()/stopRangingBeaconsInRegion() in order to get precise information when the user is in the beacon area. My issue is quite simple, if the app is started when the user is already in the beacon range, didEnterRegion is not

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

send location using JSQLocationMediaItem

不打扰是莪最后的温柔 提交于 2019-12-24 00:13:15
问题 I am using JSQMessagesViewController to implement chat in my app. I want to be able to send the user that I am chatting with my location. This is what I did. func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { self.latestLocation = locations[locations.count-1] } let sendLocation = UIAlertAction(title: "Send Location", style: .default, handler: { (action) -> Void in let loc: JSQLocationMediaItem = JSQLocationMediaItem(location: self.latestLocation)

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

didRangeBeacon called without any beacons found

荒凉一梦 提交于 2019-12-23 09:10:33
问题 I registered my own location manager to monitor and range a few beacons: [self.locationManager startMonitoringForRegion:region]; [self.locationManager startRangingBeaconsInRegion:region]; My understanding is, when one or more beacons is found this delegate method is called: - (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region This delegate method is indeed called when I turned on my beacon, but the beacons array is empty. Is

is iphone Simulator capable of showing heading and latitude , longitude?

浪尽此生 提交于 2019-12-23 08:52:41
问题 I am using iphone simulator 4.2 and try to display or NSLog Heading and other Location services attributes e.g. Latitude, Longitude, altitude, horizontalAccuracy, VerticalAccuracy, speed. but its not showing the correct parameters and Incase of Heading its actually not firing the event. as its execute CLLocation code - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { [self.delegate locationUpdate