Tafkadasoh
Tafkadasoh

Reputation: 4773

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

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.

Upvotes: 7

Views: 2263

Answers (1)

DrummerB
DrummerB

Reputation: 40211

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.

Upvotes: 6

Related Questions