在iOS上的音频播放器或VOIP应用程序中显示背景UI [英] Show some UI from background in audio player or VOIP app on iOS

查看:248
本文介绍了在iOS上的音频播放器或VOIP应用程序中显示背景UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道音频播放器和Voip应用可以在iOS上运行。

I know that audio players and Voip apps can run in background on iOS.

有没有办法从后台显示用户界面(LocalNotifications除外)?我的意思是全屏UI。

Is there a way to show UI from background (except LocalNotifications)? I mean full screen UI.

使用私有API或其他技巧的方法是可以接受的。该应用程序将使用企业证书进行签名,不会被AppStore部署/审核。

A method which uses private API or other tricks are acceptable. The application will be signed with enterprise certificate and won't be deployed/reviewed by AppStore.

不能接受仅适用于越狱iOS设备的方法。

A method which works only on jailbroken iOS device isn't acceptable.

推荐答案

Victor,您是否尝试过为您的应用定义自定义URL的技巧?

Victor, have you tried some trick like defining a custom URL for your App?

Springboard可以在解析自定义URL时启动应用程序;如果它们在后台,它们就会成为前景。

Springboard can start applications when parsing custom URLs; if they are in background they become foreground.

您必须在密钥CFBundleURLTypes中的应用程序的info.plist中创建一个URL类型,例如mySpecialURLType。您的应用程序代表还必须实现 handleOpenURL: openURL:sourceApplication:annotation:

You must create a URL type into your app's info.plist in the key CFBundleURLTypes, for example "mySpecialURLType". Your application delegate also have to implement handleOpenURL: and openURL:sourceApplication:annotation:.

如果您(在你的后台任务)请求一个像mySpecialURLType://的URL,理论上SpringBoard会启动你的应用程序。

If you (in your background task) ask for a URL like "mySpecialURLType://", theoretically SpringBoard will start your application.

我不知道它是否有效,但值得试试......

I don't know if it works, but is worth a try...

最好!

这篇关于在iOS上的音频播放器或VOIP应用程序中显示背景UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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