Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
85a52521
Commit
85a52521
authored
Sep 12, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add TargetInstaller#create_umbrella_header
parent
6665153f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
2 deletions
+44
-2
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+25
-0
aggregate_target_installer.rb
.../installer/target_installer/aggregate_target_installer.rb
+4
-1
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+6
-1
target.rb
lib/cocoapods/target.rb
+9
-0
No files found.
lib/cocoapods/installer/target_installer.rb
View file @
85a52521
...
@@ -86,6 +86,31 @@ module Pod
...
@@ -86,6 +86,31 @@ module Pod
end
end
end
end
# Generates a header which ensures that all header files are exported
# in the module map
#
# @yield_param [Generator::UmbrellaHeader]
# yielded once to configure the imports
#
def
create_umbrella_header
path
=
target
.
umbrella_header_path
UI
.
message
"- Generating umbrella header at
#{
UI
.
path
(
path
)
}
"
do
generator
=
Generator
::
UmbrellaHeader
.
new
(
target
)
yield
generator
if
block_given?
generator
.
save_as
(
path
)
# Add the file to the support group and the native target,
# so it will been added to the header build phase
file_ref
=
add_file_to_support_group
(
path
)
native_target
.
add_file_references
([
file_ref
])
# Make the umbrella header public
build_file
=
native_target
.
headers_build_phase
.
build_file
(
file_ref
)
build_file
.
settings
||=
{}
build_file
.
settings
[
'ATTRIBUTES'
]
=
[
'Public'
]
end
end
# Generates a dummy source file for each target so libraries that contain
# Generates a dummy source file for each target so libraries that contain
# only categories build.
# only categories build.
#
#
...
...
lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
View file @
85a52521
...
@@ -14,7 +14,10 @@ module Pod
...
@@ -14,7 +14,10 @@ module Pod
create_support_files_dir
create_support_files_dir
create_suport_files_group
create_suport_files_group
create_xcconfig_file
create_xcconfig_file
create_info_plist_file
if
target
.
requires_framework?
if
target
.
requires_framework?
create_info_plist_file
create_umbrella_header
end
create_target_environment_header
create_target_environment_header
create_bridge_support_file
create_bridge_support_file
create_copy_resources_script
create_copy_resources_script
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
85a52521
...
@@ -20,7 +20,12 @@ module Pod
...
@@ -20,7 +20,12 @@ module Pod
add_files_to_build_phases
add_files_to_build_phases
add_resources_bundle_targets
add_resources_bundle_targets
create_xcconfig_file
create_xcconfig_file
create_info_plist_file
if
target
.
requires_framework?
if
target
.
requires_framework?
create_info_plist_file
create_umbrella_header
do
|
generator
|
generator
.
imports
+=
target
.
file_accessors
.
map
(
&
:public_headers
).
flatten
.
map
(
&
:basename
)
end
end
create_prefix_header
create_prefix_header
create_dummy_source
create_dummy_source
end
end
...
...
lib/cocoapods/target.rb
View file @
85a52521
...
@@ -156,6 +156,15 @@ module Pod
...
@@ -156,6 +156,15 @@ module Pod
support_files_dir
+
"
#{
label
}
-Private.xcconfig"
support_files_dir
+
"
#{
label
}
-Private.xcconfig"
end
end
# @return [Pathname] the absolute path of the header file which contains
# the exported foundation constants with framework version
# information and all headers, which should been exported in the
# module map.
#
def
umbrella_header_path
support_files_dir
+
target_definition
.
label
+
"
#{
product_module_name
}
.h"
end
# @return [Pathname] the absolute path of the header file which contains
# @return [Pathname] the absolute path of the header file which contains
# the information about the installed pods.
# the information about the installed pods.
#
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment