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
c6de4c1b
Commit
c6de4c1b
authored
Sep 26, 2016
by
Ben Asher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add messages application to embed framework target types
parent
9aa02e59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+1
-1
target_integrator_spec.rb
...staller/user_project_integrator/target_integrator_spec.rb
+10
-11
No files found.
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
c6de4c1b
...
...
@@ -25,7 +25,7 @@ module Pod
# 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
,
:messages_
extens
ion
].
freeze
EMBED_FRAMEWORK_TARGET_TYPES
=
[
:application
,
:unit_test_bundle
,
:ui_test_bundle
,
:watch2_extension
,
:messages_
applicat
ion
].
freeze
# @return [String] the name of the embed frameworks phase
#
...
...
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
c6de4c1b
...
...
@@ -137,6 +137,15 @@ module Pod
phase
.
nil?
.
should
==
false
end
it
'adds an embed frameworks build phase if the target to integrate is a messages application'
do
@pod_bundle
.
stubs
(
:requires_frameworks?
=>
true
)
target
=
@target_integrator
.
send
(
:native_targets
).
first
target
.
stubs
(
:symbol_type
).
returns
(
:messages_application
)
@target_integrator
.
integrate!
phase
=
target
.
shell_script_build_phases
.
find
{
|
bp
|
bp
.
name
==
@embed_framework_phase_name
}
phase
.
nil?
.
should
==
false
end
it
'does not add an embed frameworks build phase if the target to integrate is a framework'
do
@pod_bundle
.
stubs
(
:requires_frameworks?
=>
true
)
target
=
@target_integrator
.
send
(
:native_targets
).
first
...
...
@@ -173,7 +182,7 @@ module Pod
phase
.
nil?
.
should
==
false
end
it
'does not add an embed frameworks build phase if the target to integrate is a messages extension
for an iOS app
'
do
it
'does not add an embed frameworks build phase if the target to integrate is a messages extension'
do
@pod_bundle
.
stubs
(
:requires_frameworks?
=>
true
)
target
=
@target_integrator
.
send
(
:native_targets
).
first
target
.
stubs
(
:symbol_type
).
returns
(
:messages_extension
)
...
...
@@ -182,16 +191,6 @@ module Pod
phase
.
nil?
.
should
==
true
end
it
'adds an embed frameworks build phase if the target to integrate is a messages extension for a messages application'
do
@pod_bundle
.
stubs
(
:requires_frameworks?
=>
true
)
@pod_bundle
.
stubs
(
:requires_host_target?
=>
false
)
# Messages extensions for messages applications do not require a host target
target
=
@target_integrator
.
send
(
:native_targets
).
first
target
.
stubs
(
:symbol_type
).
returns
(
:messages_extension
)
@target_integrator
.
integrate!
phase
=
target
.
shell_script_build_phases
.
find
{
|
bp
|
bp
.
name
==
@embed_framework_phase_name
}
phase
.
nil?
.
should
==
false
end
it
'adds an embed frameworks build phase if the target to integrate is a UI Test bundle'
do
@pod_bundle
.
stubs
(
:requires_frameworks?
=>
true
)
target
=
@target_integrator
.
send
(
:native_targets
).
first
...
...
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