Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use the value for one key in Info.plist inside the value of another Info.plist key?

Tags:

xcode

ios

xcode4

I'd like to use the value for 'Bundle display name' (CFBundleDisplayName) inside the value of another Info.plist key (NSContactsUsageDescription).

I tried the following, but this does not work:

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

Does anybody know how to do that?

Addendum: The solution should also work when localizing the value.

like image 611
Tafkadasoh Avatar asked Sep 25 '12 14:09

Tafkadasoh


1 Answers

Using the ${VARIABLE} you can only reference build settings, but not other values in your Info.plist. Try adding a new user-defined build setting and use that. Go to the Build Settings tab and click Add Build Setting in the bottom right corner.

like image 184
DrummerB Avatar answered Nov 07 '22 04:11

DrummerB