Required Background modes key is not there in info-plist file(info-plist 文件中没有所需的背景模式键)
问题描述
我想设置所需的后台模式键值,以便我的应用程序也可以在后台运行.实际上,我想在应用程序处于后台时获取用户位置更新,但是在我的 info-plist 文件中没有称为必需后台模式键的键.如何设置此密钥并如何将其带入我的文件中?
I want to set required background mode key value so that my app also works in background. Actually i want to get the user location updates when the app is in background, but there is no key called required background mode key in my info-plist file. How to set this key and jow to bring this in my file?
推荐答案
在 Xcode 5 中,项目设置 -> 目标 -> 功能 -> 背景模式 -> 检查位置更新.
In Xcode 5, Project setting -> Target -> Capabilities -> Background modes -> check Location updates.
如果您使用的是早期版本的 Xcode,请设置 Location 的背景模式,如下图所示.
If you are using an earlier version of Xcode, set the background mode for Location as in the following screenshot.
这篇关于info-plist 文件中没有所需的背景模式键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:info-plist 文件中没有所需的背景模式键
基础教程推荐
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01