Xcode 8: Substitution for $(AppIdentifierPrefix) in info.plist doesn't work

Originator:hiron
Number:rdar://27239007 Date Originated:08-Jul-2016 02:01 PM
Status:Duplicate/26869443/Open Resolved:
Product:Developer Tools Product Version:Xcode Version 8.0 beta 2 (8S162m)
Classification:Serious Bug Reproducible:Always
 
Summary:
This problem is about iOS app project. (I don't know about other projects.)

On Xcode 7, a variable $(AppIdentifierPrefix) in info.plist is replaced to actual app identifier prefix at build time. This substitution is broken on Xcode 8 beta.

Steps to Reproduce:
1. Write this to info.plist:
    <key>MyAppIdentifierPrefix</key>
    <string>$(AppIdentifierPrefix)</string>

2. Retrieve it in program like this:
    NSString *myAppIdentifierPrefix = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MyAppIdentifierPrefix"];

3. Run your program, myAppIdentifierPrefix becomes @"".


Expected Results:
$(AppIdentifierPrefix) is replaced to actual app identifier.

Actual Results:
$(AppIdentifierPrefix) is replaced to empty string.

Version:
Xcode Version 8.0 beta 2 (8S162m)
OS X El Capitan version 10.11.5(15F34)


Notes:
Many people think this substitution is useful for making shared keychain access group name programmatically.
See below:
http://stackoverflow.com/a/28714850/4313724

If this behavior change is intended one, please provide a way to retrieve the team identifier used on build.

Thanks,

Configuration:


Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!