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
945a51db
Commit
945a51db
authored
Nov 07, 2017
by
Dimitris Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not link system frameworks of test specs to library targets
parent
e375d31c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
CHANGELOG.md
CHANGELOG.md
+4
-0
pods_project_generator.rb
lib/cocoapods/installer/xcode/pods_project_generator.rb
+14
-7
pods_project_generator_spec.rb
spec/unit/installer/xcode/pods_project_generator_spec.rb
+2
-0
No files found.
CHANGELOG.md
View file @
945a51db
...
@@ -14,6 +14,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -14,6 +14,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
##### Bug Fixes
*
Do not link system frameworks of test specs to library targets
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7205
](
https://github.com/CocoaPods/CocoaPods/pull/7205
)
*
Be more lenient when stripping frameworks and dSYMs for non fat binaries
*
Be more lenient when stripping frameworks and dSYMs for non fat binaries
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7196
](
https://github.com/CocoaPods/CocoaPods/issues/7196
)
[
#7196
](
https://github.com/CocoaPods/CocoaPods/issues/7196
)
...
...
lib/cocoapods/installer/xcode/pods_project_generator.rb
View file @
945a51db
...
@@ -192,13 +192,14 @@ module Pod
...
@@ -192,13 +192,14 @@ module Pod
def
add_system_framework_dependencies
def
add_system_framework_dependencies
# @TODO: Add Specs
# @TODO: Add Specs
pod_targets
.
sort_by
(
&
:name
).
each
do
|
pod_target
|
pod_targets
.
select
(
&
:should_build?
).
sort_by
(
&
:name
).
each
do
|
pod_target
|
pod_target
.
file_accessors
.
each
do
|
file_accessor
|
test_file_accessors
,
file_accessors
=
pod_target
.
file_accessors
.
partition
{
|
fa
|
fa
.
spec
.
test_specification?
}
file_accessor
.
spec_consumer
.
frameworks
.
each
do
|
framework
|
file_accessors
.
each
do
|
file_accessor
|
if
pod_target
.
should_build?
add_system_frameworks_to_native_target
(
file_accessor
,
pod_target
.
native_target
)
pod_target
.
native_target
.
add_system_framework
(
framework
)
end
end
test_file_accessors
.
each
do
|
test_file_accessor
|
end
native_target
=
pod_target
.
native_target_for_spec
(
test_file_accessor
.
spec
)
add_system_frameworks_to_native_target
(
test_file_accessor
,
native_target
)
end
end
end
end
end
end
...
@@ -315,6 +316,12 @@ module Pod
...
@@ -315,6 +316,12 @@ module Pod
end
end
end
end
def
add_system_frameworks_to_native_target
(
file_accessor
,
native_target
)
file_accessor
.
spec_consumer
.
frameworks
.
each
do
|
framework
|
native_target
.
add_system_framework
(
framework
)
end
end
def
add_resource_bundles_to_native_target
(
dependent_target
,
native_target
)
def
add_resource_bundles_to_native_target
(
dependent_target
,
native_target
)
resource_bundle_targets
=
dependent_target
.
resource_bundle_targets
+
dependent_target
.
test_resource_bundle_targets
resource_bundle_targets
=
dependent_target
.
resource_bundle_targets
+
dependent_target
.
test_resource_bundle_targets
resource_bundle_targets
.
each
do
|
resource_bundle_target
|
resource_bundle_targets
.
each
do
|
resource_bundle_target
|
...
...
spec/unit/installer/xcode/pods_project_generator_spec.rb
View file @
945a51db
...
@@ -131,6 +131,7 @@ module Pod
...
@@ -131,6 +131,7 @@ module Pod
it
'install the targets of the Pod project'
do
it
'install the targets of the Pod project'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
set_platform
(
:ios
,
'8.0'
)
target_definition
.
abstract
=
false
target_definition
.
abstract
=
false
target_definition
.
store_pod
(
'BananaLib'
)
target_definition
.
store_pod
(
'BananaLib'
)
pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
],
config
.
sandbox
)
pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
],
config
.
sandbox
)
...
@@ -143,6 +144,7 @@ module Pod
...
@@ -143,6 +144,7 @@ module Pod
it
'does not skip empty pod targets'
do
it
'does not skip empty pod targets'
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
.
set_platform
(
:ios
,
'8.0'
)
target_definition
.
abstract
=
false
target_definition
.
abstract
=
false
pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
],
config
.
sandbox
)
pod_target
=
PodTarget
.
new
([
spec
],
[
target_definition
],
config
.
sandbox
)
@generator
.
stubs
(
:aggregate_targets
).
returns
([])
@generator
.
stubs
(
:aggregate_targets
).
returns
([])
...
...
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