Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/103.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 位置更新后台模式应用被拒绝_Ios_Objective C_Cllocationmanager_Background Process_Appstore Approval - Fatal编程技术网

Ios 位置更新后台模式应用被拒绝

Ios 位置更新后台模式应用被拒绝,ios,objective-c,cllocationmanager,background-process,appstore-approval,Ios,Objective C,Cllocationmanager,Background Process,Appstore Approval,我已经使用位置更新作为后台模式完成了一个应用程序,我正在使用webservice在每个keepAlive间隔后更新我的位置。我正在使用下面提到的代码 if ([application respondsToSelector:@selector(setKeepAliveTimeout:handler:)]) { [application setKeepAliveTimeout:120 handler:^{ DDLogVerbose(@"KeepAli

我已经使用位置更新作为后台模式完成了一个应用程序,我正在使用webservice在每个keepAlive间隔后更新我的位置。我正在使用下面提到的代码

if ([application respondsToSelector:@selector(setKeepAliveTimeout:handler:)])
    {
        [application setKeepAliveTimeout:120 handler:^{

            DDLogVerbose(@"KeepAliveHandler");

            // Do other keep alive stuff here.
        }];
    }
    self.bgTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
        NSLog(@"ending background task");
        [[UIApplication sharedApplication] endBackgroundTask:self.bgTask];
        self.bgTask = UIBackgroundTaskInvalid;
    }];


    self.backgroundTimerForLocationUpdate = [NSTimer scheduledTimerWithTimeInterval:120
                                                                             target:self
                                                                           selector:@selector(changeAccuracy)
                                                                           userInfo:nil
                                                                            repeats:YES];
在location委托中,我调用一个web请求来更新服务器中的位置,以跟踪用户

苹果会拒绝使用位置更新后台模式的应用程序。

Will apple reject the app for using the location update background mode.
只有在您的
iOS应用程序

播放和录制背景音频
连续播放或录制音频(即使在后台运行)的应用程序可以注册以在后台执行这些任务。
跟踪用户位置
实现VoIP客户端(互联网语音协议)
。因此,没有任何问题,但最终结果将由
苹果审查小组宣布


祝你好运

如果在应用程序处于后台时启动或停止位置更新,苹果将拒绝该应用程序


但您可以使用方法“startMonitoringSignificantLocationChanges”在后台获取最新的位置更新。当应用程序处于后台时,它将更新当前位置值,当您进入前台模式时,您将拥有最新的位置信息来执行任何后续活动。

应该不会有问题。。。位置后台服务是可以接受的。是的,这是推荐的方式。但是,重要位置更改监控的工作方式在iOS7中发生了变化:因此,除非您的应用程序未被用户或操作系统杀死,否则您将无法跟踪用户的位置:(