Created
September 30, 2014 15:39
-
-
Save neonichu/80b523eb5d45aad8f52d to your computer and use it in GitHub Desktop.
Fix build settings of Pods.xcodeproj in case of use of legacy build output directory.
This file contains 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 characters
#!/usr/bin/env ruby | |
def build_option(option_name) | |
output = `xcodebuild -showBuildSettings 2>/dev/null`.split("\n") | |
output = output.select { |line| line[/#{option_name}/] } | |
output.map { |line| line.split(' ')[2..-1].join(' ') } | |
end | |
require 'xcodeproj' | |
main_proj_root = build_option :SYMROOT | |
proj = Xcodeproj::Project.open('Pods/Pods.xcodeproj') | |
proj.targets.each do |target| | |
target.build_configurations.each do |config| | |
config.build_settings['SYMROOT'] = main_proj_root | |
end | |
end | |
proj.save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment