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
c4f5b5b5
Commit
c4f5b5b5
authored
Aug 03, 2016
by
Ben Asher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed more messages extension edge cases
parent
69ed45ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+1
-1
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+6
-2
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+4
-1
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
c4f5b5b5
...
@@ -274,7 +274,7 @@ module Pod
...
@@ -274,7 +274,7 @@ module Pod
host_uuids
=
[]
host_uuids
=
[]
aggregate_target_user_projects
.
product
(
target
.
user_targets
).
each
do
|
user_project
,
user_target
|
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
=
user_project
.
host_targets_for_embedded_target
(
user_target
)
host_targets
.
map
(
&
:
product
_type
).
each
do
|
product_type
|
host_targets
.
map
(
&
:
symbol
_type
).
each
do
|
product_type
|
target
.
add_host_target_product_type
(
product_type
)
target
.
add_host_target_product_type
(
product_type
)
end
end
host_uuids
+=
host_targets
.
map
(
&
:uuid
)
host_uuids
+=
host_targets
.
map
(
&
:uuid
)
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
c4f5b5b5
...
@@ -21,9 +21,11 @@ module Pod
...
@@ -21,9 +21,11 @@ module Pod
# frameworks are embedded in the output directory / product bundle.
# frameworks are embedded in the output directory / product bundle.
#
#
# @note This does not include :app_extension or :watch_extension because
# @note This does not include :app_extension or :watch_extension because
# these types must have their frameworks embedded in their host targets
# these types must have their frameworks embedded in their host targets.
# For messages extensions, this only applies if it's embedded in a messages
# application.
#
#
EMBED_FRAMEWORK_TARGET_TYPES
=
[
:application
,
:unit_test_bundle
,
:ui_test_bundle
,
:watch2_extension
].
freeze
EMBED_FRAMEWORK_TARGET_TYPES
=
[
:application
,
:unit_test_bundle
,
:ui_test_bundle
,
:watch2_extension
,
:messages_extension
].
freeze
# @return [String] the name of the embed frameworks phase
# @return [String] the name of the embed frameworks phase
#
#
...
@@ -121,6 +123,7 @@ module Pod
...
@@ -121,6 +123,7 @@ module Pod
# will have their frameworks embedded in their host targets.
# will have their frameworks embedded in their host targets.
#
#
def
remove_embed_frameworks_script_phase_from_embedded_targets
def
remove_embed_frameworks_script_phase_from_embedded_targets
return
unless
target
.
requires_host_target?
native_targets
.
each
do
|
native_target
|
native_targets
.
each
do
|
native_target
|
if
AggregateTarget
::
EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES
.
include?
native_target
.
symbol_type
if
AggregateTarget
::
EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES
.
include?
native_target
.
symbol_type
remove_embed_frameworks_script_phase
(
native_target
)
remove_embed_frameworks_script_phase
(
native_target
)
...
@@ -201,6 +204,7 @@ module Pod
...
@@ -201,6 +204,7 @@ module Pod
# directory / product bundle.
# directory / product bundle.
#
#
def
native_targets_to_embed_in
def
native_targets_to_embed_in
return
[]
if
target
.
requires_host_target?
native_targets
.
select
do
|
target
|
native_targets
.
select
do
|
target
|
EMBED_FRAMEWORK_TARGET_TYPES
.
include?
(
target
.
symbol_type
)
EMBED_FRAMEWORK_TARGET_TYPES
.
include?
(
target
.
symbol_type
)
end
end
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
c4f5b5b5
...
@@ -8,6 +8,9 @@ module Pod
...
@@ -8,6 +8,9 @@ module Pod
attr_reader
:target_definition
attr_reader
:target_definition
# Product types where the product's frameworks must be embedded in a host target
# 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
EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES
=
[
:app_extension
,
:framework
,
:messages_extension
,
:watch_extension
].
freeze
# Initialize a new instance
# Initialize a new instance
...
@@ -24,7 +27,7 @@ module Pod
...
@@ -24,7 +27,7 @@ module Pod
@search_paths_aggregate_targets
=
[]
@search_paths_aggregate_targets
=
[]
@file_accessors
=
[]
@file_accessors
=
[]
@xcconfigs
=
{}
@xcconfigs
=
{}
@host_target_types
=
[]
# Product types of the host target, if this target is embedded
@host_target_types
=
Set
.
new
# Product types of the host target, if this target is embedded
end
end
# Adds product type to the list of product types for the host
# Adds product type to the list of product types for the host
...
...
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