我可以在Info.plist中使用另一个Info.plist键值中的一个键的值吗?

时间:2012-09-25 14:05:21

标签: ios xcode xcode4

我想在另一个Info.plist键(NSContactsUsageDescription)的值中使用'Bundle display name'(CFBundleDisplayName)的值。

我尝试了以下操作,但这不起作用:

${CFBundleDisplayName} must access your Address Book to input the scanned contact
information. ${CFBundleDisplayName} will never access your Address Book for marketing
or advertising purposes.

有人知道怎么做吗?

附录:解决方案在本地化价值时也应该有效。

1 个答案:

答案 0 :(得分:5)

使用${VARIABLE},您只能引用构建设置,但不能引用Info.plist中的其他值。尝试添加新的用户定义的构建设置并使用它。转到构建设置标签,然后点击右下角的添加构建设置