Commit 6665153f authored by Marius Rackwitz's avatar Marius Rackwitz

Add Pod::Generator::UmbrellaHeader

parent f8ee5112
...@@ -60,6 +60,7 @@ module Pod ...@@ -60,6 +60,7 @@ module Pod
autoload :InfoPlistFile, 'cocoapods/generator/info_plist_file' autoload :InfoPlistFile, 'cocoapods/generator/info_plist_file'
autoload :PrefixHeader, 'cocoapods/generator/prefix_header' autoload :PrefixHeader, 'cocoapods/generator/prefix_header'
autoload :TargetEnvironmentHeader, 'cocoapods/generator/target_environment_header' autoload :TargetEnvironmentHeader, 'cocoapods/generator/target_environment_header'
autoload :UmbrellaHeader, 'cocoapods/generator/umbrella_header'
autoload :XCConfig, 'cocoapods/generator/xcconfig' autoload :XCConfig, 'cocoapods/generator/xcconfig'
end end
......
module Pod
module Generator
# Generates an umbrella header file for clang modules, which are used by
# dynamic frameworks on iOS 8 and OSX 10.10 under the hood.
#
# If the target is a +PodTarget+, then the umbrella header is required
# to make all public headers in a convenient manner available without the
# need to write out header declarations for every library header.
#
class UmbrellaHeader < Header
# @return [Target]
# the target, which provides the product name
attr_accessor :target
# @param [Target] target
# @see target
#
def initialize(target)
super(target.target_definition.platform)
@target = target
end
# Generates the contents of the umbrella header according to the included
# pods.
#
# @return [String]
#
def generate
result = super
result << "\n"
result << <<-eos.strip_heredoc
FOUNDATION_EXPORT double #{target.product_module_name}VersionNumber;
FOUNDATION_EXPORT const unsigned char #{target.product_module_name}VersionString[];
eos
result << "\n"
result
end
end
end
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