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
b259fa7c
Commit
b259fa7c
authored
Jul 24, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3868 from perotinus/no_framework_headers_in_public
parents
37ca3381
7b3da4a2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
0 deletions
+30
-0
CHANGELOG.md
CHANGELOG.md
+4
-0
file_references_installer.rb
lib/cocoapods/installer/file_references_installer.rb
+9
-0
monkey.h
spec/fixtures/monkey/monkey.h
+0
-0
monkey.podspec
spec/fixtures/monkey/monkey.podspec
+1
-0
file_references_installer_spec.rb
spec/unit/installer/file_references_installer_spec.rb
+16
-0
No files found.
CHANGELOG.md
View file @
b259fa7c
...
...
@@ -23,6 +23,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
#3857
](
https://github.com/CocoaPods/CocoaPods/issues/3857
)
[
Jonathan MacMillan
](
https://github.com/perotinus
)
*
Only link public headers in the sandbox for Pods that are not being built
into dynamic frameworks, when integrating Pods as frameworks
[
#3867
](
https://github.com/CocoaPods/CocoaPods/issues/3867
)
[
Jonathan MacMillan
](
https://github.com/perotinus
)
## 0.38.0
...
...
lib/cocoapods/installer/file_references_installer.rb
View file @
b259fa7c
...
...
@@ -118,15 +118,24 @@ module Pod
framework_exp
=
/\.framework\//
headers_sandbox
=
Pathname
.
new
(
file_accessor
.
spec
.
root
.
name
)
pod_target
.
build_headers
.
add_search_path
(
headers_sandbox
,
pod_target
.
platform
)
# 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.
unless
pod_target
.
requires_frameworks?
&&
pod_target
.
should_build?
sandbox
.
public_headers
.
add_search_path
(
headers_sandbox
,
pod_target
.
platform
)
end
header_mappings
(
headers_sandbox
,
file_accessor
,
file_accessor
.
headers
).
each
do
|
namespaced_path
,
files
|
pod_target
.
build_headers
.
add_files
(
namespaced_path
,
files
.
reject
{
|
f
|
f
.
to_path
=~
framework_exp
},
pod_target
.
platform
)
end
unless
pod_target
.
requires_frameworks?
&&
pod_target
.
should_build?
header_mappings
(
headers_sandbox
,
file_accessor
,
file_accessor
.
public_headers
).
each
do
|
namespaced_path
,
files
|
sandbox
.
public_headers
.
add_files
(
namespaced_path
,
files
.
reject
{
|
f
|
f
.
to_path
=~
framework_exp
},
pod_target
.
platform
)
end
end
vendored_frameworks_header_mappings
(
headers_sandbox
,
file_accessor
).
each
do
|
namespaced_path
,
files
|
sandbox
.
public_headers
.
add_files
(
namespaced_path
,
files
,
pod_target
.
platform
)
...
...
spec/fixtures/monkey/monkey.h
0 → 100644
View file @
b259fa7c
spec/fixtures/monkey/monkey.podspec
View file @
b259fa7c
...
...
@@ -8,4 +8,5 @@ Pod::Spec.new do |s|
s
.
source
=
{
:git
=>
"http://monkey.local/monkey.git"
,
:tag
=>
s
.
version
.
to_s
}
s
.
license
=
'MIT'
s
.
vendored_library
=
'monkey.a'
s
.
public_header_files
=
'monkey.h'
end
spec/unit/installer/file_references_installer_spec.rb
View file @
b259fa7c
...
...
@@ -70,6 +70,22 @@ module Pod
framework_header
.
should
.
exist
framework_subdir_header
.
should
.
exist
end
it
'links the public headers meant for the user, but only for Pods that are not built'
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'
)
project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
project
.
add_pod_group
(
'BananaLib'
,
fixture
(
'banana-lib'
))
project
.
add_pod_group
(
'monkey'
,
fixture
(
'monkey'
))
installer
=
Installer
::
FileReferencesInstaller
.
new
(
config
.
sandbox
,
[
pod_target_one
,
pod_target_two
],
project
)
installer
.
install!
headers_root
=
config
.
sandbox
.
public_headers
.
root
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.h'
monkey_header
.
should
.
exist
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