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
77d6a4a5
Commit
77d6a4a5
authored
Sep 20, 2016
by
Ben Asher
Committed by
GitHub
Sep 20, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5888 from benasher44/basher_fix_message_app
Remove special casing for messages apps
parents
520988c2
4d6c28ce
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
31 deletions
+5
-31
CHANGELOG.md
CHANGELOG.md
+3
-2
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+1
-5
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+1
-18
aggregate_target_spec.rb
spec/unit/target/aggregate_target_spec.rb
+0
-6
No files found.
CHANGELOG.md
View file @
77d6a4a5
...
...
@@ -15,8 +15,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
*
None.
*
Remove special handling for messages apps
[
Ben Asher
](
https://github.com/benasher44
)
[
#5860
](
https://github.com/CocoaPods/CocoaPods/issues/5860
)
## 1.1.0.rc.2 (2016-09-13)
...
...
lib/cocoapods/installer/analyzer.rb
View file @
77d6a4a5
...
...
@@ -281,11 +281,7 @@ module Pod
embedded_aggregate_targets
.
each
do
|
target
|
host_uuids
=
[]
aggregate_target_user_projects
.
product
(
target
.
user_targets
).
each
do
|
user_project
,
user_target
|
host_targets
=
user_project
.
host_targets_for_embedded_target
(
user_target
)
host_targets
.
map
(
&
:symbol_type
).
each
do
|
product_type
|
target
.
add_host_target_product_type
(
product_type
)
end
host_uuids
+=
host_targets
.
map
(
&
:uuid
)
host_uuids
+=
user_project
.
host_targets_for_embedded_target
(
user_target
).
map
(
&
:uuid
)
end
# For each host, keep track of its embedded target definitions
# to later verify each embedded target's compatiblity with its host,
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
77d6a4a5
...
...
@@ -9,8 +9,6 @@ module Pod
# Product types where the product's frameworks must be embedded in a host target
#
# @note :messages_extension only applies when it is embedded in an app (as opposed to a messages app)
#
EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES
=
[
:app_extension
,
:framework
,
:messages_extension
,
:watch_extension
].
freeze
# Initialize a new instance
...
...
@@ -27,21 +25,6 @@ module Pod
@search_paths_aggregate_targets
=
[]
@file_accessors
=
[]
@xcconfigs
=
{}
@host_target_types
=
Set
.
new
# Product types of the host target, if this target is embedded
end
# Adds product type to the list of product types for the host
# targets, in which this target will be embedded
#
# @param [Symbol] product_type Product type (symbol representation)
# of a host, in which this target will be embedded
#
# @note This is important for messages extensions, since a messages
# extension has its frameworks embedded in its host when
# its host is an app but not when it's a messages app
#
def
add_host_target_product_type
(
product_type
)
@host_target_types
<<
product_type
end
# @return [Boolean] True if the user_target's pods are
...
...
@@ -57,7 +40,7 @@ module Pod
return
false
if
user_project
.
nil?
symbol_types
=
user_targets
.
map
(
&
:symbol_type
).
uniq
raise
ArgumentError
,
"Expected single kind of user_target for
#{
name
}
. Found
#{
symbol_types
.
join
(
', '
)
}
."
unless
symbol_types
.
count
==
1
EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES
.
include?
(
symbol_types
[
0
])
&&
!
@host_target_types
.
include?
(
:messages_application
)
EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES
.
include?
(
symbol_types
[
0
])
end
# @return [String] the label for the target.
...
...
spec/unit/target/aggregate_target_spec.rb
View file @
77d6a4a5
...
...
@@ -224,12 +224,6 @@ module Pod
@target
.
requires_host_target?
.
should
==
true
end
it
'does not require a host target for messages extension targets embedded in messages applications'
do
@target
.
add_host_target_product_type
(
:messages_application
)
@target
.
user_targets
.
first
.
stubs
(
:symbol_type
).
returns
(
:messages_extension
)
@target
.
requires_host_target?
.
should
==
false
end
it
'does not require a host target for watch 2 extension targets'
do
@target
.
user_targets
.
first
.
stubs
(
:symbol_type
).
returns
(
:watch2_extension
)
@target
.
requires_host_target?
.
should
==
false
...
...
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