From 1145f2e96f8425b56ff11e2676b53b3de2b26c15 Mon Sep 17 00:00:00 2001 From: DanEdgarDJ Date: Mon, 13 Mar 2017 11:56:03 -0500 Subject: [PATCH] inherited hacks Included $(inherited) hacks to get the xcconfig to actually override values from the copied base configuration --- setup_schemes.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/setup_schemes.rb b/setup_schemes.rb index e9cde45..11624e9 100644 --- a/setup_schemes.rb +++ b/setup_schemes.rb @@ -26,6 +26,16 @@ # Use the new .xcconfig generated_configuration.base_configuration_reference = xcconfig_file + + # Mark any properties we want the xcconfig to override as $(inherited) in the new config. + # HACK! -- This is done by hand, there may be a way better way via a list of variable names + # from the .xcconfig, but haven't looked into it yet. + generated_configuration.build_settings["CODE_SIGN_ENTITLEMENTS"] = "$(inherited)" + generated_configuration.build_settings["GCC_PREPROCESSOR_DEFINITIONS"] = "$(inherited)" + generated_configuration.build_settings["PROVISIONING_PROFILE"] = "$(inherited)" + generated_configuration.build_settings["PRODUCT_BUNDLE_IDENTIFIER"] = "$(inherited)" + generated_configuration.build_settings["DEVELOPMENT_TEAM"] = "$(inherited)" + generated_configuration.build_settings["CODE_SIGN_IDENTITY"] = "$(inherited)" # Copy over the build settings from the original build configuration generated_configuration.build_settings = build_configuration.build_settings @@ -48,6 +58,16 @@ # Copy over the target-level build settings generated_target_configuration.build_settings = build_configuration.build_settings + + # Mark any properties we want the xcconfig to override as $(inherited) in the new config. + # HACK! -- This is done by hand, there may be a way better way via a list of variable names + # from the .xcconfig, but haven't looked into it yet. + generated_target_configuration.build_settings["CODE_SIGN_ENTITLEMENTS"] = "$(inherited)" + generated_target_configuration.build_settings["GCC_PREPROCESSOR_DEFINITIONS"] = "$(inherited)" + generated_target_configuration.build_settings["PROVISIONING_PROFILE"] = "$(inherited)" + generated_target_configuration.build_settings["PRODUCT_BUNDLE_IDENTIFIER"] = "$(inherited)" + generated_target_configuration.build_settings["DEVELOPMENT_TEAM"] = "$(inherited)" + generated_target_configuration.build_settings["CODE_SIGN_IDENTITY"] = "$(inherited)" # Now add the new build configuration target.build_configuration_list.build_configurations << generated_target_configuration