是否有Android系统服务在iOS的任何等同? [英] Is there any equivalent of Services of Android in iOS?

查看:178
本文介绍了是否有Android系统服务在iOS的任何等同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要检查数据库中我的应用程序,每12小时对具有相应的日期与行日期列。这是由Android的写作服务来实现的。但有服务于iOS的任何等同,这样我的要求可以完成?

I want to check the database in my app every 12 hrs for rows with date column having corresponding date. This is accomplished by writing service in android. But is there any equivalent of services in iOS so that my requirement can be accomplished?

推荐答案

没有。有没有这样的事,在SDK或iPhone / iPad的一般。你可以只写code,这将影响到应用程序,而不是操作系统的生态系统。 当你的应用程序被关闭它是封闭的,并没有将采取行动,直到用户打开/开放与您的应用程序推送通知。

No. There is no such thing in the SDK or in iPhone/iPad in general. You can only write code that will affect the eco system of the app, not the operating system. When your app is closed it's closed and no action will be taken until the user opens it/opens a push notification related to your app.

如果您的应用程序,用户认可的基于位置的服务,有几个方法可以运行短期后台进程,即使你的应用程序是完全封闭的。其中之一是使用<一个href="http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html#//apple_ref/doc/uid/TP40009497-CH2-SW1"相对=nofollow>监视基于形状的区域这基本上意味着,如果用户离开区域X /进入区域Y 打开应用程序,然后再将其关闭之前,运行一些命令。

If the user approved location based services for your app, there are a few ways to run short background process even if your app is totally closed. One of them is by using Monitoring Shape-Based Regions which basically means if the user left region X/entered region Y open the app and run a few commands before closing it again.

聪明的方式(和我能想到的的唯一的方法)来完成你以后在iOS中是运行在服务器上的服务,并从服务器上时,应用程序提取数据被打开。

The clever way (and the only way I can think of) to accomplish what you're after in iOS is to run that service on a server and pull the data from the server when the app is opened.

这篇关于是否有Android系统服务在iOS的任何等同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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