Automatic codesigning doesn't permit having different capabilities across different build configurations

Originator:corrmage
Number:rdar://33212598 Date Originated:10.07.2017
Status:Closed Resolved:25.07.2017
Product:Developer Tools Product Version:9.0 beta 2 (9M137d)
Classification:Bug Reproducible:Always
 
Summary:
My project has four build configurations, namely AdHoc-Debug, AdHoc-Release, AppStore-Debug & AppStore-Release. The project contains of an app and its Today extension. To facilitate file sharing between app and extension I’m using App Groups capability, whose value is being set using a variable from xcconfig file. There are multiple xcconfig files, one per build configuration and per target (meaning 8 files, 4 configurations x 2 targets).

AdHoc & AppStore configurations have different App Group value to prevent ad-hoc builds from messing with App Store builds’ data.

The whole combo works perfectly fine with Xcode 8 & automatic signing, but I’m getting the following build error on Xcode 9 beta 2:

“TodayExtension” has conflicting settings for automatic signing. Capabilities differ across build configurations. Make these settings the same for each build configuration to continue using automatic signing, or switch to manual signing.

Steps to Reproduce:
1. Create a project from Single View App template
2. Add Today extension target & connect it with App target
3. Add App Group capability to both App target & Today extension target
4. Make actual App Group value different in Debug & Release configurations (by using two distinct xcconfig files & a variable in entitlements files, for example)
5. Make sure automatic signing is enabled
6. Make App scheme active and try to build

Expected Results:
Both Today extension & App targets successfully build.

Observed Results:
Today extension fails to build due to an error:

“TodayExtension” has conflicting settings for automatic signing. Capabilities differ across build configurations. Make these settings the same for each build configuration to continue using automatic signing, or switch to manual signing.

Version:
9.0 beta 2 (9M137d) & macOS 10.12.5 (16F73)

Notes:
I hope it’s just a regression and is going to be fixed before Xcode 9 GM.

Comments

Fixed in beta 4

Sample project

https://github.com/nikolaykasyanov/Xcode9CodeSigningRegression


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!