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
e3819855
Commit
e3819855
authored
Aug 18, 2017
by
Danielle Tomlinson
Committed by
Samuel Giddins
Feb 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use modulemaps and headers
parent
d603dbfa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
21 deletions
+49
-21
pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
+1
-0
aggregate_target_installer.rb
...code/pods_project_generator/aggregate_target_installer.rb
+3
-0
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+41
-16
target_installer.rb
...nstaller/xcode/pods_project_generator/target_installer.rb
+3
-4
target.rb
lib/cocoapods/target.rb
+1
-1
No files found.
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
View file @
e3819855
...
...
@@ -55,6 +55,7 @@ module Pod
'PRODUCT_BUNDLE_IDENTIFIER'
=>
'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
,
'SKIP_INSTALL'
=>
'YES'
,
'SWIFT_ACTIVE_COMPILATION_CONDITIONS'
=>
'$(inherited) '
,
'SWIFT_INCLUDE_PATHS'
=>
'$(inherited) ${PODS_CONFIGURATION_BUILD_DIR}/'
+
target
.
name
,
# 'USE_HEADERMAP' => 'NO'
}
...
...
lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb
View file @
e3819855
...
...
@@ -20,6 +20,9 @@ module Pod
create_info_plist_file
(
target
.
info_plist_path
,
native_target
,
target
.
version
,
target
.
platform
)
create_module_map
create_umbrella_header
elsif
target
.
uses_swift?
create_module_map
create_umbrella_header
end
# Because embedded targets live in their host target, CocoaPods
# copies all of the embedded target's pod_targets to its host
...
...
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
e3819855
...
...
@@ -27,26 +27,25 @@ module Pod
add_files_to_build_phases
create_xcconfig_file
create_test_xcconfig_files
if
target
.
contains_test_specifications?
if
target
.
requires_frameworks?
unless
target
.
static_framework?
create_info_plist_file
(
target
.
info_plist_path
,
native_target
,
target
.
version
,
target
.
platform
)
end
create_module_map
create_umbrella_header
do
|
generator
|
file_accessors
=
target
.
file_accessors
file_accessors
=
file_accessors
.
reject
{
|
f
|
f
.
spec
.
test_specification?
}
if
target
.
contains_test_specifications?
generator
.
imports
+=
if
header_mappings_dir
file_accessors
.
flat_map
(
&
:public_headers
).
map
do
|
pathname
|
pathname
.
relative_path_from
(
header_mappings_dir
)
end
else
file_accessors
.
flat_map
(
&
:public_headers
).
map
(
&
:basename
)
create_module_map
create_umbrella_header
do
|
generator
|
file_accessors
=
target
.
file_accessors
file_accessors
=
file_accessors
.
reject
{
|
f
|
f
.
spec
.
test_specification?
}
if
target
.
contains_test_specifications?
generator
.
imports
+=
if
header_mappings_dir
file_accessors
.
flat_map
(
&
:public_headers
).
map
do
|
pathname
|
pathname
.
relative_path_from
(
header_mappings_dir
)
end
end
create_build_phase_to_symlink_header_folders
else
file_accessors
.
flat_map
(
&
:public_headers
).
map
(
&
:basename
)
end
end
if
target
.
requires_frameworks?
if
target
.
static_framework?
create_build_phase_to_move_static_framework_archive
end
create_build_phase_to_symlink_header_folders
else
add_copy_module_map_build_phase
end
unless
skip_pch?
(
target
.
non_test_specs
)
path
=
target
.
prefix_header_path
...
...
@@ -661,12 +660,38 @@ module Pod
copy_phase
.
symbol_dst_subfolder_spec
=
:products_directory
copy_phase
.
dst_path
=
"$(
#{
acl
.
upcase
}
_HEADERS_FOLDER_PATH)/
#{
sub_dir
}
"
copy_phase
.
add_file_reference
(
file_ref
,
true
)
elsif
acl
!=
'Project'
relative_path
=
file_ref
.
real_path
.
basename
copy_phase_name
=
"Copy
#{
acl
}
Headers"
copy_phase
=
native_target
.
copy_files_build_phases
.
find
{
|
bp
|
bp
.
name
==
copy_phase_name
}
||
native_target
.
new_copy_files_build_phase
(
copy_phase_name
)
copy_phase
.
symbol_dst_subfolder_spec
=
:products_directory
copy_phase
.
dst_path
=
'Headers/'
copy_phase
.
add_file_reference
(
file_ref
,
true
)
else
build_file
.
settings
||=
{}
build_file
.
settings
[
'ATTRIBUTES'
]
=
[
acl
]
end
end
def
support_files_group
pod_name
=
target
.
pod_name
dir
=
target
.
support_files_dir
project
.
pod_support_files_group
(
pod_name
,
dir
)
end
def
add_copy_module_map_build_phase
(
path
=
target
.
module_map_path
.
relative_path_from
(
target
.
support_files_dir
))
if
!
target
.
requires_frameworks?
&&
!
target
.
uses_swift?
file_ref
=
support_files_group
.
find_file_by_path
(
path
.
to_s
)
copy_phase_name
=
'Copy modulemap'
copy_phase
=
native_target
.
copy_files_build_phases
.
find
{
|
bp
|
bp
.
name
==
copy_phase_name
}
||
native_target
.
new_copy_files_build_phase
(
copy_phase_name
)
copy_phase
.
symbol_dst_subfolder_spec
=
:products_directory
copy_phase
.
dst_path
=
'Headers/'
copy_phase
.
add_file_reference
(
file_ref
,
false
)
end
end
#-----------------------------------------------------------------------#
end
end
...
...
lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb
View file @
e3819855
...
...
@@ -88,6 +88,9 @@ module Pod
settings
[
'PRIVATE_HEADERS_FOLDER_PATH'
]
=
framework_name
+
'.framework'
+
'/PrivateHeaders'
end
else
# if target.uses_swift?
# settings['PRODUCT_NAME'] = target.product_module_name
# end
settings
.
merge!
(
'OTHER_LDFLAGS'
=>
''
,
'OTHER_LIBTOOLFLAGS'
=>
''
)
end
...
...
@@ -169,16 +172,12 @@ module Pod
# Creates the module map file which ensures that the umbrella header is
# recognized with a customized path
#
# @yield_param [Generator::ModuleMap]
# yielded once to configure the private headers
#
# @return [void]
#
def
create_module_map
path
=
target
.
module_map_path
UI
.
message
"- Generating module map file at
#{
UI
.
path
(
path
)
}
"
do
generator
=
Generator
::
ModuleMap
.
new
(
target
)
yield
generator
if
block_given?
update_changed_file
(
generator
,
path
)
add_file_to_support_group
(
path
)
...
...
lib/cocoapods/target.rb
View file @
e3819855
...
...
@@ -155,7 +155,7 @@ module Pod
# defines the module structure for the compiler.
#
def
module_map_path
support_files_dir
+
"
#{
label
}
.modulemap"
support_files_dir
+
'module.modulemap'
end
# @return [Pathname] the absolute path of the bridge support file.
...
...
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