Change default Code Signing Identity for Debug config to "Mac Developer: "

Originator:greg
Number:rdar://20513341 Date Originated:4/12/2015
Status:Resolved Resolved:4/28/2015
Product:Xcode Product Version:6.3/6D570
Classification:UI/Usability Reproducible:Always
 
From Apple:
I think you want “$(EXPANDED_CODE_SIGN_IDENTITY) not ${CODE_SIGN_IDENTITY}. “Mac Developer” is a placeholder that Xcode swaps out for a real signing identity behind the scenes, it’s not passed directly to codesign.

====
The current default setting for the Code Signing Identity of the Debug configuration in Xcode 6.3 is "Mac Developer". This has been true for a long time. Unfortunately, it's a poor choice because it's ambiguous on a system which can build for Mac App Store deployment. This is because it matches both "3rd Party Mac Developer Application: SmileOnMyMac, LLC" _and_ "Mac Developer: Greg Scown". Therefore, it's better to use "Mac Developer: ", which only matches the latter.

To reproduce:

1. Use a system which has both a developer and deployment certificate for the Mac App Store
2. Use a project which has a script build phase which calls codesign, for example:

codesign -f -s "${CODE_SIGN_IDENTITY}" "$TARGET_BUILD_DIR/TextExpander.app/Contents/Library/QuickLook/TextExpanderQuickLook.qlgenerator"

(It may be that this can be reproduced without #2, but I figured I should report my specific case.)

Expected Results:

Expected build to succeed.

Actual Results:

Build fails because the Code Signing Identity is ambiguous. Specifically: "Mac Developer: ambiguous (matches "3rd Party Mac Developer Application: SmileOnMyMac, LLC (XXXXXXXXXX)" and "Mac Developer: Greg Scown (XXXXXXXXXX)" in /Users/gscown/Library/Keychains/login.keychain)"

Configuration:
MacBook Pro (Retina, 15-inch, Late 2013)
2.6 GHz Intel Core i7
16 GB 1600 MHz DDR3
NVIDIA GeForce GT 750M 2048 MB

Xcode Version/Build & OS X Version/Build
6.3/6D570
10.10.3/14D131

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!