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
496d2b77
Commit
496d2b77
authored
Jan 04, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ModuleMap] Explicitly declare private headers
parent
1265bea9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
module_map.rb
lib/cocoapods/generator/module_map.rb
+17
-2
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+4
-0
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+3
-1
No files found.
lib/cocoapods/generator/module_map.rb
View file @
496d2b77
...
@@ -10,10 +10,15 @@ module Pod
...
@@ -10,10 +10,15 @@ module Pod
#
#
attr_reader
:target
attr_reader
:target
# @return [Array] the private headers of the module
#
attr_accessor
:private_headers
# @param [Target] target @see target
# @param [Target] target @see target
#
#
def
initialize
(
target
)
def
initialize
(
target
)
@target
=
target
@target
=
target
@private_headers
=
[]
end
end
# Generates and saves the Info.plist to the given path.
# Generates and saves the Info.plist to the given path.
...
@@ -35,14 +40,24 @@ module Pod
...
@@ -35,14 +40,24 @@ module Pod
# @return [String]
# @return [String]
#
#
def
generate
def
generate
<<-
eos
.
strip_heredoc
result
=
<<-
eos
.
strip_heredoc
framework module
#{
target
.
product_module_name
}
{
framework module
#{
target
.
product_module_name
}
{
umbrella header "
#{
target
.
umbrella_header_path
.
basename
}
"
umbrella header "
#{
target
.
umbrella_header_path
.
basename
}
"
export *
export *
module * { export * }
module * { export * }
}
eos
eos
result
<<
"
\n
#{
generate_private_header_exports
}
"
unless
private_headers
.
empty?
result
<<
"}
\n
"
end
private
def
generate_private_header_exports
private_headers
.
reduce
(
''
)
do
|
string
,
header
|
string
<<
%( private header "#{header}\n")
end
end
end
end
end
end
end
...
...
lib/cocoapods/installer/target_installer.rb
View file @
496d2b77
...
@@ -107,12 +107,16 @@ module Pod
...
@@ -107,12 +107,16 @@ module Pod
# Creates the module map file which ensures that the umbrella header is
# Creates the module map file which ensures that the umbrella header is
# recognized with a customized path
# recognized with a customized path
#
#
# @yield_param [Generator::ModuleMap]
# yielded once to configure the private headers
#
# @return [void]
# @return [void]
#
#
def
create_module_map
def
create_module_map
path
=
target
.
module_map_path
path
=
target
.
module_map_path
UI
.
message
"- Generating module map file at
#{
UI
.
path
(
path
)
}
"
do
UI
.
message
"- Generating module map file at
#{
UI
.
path
(
path
)
}
"
do
generator
=
Generator
::
ModuleMap
.
new
(
target
)
generator
=
Generator
::
ModuleMap
.
new
(
target
)
yield
generator
if
block_given?
generator
.
save_as
(
path
)
generator
.
save_as
(
path
)
add_file_to_support_group
(
path
)
add_file_to_support_group
(
path
)
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
496d2b77
...
@@ -22,7 +22,9 @@ module Pod
...
@@ -22,7 +22,9 @@ module Pod
create_xcconfig_file
create_xcconfig_file
if
target
.
requires_frameworks?
if
target
.
requires_frameworks?
create_info_plist_file
create_info_plist_file
create_module_map
create_module_map
do
|
generator
|
generator
.
private_headers
+=
target
.
file_accessors
.
flat_map
(
&
:private_headers
).
map
(
&
:basename
)
end
create_umbrella_header
do
|
generator
|
create_umbrella_header
do
|
generator
|
generator
.
imports
+=
target
.
file_accessors
.
flat_map
(
&
:public_headers
).
map
(
&
:basename
)
generator
.
imports
+=
target
.
file_accessors
.
flat_map
(
&
:public_headers
).
map
(
&
:basename
)
end
end
...
...
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