Is there an easy way to have per-configuration app group entitlement strings in Xcode projects?
We're trying to share settings between an iOS application and today extension using an "app group" entitlement in both the targets.
The problem we're having is that we build the application with different bundle and team ids depending on whether it's an enterprise or a release build.
When I use Xcode 6's Capabilities screen, the app groups show up in red lettering and I don't see a way to change the strings for each configuration individually.
I assume one of the following will work, but I don't know which I should try first:
- .xcconfig files
- Manually created entitlement files
- Build script
- Configuration-dependent plist entries
Suggestions?


You can use a different entitlements file for each configuration. This can be specified in the Xcode "Build Settings" user interface, or done through build configuration files (.xcconfig).
Example xcconfig:
CODE_SIGN_ENTITLEMENTS = Debug.entitlementsWhere the value for
CODE_SIGN_ENTITLEMENTSpoints to the correct entitlements file for this configuration. You can create as many configurations as you want in Xcode. By default Xcode creates Debug and Release, you may add Enterprise and use a build configuration file which pointsCODE_SIGN_ENTITLEMENTSto the correct entitlements file for Enterprise builds.The Xcode "Capabilities" user interface will create and manage an entitlements file that is named after your build product. You can edit this file directly if you desire.
CODE_SIGN_ENTITLEMENTSsettings.If you see bold text there, highlight that build setting and hit delete. This will remove the Xcode build setting that is overriding your xcconfig setting.