Skip to content

Instantly share code, notes, and snippets.

@chipp
Created August 21, 2020 19:13
Show Gist options
  • Save chipp/c54ca014ba681f3a2ae20d22cfd0b508 to your computer and use it in GitHub Desktop.
Save chipp/c54ca014ba681f3a2ae20d22cfd0b508 to your computer and use it in GitHub Desktop.
begin
require 'xcodeproj'
rescue LoadError
$stderr.puts 'Cannot find xcodeproj. Please install it `gem install xcodeproj`'
exit 3
end
project_path = ARGV[1]
project = Xcodeproj::Project.open project_path
quick_objc_runtime = project.targets.find { |t| t.name == 'QuickObjCRuntime' }
if quick_objc_runtime.nil?
puts "Can't find target QuickObjCRuntime"
exit 0
end
quick_objc_runtime.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'YES'
end
project.save project_path
puts 'Set CLANG_ENABLE_MODULES=YES for QuickObjCRuntime'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment