iOS 4是否为第三方开发人员提供“真正的多任务处理”? [英] Does iOS 4 make “Real Multitasking” available to 3rd party developers?

查看:78
本文介绍了iOS 4是否为第三方开发人员提供“真正的多任务处理”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从第一个测试版推出以来,我一直试图找出真正的多任务是否可行 - 即你是否可以在后台安装一个程序并让它无限期地挂在网络连接上?

Ever since the first beta came out I’ve been trying to find out if "real" multitasking is possible — i.e. can you put a program in the background and have it hang on to a network connection indefinitely?

我正在考虑使用IM或IRC应用程序。我自己在iOS 4上编译了一个应用程序,并且没有更改它出现以保持在后台运行的东西,但是据我所知,它只是被暂停到内存中。

I’m thinking about IM or IRC apps, for example. I’ve compiled an app myself on iOS 4, and without changing a thing it appeared to stay running in the background, but for all I know it was just suspended to memory.

文档说你能做的最好的事情是请求最多10分钟,但在开发者演示文稿中,他们在后台展示了Skype,然后通知用户呼叫正在进入。任何人都知道这一切是如何运作的?

The docs say the best you can do is request up to 10 minutes, but in the developer presentation they showed off Skype sitting in the background and then notifying the user that a call was coming in. Does anyone know for sure how this all works?

推荐答案

看来答案是肯定的。 Skype的API是一种非常特殊的情况,称为voip模式,需要特殊的行为,例如标记用于VoIP的套接字。

It appears the answer is no. The API for Skype is a very special case, called the "voip" mode, and requires special behavior, such as marking the socket in use for VoIP.

你可以收到后台报警通知(如时间过去)。操作系统严重限制了您处于后台运行状态的时间。

You can receive alarm notifications in the background (such as time passed). The amount of time you are in the background running state is severely limited by the OS.

Android的背景模型已经完成,并且在很多方面都要好得多。

Android's background model is complete and in many ways much nicer.

Apple有一个名为在您的应用程序中支持多任务处理的指南,您可以找到它。

Apple has a guide named "Supporting Multitasking In Your Applications" which you should be able to locate.

这篇关于iOS 4是否为第三方开发人员提供“真正的多任务处理”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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