this answerからの指示私はxcconfig
を更新することができたと私はポッドの生成に私xcconfig
ファイルを含めるには、このコードを使用し、次のとおりです。
post_install do |installer|
installer.pods_project.targets.each do |target|
next unless target.name.include?("Pods-CNISDK")
puts "Updating #{target.name}"
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
# read from xcconfig to build_settings dictionary
build_settings = Hash[*File.read(xcconfig_path).lines.map{|x| x.split(/\s*=\s*/, 2)}.flatten]
# write build_settings dictionary to xcconfig
File.open(xcconfig_path, "w") do |file|
file.puts "#include \"../configurations/Warnings.xcconfig\"\n"
build_settings.each do |key,value|
file.puts "#{key} = #{value}"
end
end
end
end
end