今天,推广和背景音乐 [英] Today Extension and background audio

查看:151
本文介绍了今天,推广和背景音乐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做的适用于iOS 8.一个简单的播客类部件的东西做工精细,音频工程...除了当屏幕上睡觉,声音将停止。

I am trying to do a simple podcast-like widget for iOS 8. Things works fine, audio works... except that when the screen sleep, the audio stops.

今天分机可以做背景音乐?或一般的多任务?

Can Today Extension do background audio? Or multitasking in general?

推荐答案

没有。当它超出视图(如由viewDidDisappear)。当小部件是在物理视图,这样声音只能启用。今天的Widget被破坏

No. Today Widget is destroyed when it goes out of view (as evidenced by viewDidDisappear).. so sound can only be enabled when the widget is physically in view.

编辑:
都能跟得上它与运行它的主机应用程序。由于苹果文档中详细介绍,扩展是通过一个包含应用程序提供一个专门的二进制文件。含应用仅用于递送和延长独立的运行。尽管如此,一个含有iOS应用需要,除了延伸到有效地提供某些功能。在OS X这样的要求是放松和含应用程序并不需要提供任何额外的功能。

Nope it is linked to the host app that runs it. As detailed in Apple documentation, an extension is a specialized binary that is delivered through a containing app. The containing app is only used for delivery and the extension runs independently of it. This notwithstanding, an iOS containing app is required to effectively provide some functionality in addition to the extension. On OS X such requirement is relaxed and a containing app is not required to provide any additional functionality.

正如前面提到的,扩展的生命周期是完全无关的包含它的应用程序的,它包括4个步骤:

As mentioned, an extension life cycle is completely unrelated to its containing app's and it comprises 4 steps:

用户选择一个应用程序扩展。
系统启动它。
应用程序的扩展运行。
系统杀死应用信息。

User chooses an app extension. System launches it. App extension runs. System kills app extension.

http://www.infoq.com/news/ 2014年/ 07 /苹果iOS8上应用的扩展

这篇关于今天,推广和背景音乐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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