ios 给出一些截图来在 Info.plist 中为 iOS4 创建 UIBackgroundModes 键
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3413258/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
give some screenshots to create UIBackgroundModes key in Info.plist for iOS4
提问by Mano
I'm new to iPhone development.I have already gone through some of the exploring pages to create UIBackgroundModes key in Info.plist for iOS4 .But it is little bit difficult to understand . Kindly provide some step by step procedure with screenshot example for easy understanding...also specify what the requirements which are needed ie iPhone, OS version 4.0...
我是 iPhone 开发的新手。我已经浏览了一些探索页面,以在 Info.plist 中为 iOS4 创建 UIBackgroundModes 键。但有点难以理解。请提供一些带有屏幕截图示例的分步过程,以便于理解...还指定所需的要求,即 iPhone、OS 版本 4.0...
回答by I?igo Beitia
The UIBackgroundModes key identifies which background tasks your application supports. Its value is an array that contains one or more strings with the following values:
UIBackgroundModes 键标识您的应用程序支持哪些后台任务。它的值是一个数组,其中包含一个或多个具有以下值的字符串:
- audio – The application plays audible content to the user while in the background.
- location – The application keeps users informed of their location, even while running in the background.
- voip – The application provides the ability for the user to make phone calls using an Internet connection.
- 音频 – 应用程序在后台向用户播放可听内容。
- 位置 - 即使在后台运行时,该应用程序也会让用户了解他们的位置。
- voip – 该应用程序使用户能够使用 Internet 连接拨打电话。
You can edit the Info.plist file on Xcode. To add a new key, click on the +sign and write:
您可以在 Xcode 上编辑 Info.plist 文件。要添加新密钥,请单击+号并写入:
iOS 4
iOS 4
"UIBackgroundModes" as the key, make sure the type is set to string and then in value write audio, locationor voipdepending on your needs:
“ UIBackgroundModes”作为键,确保类型设置为字符串,然后根据您的需要在值中写入音频、位置或语音:
iOS 6
iOS 6
"Required background modes" as the key and then set the type in drop down menu.
“必需的背景模式”作为键,然后在下拉菜单中设置类型。