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

Taf*_*soh 5 xcode ios 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.
Run Code Online (Sandbox Code Playgroud)

有谁知道怎么做?

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

Dru*_*erB 5

使用${VARIABLE}您只能引用构建设置,但不能引用Info.plist中的其他值.尝试添加新的用户定义的构建设置并使用它.转到Build Settings选项卡,然后单击右下角的Add Build Setting.