Created
October 3, 2014 16:08
-
-
Save amleszk/3ad63f5fd8b164fb1149 to your computer and use it in GitHub Desktop.
Revisions
-
amleszk renamed this gist
Oct 3, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
amleszk created this gist
Oct 3, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ post_install do |installer| project = Xcodeproj::Project.open('MeetupApp.xcodeproj') config_mapping = { :Debug => 'Configuration/Debug.xcconfig' } set_xcconfig_reference(project,'MeetupApp','Debug','Configuration/Debug.xcconfig') end def set_xcconfig_reference(project, target_name, config_name, xcconfig_name) puts project.targets target = project.targets.find { |target| target.name == target_name } !target and abort("Post install - target: #{target_name} not found") puts target.build_configurations target_config = target.build_configurations.find { |config| config.name == config_name } !target_config and abort("Post install - target: #{target_name} config: #{config_name} not found") !File.exist?(xcconfig_name) and abort("Post install - File does not exist #{xcconfig_name}") config..base_configuration_reference = xcconfig_name puts "Overriding configuration setting: #{target_name}.#{config_name} = #{xcconfig_name}" end