iOS7中的后台同步 [英] Background sync in iOS7

查看:82
本文介绍了iOS7中的后台同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们必须开发一个应用程序,它将支持某个时间间隔的数据同步操作,无论应用程序是在前台还是在后台。

We have to develop an app which will support data sync operations at some time interval, whether the app is in foreground or in background.

我想知道在iOS7中...

I want to know that in iOS7…


  • 是否可以在应用程序处于后台时同步数据(即调用Web服务)?

  • 我们可以访问SQLite数据库文件/我们可以在应用程序处于后台时进行数据库操作吗?

  • 我们可以在后台运行计时器吗?

  • 我们可以在应用程序处于后台时显示有关某些更新的提醒吗?

  • is it possible to sync data (i.e. call web services) while the app is in background?
  • can we access SQLite data base file/can we do DB operations while the app is in background?
  • can we run timers in background?
  • can we show alerts about some updates while the app is in background?

提前致谢。

推荐答案


  1. 是的,确实如此。

  2. 是的,你可以。

  3. 有时,但你不应该。

  4. 是的,你可以。

  1. Yes, it is.
  2. Yes, you can.
  3. Sometimes, but you shouldn't.
  4. Yes, you can.

去研究iOS 7后台操作。谈论在某个时间间隔使用计时器和后台操作 表示您正在以无法正常工作的方式解决问题。虽然大多数问题的答案都是肯定的,但您的方法可能不是......

Go and research iOS 7 background operations. Talk of using timers and background operations at some time interval indicate you're approaching the problem in a way that won't work. While the answer to most of your questions is yes, your approach is probably no...

application:performFetchWithCompletionHandler:

这篇关于iOS7中的后台同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆