相关疑难解决方法(0)

IOS在应用程序终止时获取位置更新,而不使用significantChange

我为这个主题的冗余道歉,但是尽管给出了所有给出的答案,我还是无法确定在终止应用程序时获得accuracyBest位置更新的可能性.我不想使用monitoringSignificantChange,我希望尽可能准确; 我不会在AppStore上提交应用程序,因此Apple的限制也不是问题.

我经历过这些:

- 即使应用程序被终止或终止,位置也会更新

- 即使应用程序终止,iOS更新位置

- 终止应用时使用位置更新

- http://mobileoop.com/getting-location-updates-for-ios-7-and-8-when-the-app-is-killedterminatedsuspended

还有更多,但目前尚不清楚,有可能与否.我目前有我的项目,一切都与significantChange很好,但我现在需要更高的准确性.

有人可以直接告诉我,如果获得应用程序被杀的最佳准确位置更新吗?

非常感谢你,

background terminate cllocation ios

10
推荐指数
1
解决办法
6440
查看次数

获取iOS应用在后台甚至被杀的位置

我的应用程序需要在应用程序处于活动状态以及何时处于非活动状态并被杀死时获取用户的位置.当用户的位置靠近商店时,应用程序必须发送本地通知.

我不确定到底发生了什么,但是我无法让我的应用程序在后台获取位置并在被杀时将其唤醒.

我有一个位置管理器(单例,用于"使用"和"始终"时的两种情况),我在.plist中定义了NSLocationAlwaysUsageDescription和NSLocationWhenInUseUsageDescription

我在做的是:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    //The app has been killed/terminated (not in background) by iOS or the user.
    if ([launchOptions objectForKey:UIApplicationLaunchOptionsLocationKey]){

        _locationManager = [CoreLocationManager sharedInstance];
        _locationManager.isAppActive = NO;
        _locationManager.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
        _locationManager.locationManager.activityType = CLActivityTypeOtherNavigation;

        if ([_locationManager.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
            [_locationManager.locationManager requestAlwaysAuthorization];
        }

        [_locationManager addLocationManagerDelegate:self];
    }
}


- (void)applicationDidBecomeActive:(UIApplication *)application
{
    if (_locationManager.locationManager){
        _locationManager.isAppActive = YES;
        [_locationManager.locationManager stopMonitoringSignificantLocationChanges];
    }

    _locationManager = [CoreLocationManager sharedInstance];

    if ([_locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
        [_locationManager.locationManager requestAlwaysAuthorization];
    }

    if ([_locationManager.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) {
        [_locationManager.locationManager requestWhenInUseAuthorization];
    } …
Run Code Online (Sandbox Code Playgroud)

objective-c core-location ios appdelegate

7
推荐指数
1
解决办法
3053
查看次数

捕获所有州应用程序中的位置

我想知道如何在应用程序未运行时捕获位置并保存数据库.已经有几个教程,但没有一个工作.请在评分为重复之前,我请你阅读完整的问题,因为它不可能.

我尝试了以下教程:

假设我没有捕获位置的实现.我需要每天中午,捕获用户的位置并保存数据库,然后发送到Web服务.无论应用程序在后台运行还是未运行(中间按钮上的两个环并拖动),都必须进行此捕获位置.

我尝试了在互联网上找到的一些教程,甚至社区建议的一些教程,但仍然没有工作.

  • 我添加了背景模式 - 位置.
  • 我允许获得位置requestAlwaysAuthorization.

语言可以是客观c或快速,最重要的是,我学习如何在所有州的应用程序中捕获此位置.

iphone objective-c ios swift

4
推荐指数
1
解决办法
1422
查看次数