简体   繁体   English

UIKit密钥在info.plist文件中丢失

[英]UIKit keys missing in info.plist file

I want to add UIApplicationExitsOnSuspend key in info.plist file 我想在info.plist文件中添加UIApplicationExitsOnSuspend键

but all the UI related keys are missing. 但缺少所有与UI相关的键。

What should be done to get UI related keys in info.plist file 如何在info.plist文件中获取与UI相关的键

I have default frameworks uikit, foundation and coregraphics added to my project. 我将默认框架uikit,基础和核心图形添加到我的项目中。

If you look in the project.xcodeproj file, search for Info.plist. 如果您在project.xcodeproj文件中查找,请搜索Info.plist。 The entry is probably missing this: 该条目可能缺少此内容:

plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; plistStructureDefinitionIdentifier =“ com.apple.xcode.plist.structure-definition.iphone.info-plist”;

If you have created your project for an earlier iOS version, it is still made for this and doesn't recognize the new keys. 如果您为早期的iOS版本创建了项目,则仍然为此项目创建项目,并且无法识别新密钥。 Try this: Open your Info.plist as a plain text file and insert following text to it. 尝试以下操作:将Info.plist作为纯文本文件打开,并在其后插入以下文本。

<key>UIApplicationExitsOnSuspend</key>
<true/>

Save the file and any the app closes now on suspend. 保存文件后,任何应用都将暂停挂起。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM