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
108dc513
Commit
108dc513
authored
Nov 29, 2016
by
Danielle Tomlinson
Committed by
GitHub
Nov 29, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6216 from benasher44/basher_fix_cross_project_frameworks
Fix cross-project framework dependencies
parents
ef5d6e1d
fcef7834
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
15 deletions
+25
-15
CHANGELOG.md
CHANGELOG.md
+4
-0
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+14
-11
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+7
-4
No files found.
CHANGELOG.md
View file @
108dc513
...
@@ -44,6 +44,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -44,6 +44,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Danielle Tomlinson
](
https://github.com/dantoml
)
[
Danielle Tomlinson
](
https://github.com/dantoml
)
[
#6078
](
https://github.com/CocoaPods/CocoaPods/issues/6078
)
[
#6078
](
https://github.com/CocoaPods/CocoaPods/issues/6078
)
*
Fix framework support for frameworks in sub-projects.
[
Ben Asher
](
https://github.com/benasher44
)
[
#6123
](
https://github.com/CocoaPods/CocoaPods/issues/6123
)
## 1.2.0.beta.1 (2016-10-28)
## 1.2.0.beta.1 (2016-10-28)
...
...
lib/cocoapods/installer/analyzer.rb
View file @
108dc513
...
@@ -238,18 +238,21 @@ module Pod
...
@@ -238,18 +238,21 @@ module Pod
#
#
def
copy_embedded_target_pod_targets_to_host
(
aggregate_target
,
embedded_aggregate_targets
)
def
copy_embedded_target_pod_targets_to_host
(
aggregate_target
,
embedded_aggregate_targets
)
return
if
aggregate_target
.
requires_host_target?
return
if
aggregate_target
.
requires_host_target?
# Get the uuids of the aggregate_target's user_targets' embedded targets if any
pod_target_names
=
Set
.
new
(
aggregate_target
.
pod_targets
.
map
(
&
:name
))
embedded_uuids
=
Set
.
new
(
aggregate_target
.
user_targets
.
map
do
|
target
|
aggregate_user_target_uuids
=
Set
.
new
(
aggregate_target
.
user_targets
.
map
(
&
:uuid
))
aggregate_target
.
user_project
.
embedded_targets_in_native_target
(
target
).
map
(
&
:uuid
)
embedded_aggregate_targets
.
each
do
|
embedded_aggregate_target
|
end
.
flatten
)
next
unless
embedded_aggregate_target
.
user_targets
.
any?
do
|
embedded_user_target
|
return
if
embedded_uuids
.
empty?
# You have to ask the host target's project for the host targets of
embedded_aggregate_targets
.
each
do
|
embedded_target
|
# the embedded target, as opposed to asking user_project for the
next
unless
embedded_target
.
user_targets
.
map
(
&
:uuid
).
any?
do
|
embedded_uuid
|
# embedded targets of the host target. The latter doesn't work when
embedded_uuids
.
include?
embedded_uuid
# the embedded target lives in a sub-project. The lines below get
end
# the host target uuids for the embedded target and checks to see if
pod_target_names
=
aggregate_target
.
pod_targets
.
map
(
&
:name
)
# those match to any of the user_target uuids in the aggregate_target.
host_target_uuids
=
Set
.
new
(
aggregate_target
.
user_project
.
host_targets_for_embedded_target
(
embedded_user_target
).
map
(
&
:uuid
))
!
aggregate_user_target_uuids
.
intersection
(
host_target_uuids
).
empty?
end
# This embedded target is hosted by the aggregate target's user_target; copy over the non-duplicate pod_targets
# This embedded target is hosted by the aggregate target's user_target; copy over the non-duplicate pod_targets
aggregate_target
.
pod_targets
=
aggregate_target
.
pod_targets
+
embedded_target
.
pod_targets
.
select
do
|
pod_target
|
aggregate_target
.
pod_targets
=
aggregate_target
.
pod_targets
+
embedded_
aggregate_
target
.
pod_targets
.
select
do
|
pod_target
|
!
pod_target_names
.
include?
pod_target
.
name
!
pod_target_names
.
include?
pod_target
.
name
end
end
end
end
...
...
spec/unit/installer/analyzer_spec.rb
View file @
108dc513
...
@@ -753,7 +753,9 @@ module Pod
...
@@ -753,7 +753,9 @@ module Pod
platform
:ios
,
'8.0'
platform
:ios
,
'8.0'
project
'SampleProject/SampleProject'
project
'SampleProject/SampleProject'
target
'SampleProject'
target
'SampleProject'
do
pod
'JSONKit'
end
target
'Sample Framework'
do
target
'Sample Framework'
do
project
'SampleProject/Sample Lib/Sample Lib'
project
'SampleProject/Sample Lib/Sample Lib'
...
@@ -763,9 +765,10 @@ module Pod
...
@@ -763,9 +765,10 @@ module Pod
analyzer
=
Pod
::
Installer
::
Analyzer
.
new
(
config
.
sandbox
,
podfile
)
analyzer
=
Pod
::
Installer
::
Analyzer
.
new
(
config
.
sandbox
,
podfile
)
result
=
analyzer
.
analyze
result
=
analyzer
.
analyze
result
.
targets
.
flat_map
{
|
at
|
at
.
pod_targets
.
map
{
|
pt
|
"
#{
at
.
name
}
/
#{
pt
.
name
}
"
}
}.
sort
.
should
==
[
result
.
targets
.
select
{
|
at
|
at
.
name
==
'Pods-SampleProject'
}.
flat_map
(
&
:pod_targets
).
map
(
&
:name
).
sort
.
uniq
.
should
==
%w(
'Pods-Sample Framework/monkey'
,
JSONKit
].
sort
monkey
)
.
sort
end
end
it
"raises when unable to find an extension's host target"
do
it
"raises when unable to find an extension's host target"
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