iOS 10和权限本地化说明

时间:2016-08-15 12:14:48

标签: ios permissions xcode8 ios-permissions

为iOS 10准备app时面临有趣的事情。从Xcode 8开始,您必须提供有关您在应用中提出的任何权限的说明(https://forums.developer.apple.com/thread/49951

一切似乎都很好,但是如果我想将这些描述本地化呢?

如果我将它放在InfoPlist.strings内 - 应用会继续崩溃。但是如果我将它放在InfoPlist.stringsInfo.plist中 - 应用总是会从Info.plist进行描述,那么就不会有任何本地化。

也许有人有解决方案。谢谢:))

3 个答案:

答案 0 :(得分:32)

我遇到了同样的问题,我能够解决它,因为我注意到InfoPlist.strings不是任何目标的成员。

因此,在文件上设置Target Membership(将其置于Copy Bundle Resources构建阶段)会修复它。

对于在网上搜索的人:https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html

向下滚动到“本地化属性列表值”

答案 1 :(得分:2)

我遇到了类似的问题,这是因为使用了错误的文件名:

InfoPList.strings

而不是

InfoPlist.strings

希望这些信息可能对某人有用。

答案 2 :(得分:1)

enter image description here

enter image description here

实施权限本地化的步骤。

第1步-单击Info.plist

第2步-单击“本地化”按钮[Xcode居中]

第3步-勾选语言