Commit 7c3ed4c7 authored by Samuel E. Giddins's avatar Samuel E. Giddins Committed by Samuel Giddins

[Validator] Try to import unbrella header if it exists

parent 0e2b2dd2
......@@ -390,7 +390,16 @@ module Pod
else
source_file = validation_dir.+('App/main.m')
source_file.parent.mkpath
import_statement = use_frameworks ? "@import #{pod_target.product_module_name};\n" : ''
import_statement = if use_frameworks
"@import #{pod_target.product_module_name};\n"
else
header_name = "#{pod_target.product_module_name}/#{pod_target.product_module_name}.h"
if pod_target.sandbox.public_headers.root.+(header_name).file?
"#import <#{header_name}>\n"
else
''
end
end
source_file.open('w') { |f| f << "@import Foundation;\n#{import_statement}int main() {}\n" }
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment