Is it possible to use the value for one key in Info.plist inside the value of another key Info.plist?

I would like to use the value for the "Display Name Bundle" (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 anyone know how to do this?

Application: the solution should also work when localizing the value.

+4
source share
1 answer

Using ${VARIABLE} , you can only reference assembly settings, and not other values ​​in your Info.plist. Try adding a new custom build setting and use it. Go to the Build Settings tab and click Add Build Settings in the lower right corner.

+4
source

Source: https://habr.com/ru/post/1436167/


All Articles