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
abc15da3
Commit
abc15da3
authored
Feb 23, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop adding header search paths that do not contain any headers
parent
636d1104
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
13 deletions
+25
-13
CHANGELOG.md
CHANGELOG.md
+3
-0
file_references_installer.rb
...xcode/pods_project_generator/file_references_installer.rb
+14
-10
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
file_references_installer_spec.rb
.../pods_project_generator/file_references_installer_spec.rb
+7
-2
No files found.
CHANGELOG.md
View file @
abc15da3
...
...
@@ -86,6 +86,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7445
](
https://github.com/CocoaPods/CocoaPods/pull/7445
)
*
Stop adding header search paths that do not contain any headers.
[
Samuel Giddins
](
https://github.com/segiddins
)
## 1.4.0 (2018-01-18)
##### Enhancements
...
...
lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb
View file @
abc15da3
...
...
@@ -135,27 +135,28 @@ module Pod
def
link_headers
UI
.
message
'- Linking headers'
do
pod_targets
.
each
do
|
pod_target
|
pod_target
.
file_accessors
.
each
do
|
file_accessor
|
# When integrating Pod as frameworks, built Pods are built into
# frameworks, whose headers are included inside the built
# framework. Those headers do not need to be linked from the
# sandbox.
next
if
pod_target
.
requires_frameworks?
||
!
pod_target
.
should_build?
headers_sandbox
=
Pathname
.
new
(
file_accessor
.
spec
.
root
.
name
)
# When integrating Pod as frameworks, built Pods are built into
# frameworks, whose headers are included inside the built
# framework. Those headers do not need to be linked from the
# sandbox.
next
if
pod_target
.
requires_frameworks?
&&
pod_target
.
should_build?
pod_target
.
build_headers
.
add_search_path
(
headers_sandbox
,
pod_target
.
platform
)
sandbox
.
public_headers
.
add_search_path
(
headers_sandbox
,
pod_target
.
platform
)
headers_sandbox
=
Pathname
.
new
(
pod_target
.
pod_name
)
added_build_headers
=
false
added_public_headers
=
false
pod_target
.
file_accessors
.
each
do
|
file_accessor
|
# Private headers will always end up in Pods/Headers/Private/PodA/*.h
# This will allow for `""` imports to work.
header_mappings
(
headers_sandbox
,
file_accessor
,
file_accessor
.
headers
).
each
do
|
namespaced_path
,
files
|
added_build_headers
=
true
pod_target
.
build_headers
.
add_files
(
namespaced_path
,
files
)
end
# Public headers on the other hand will be added in Pods/Headers/Public/PodA/PodA/*.h
# The extra folder is intentional in order for `<>` imports to work.
header_mappings
(
headers_sandbox
,
file_accessor
,
file_accessor
.
public_headers
,
:public
).
each
do
|
namespaced_path
,
files
|
added_public_headers
=
true
sandbox
.
public_headers
.
add_files
(
namespaced_path
,
files
)
end
...
...
@@ -165,6 +166,9 @@ module Pod
end
end
end
pod_target
.
build_headers
.
add_search_path
(
headers_sandbox
,
pod_target
.
platform
)
if
added_build_headers
sandbox
.
public_headers
.
add_search_path
(
headers_sandbox
,
pod_target
.
platform
)
if
added_public_headers
end
end
end
...
...
cocoapods-integration-specs
@
f7fe19af
Subproject commit
21bf4969be6345e4761a3cca3e91e8a3b953a302
Subproject commit
f7fe19aff17a09075bdba1afcde1d4ffb5fff8ab
spec/unit/installer/xcode/pods_project_generator/file_references_installer_spec.rb
View file @
abc15da3
...
...
@@ -99,7 +99,7 @@ module Pod
)
end
it
'
does not link
the public headers meant for the user for a vendored framework'
do
it
'
links
the public headers meant for the user for a vendored framework'
do
Target
.
any_instance
.
stubs
(
:requires_frameworks?
).
returns
(
true
)
pod_target_one
=
fixture_pod_target
(
'banana-lib/BananaLib.podspec'
)
pod_target_two
=
fixture_pod_target
(
'monkey/monkey.podspec'
)
...
...
@@ -112,7 +112,12 @@ module Pod
banana_headers
=
[
headers_root
+
'BananaLib/Banana.h'
,
headers_root
+
'BananaLib/MoreBanana.h'
]
banana_headers
.
each
{
|
banana_header
|
banana_header
.
should
.
not
.
exist
}
monkey_header
=
headers_root
+
'monkey/monkey/monkey.h'
monkey_header
.
should
.
not
.
exist
monkey_header
.
should
.
exist
# since it lives outside of the vendored framework
config
.
sandbox
.
public_headers
.
search_paths
(
pod_target_one
.
platform
).
should
==
%w(
${PODS_ROOT}/Headers/Public/monkey
${PODS_ROOT}/Headers/Public/monkey/monkey
)
end
it
"doesn't link public headers from vendored framework, when frameworks required"
do
...
...
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