• <legend id='qqXMR'><style id='qqXMR'><dir id='qqXMR'><q id='qqXMR'></q></dir></style></legend>

      <i id='qqXMR'><tr id='qqXMR'><dt id='qqXMR'><q id='qqXMR'><span id='qqXMR'><b id='qqXMR'><form id='qqXMR'><ins id='qqXMR'></ins><ul id='qqXMR'></ul><sub id='qqXMR'></sub></form><legend id='qqXMR'></legend><bdo id='qqXMR'><pre id='qqXMR'><center id='qqXMR'></center></pre></bdo></b><th id='qqXMR'></th></span></q></dt></tr></i><div id='qqXMR'><tfoot id='qqXMR'></tfoot><dl id='qqXMR'><fieldset id='qqXMR'></fieldset></dl></div>
        <bdo id='qqXMR'></bdo><ul id='qqXMR'></ul>
      <tfoot id='qqXMR'></tfoot>
      1. <small id='qqXMR'></small><noframes id='qqXMR'>

        ios7如何在后台运行进程

        how to run process in background in ios7(ios7如何在后台运行进程)
          <bdo id='fk0l6'></bdo><ul id='fk0l6'></ul>
          • <tfoot id='fk0l6'></tfoot>

          • <legend id='fk0l6'><style id='fk0l6'><dir id='fk0l6'><q id='fk0l6'></q></dir></style></legend>

              <small id='fk0l6'></small><noframes id='fk0l6'>

                <i id='fk0l6'><tr id='fk0l6'><dt id='fk0l6'><q id='fk0l6'><span id='fk0l6'><b id='fk0l6'><form id='fk0l6'><ins id='fk0l6'></ins><ul id='fk0l6'></ul><sub id='fk0l6'></sub></form><legend id='fk0l6'></legend><bdo id='fk0l6'><pre id='fk0l6'><center id='fk0l6'></center></pre></bdo></b><th id='fk0l6'></th></span></q></dt></tr></i><div id='fk0l6'><tfoot id='fk0l6'></tfoot><dl id='fk0l6'><fieldset id='fk0l6'></fieldset></dl></div>
                  <tbody id='fk0l6'></tbody>

                  本文介绍了ios7如何在后台运行进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想在前台和后台连续运行我的进程.我已经实现了以下代码

                  I want to run my process in fore ground and background continuously.I've implemented the following code

                  self.updateTimer = [NSTimer scheduledTimerWithTimeInterval:10.0
                                                                      target:self
                                                                    selector:@selector(repeatedMethod)
                                                                    userInfo:nil
                                                                     repeats:YES];
                  
                  self.backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
                      NSLog(@"Background handler called. Not running background tasks anymore.");
                      [[UIApplication sharedApplication] endBackgroundTask:self.backgroundTask];
                      self.backgroundTask = UIBackgroundTaskInvalid;
                  }];
                  

                  在前台很好,但在后台进程只运行了 5 分钟,并且运行时间不超过 5 分钟.但我希望它即使在后台也能连续运行.请帮助.

                  In foreground it is fine but in background process is running for just 5 mins and not running more than that.But I want it to run continuously even in background also.please help.

                  推荐答案

                  发生这种情况,因为完成处理程序在 5 分钟后被调用.在使用 UIBackgroundModes 这也是依赖的如果您在应用程序中使用它,则必须提供 BackgroundMode 的功能,否则苹果将拒绝它.

                  Thats happening, because the completionHandler is called after 5 mins.You cannot run a background process for indefinite period in iOS until you use one of the UIBackgroundModes and that too is dependent upon you must provide a functionality of BackgroundMode if you use it in your application otherwise apple will reject it.

                  例如,如果您使用VoiP"BackgroundMode,您的应用程序应提供VoiP 服务",否则将被拒绝

                  For example if you use "VoiP" BackgroundMode you application should provide "VoiP services" otherwise it will be rejected

                  这篇关于ios7如何在后台运行进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  Resume game cocos2d(恢复游戏 cocos2d)
                  Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                  Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                  Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                1. <small id='lwpOf'></small><noframes id='lwpOf'>

                  <legend id='lwpOf'><style id='lwpOf'><dir id='lwpOf'><q id='lwpOf'></q></dir></style></legend>
                      <bdo id='lwpOf'></bdo><ul id='lwpOf'></ul>
                    • <i id='lwpOf'><tr id='lwpOf'><dt id='lwpOf'><q id='lwpOf'><span id='lwpOf'><b id='lwpOf'><form id='lwpOf'><ins id='lwpOf'></ins><ul id='lwpOf'></ul><sub id='lwpOf'></sub></form><legend id='lwpOf'></legend><bdo id='lwpOf'><pre id='lwpOf'><center id='lwpOf'></center></pre></bdo></b><th id='lwpOf'></th></span></q></dt></tr></i><div id='lwpOf'><tfoot id='lwpOf'></tfoot><dl id='lwpOf'><fieldset id='lwpOf'></fieldset></dl></div>
                      <tfoot id='lwpOf'></tfoot>

                              <tbody id='lwpOf'></tbody>