core-location

iOS: Can I manually associate wifi network with geographic location?

独自空忆成欢 提交于 2019-12-05 02:20:39
问题 Is it possible to make the phone to "know" that a specific wifi network is at specific geographic location? if (answer == YES) { than how? } else { can the phone figure this out by himself? } Another similar question: is there any way to start monitor a region with accuracy of ~100m but telling the CLLocationManager to use only by wifi networks and cellular antenas? Because I don't want to power up the GPS no matter what... Thanks! 回答1: iPhone positioning sucks and there is nothing you can do

iOS Crash Core Location CFBasicHashCreateCopy?

和自甴很熟 提交于 2019-12-05 01:42:22
I've got this issue being reported via Crashlytics, although I've been unable to replicate it locally, so I've got nothing to go on other than the stack trace below.. Not sure if the references to CoreLocation in the stack trace have anything to do with it, but I'm not sure what could possibly be the cause. My project is using ARC. Any clue? Thread : Crashed: com.apple.CoreLocation.ConnectionClient.0x14eb3510.events 0 CoreFoundation 0x307769a8 CFBasicHashCreateCopy + 712 1 libobjc.A.dylib 0x3afd1a19 object_setClass + 24 2 CoreFoundation 0x30782d0f CFDictionaryCreateMutableCopy + 154 3

missing required architecture i386 in file

守給你的承諾、 提交于 2019-12-05 00:20:52
I am having trouble building my app after adding MapKit and CoreLocation frameworks. They are both 4.3 frameworks, and the app used to work fine with UIKit, CoreGraphics, and Foundation, just giving me problems with these two. Not sure what the required architecture is, there aren't any bugs in the code. Any help is appreciated! ld: warning: ignoring file /Users/F3d3r3r/Desktop/testNav4_3/MapKit.framework/MapKit, missing required architecture i386 in file ld: warning: ignoring file /Users/F3d3r3r/Desktop/testNav4_3/CoreLocation.framework/CoreLocation, missing required architecture i386 in file

SwiftUI with Core Location as ObservableObject crashes

爱⌒轻易说出口 提交于 2019-12-04 19:17:01
I am trying to use Core Location to get the CLRegionState to update elements in a SwiftUI app. I am using XCode 11 beta 6 and have iOS 13 beta 7 on my device. There are two problems that I can see: The app crashes and the error Thread 1: EXC_BAD_ACCESS appears on line 147 (...ScrollView {... ) The CLRegionState is never called or does not update. I am basing this off of Paul Hudson's tutorial on SwiftUI Beacon Detector (which I have not been able to make work either), and modifying it to use CLRegionState instead of beacon proximity . Here is the code: import SwiftUI import CoreLocation import

App won't relaunch when monitoring CLLocationManager significant location changes - iPhone

此生再无相见时 提交于 2019-12-04 18:36:34
I am working on an app that keeps track of user's location at a time-interval set by the user himself(e.g. every 5 minutes) and sends it to a server page by ASIHTTPRequest . This app should be able to receive updates on foreground, either on background or even when the app is not running(location services). Although my app successfully receives updates on the foreground and background, it does not seem to wake up when it is not running and do not send me up any requests to the server. I am using CLLocationManager and its delegate to perform startMonitoringSignificantLocationChanges for when it

iOS App Background Location (Push Notifications)

心已入冬 提交于 2019-12-04 18:19:28
I face an issue where my app requires the users location when they receive a push notification while the app is running in the background. After doing a bit of reading I'm under the impression that this isn't possible, i.e: 1) App in background 2) Push notification received 3) Get users location and execute block of code. I found this post on here that suggests you can run a task every N amount of minutes to get the users location. So using this I could check say every ten minutes which would work but it would be a waste of the users battery if I kept activating the GPS. Therefore I was

-[CLLocationManager requestWhenInUseAuthorization] or -[CLLocationManager requestAlwaysAuthorization] error

拟墨画扇 提交于 2019-12-04 17:15:07
问题 This is my code, showing both the alert and the blue dot for the current position on the map: MapName.h #import <UIKit/UIKit.h> #import <MapKit/MapKit.h> #import <CoreLocation/CoreLocation.h> @interface MapName : UIViewController <MKMapViewDelegate, CLLocationManagerDelegate> @property (strong, nonatomic) IBOutlet MKMapView *MapName; @property (strong, nonatomic) CLLocationManager *locationManager; @end MapName.m - (void)viewDidLoad { [super viewDidLoad]; self.locationManager = [

Use of Standard location service for tracking traveled distance in a foreground/background app

孤者浪人 提交于 2019-12-04 16:51:43
I have to develop a kind of GPS navigation application that needs to constantly keep track of the position of the user, which is moving by car. In the specific, I don't have to display the current location on a map but just to record its position with the best possible precision in order to calculate the total distance traveled. Of course the application needs to continue its work in background if the user switch to another app, a phone call come in or something like that… From the tests I have made and from what I have learned from this useful post (and from the documentation ), it seems to

What's the maximum number of regions that can be monitored on iPhone?

ぐ巨炮叔叔 提交于 2019-12-04 16:31:33
Any one know what's the maximum number of shared regions is? Do you get regionMonitoringDidFail call if you exceed it? http://developer.apple.com/iphone/library/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/occ/instp/CLLocationManager/monitoredRegions I can't get it to accept more than 10 regions. No error message just monitoredRegions does not get any members after 10. edit: if I add a lot (around 60) of regions sometimes it crashes. No error message. This produces a bad access [locationManager startMonitoringForRegion:clr

Background location tracking not working on physical device swift

落花浮王杯 提交于 2019-12-04 16:04:57
I followed this tutorial ( https://www.raywenderlich.com/92428/background-modes-ios-swift-tutorial ) to create an app that maps the user's location in the background. It asks to follow the user's location even when the app is closed, the user presses yes, and it tracks location in the background, updating every second or so. It works perfectly in the simulator, but sideloaded onto a physical iPhone 6, it stops checking the user's location in the background. I solved this. If your background location tracking is working in the simulator but not on a physical phone running iOS 9 or later, it is