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
4c2395b0
Commit
4c2395b0
authored
Aug 17, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4004 from CocoaPods/embed-frameworks-in-app-extensions
Embed frameworks into app and watch extensions.
parents
0de9eca7
895210b4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
CHANGELOG.md
CHANGELOG.md
+4
-0
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
+28
-0
No files found.
CHANGELOG.md
View file @
4c2395b0
...
@@ -21,6 +21,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -21,6 +21,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Dominique d'Argent
](
https://github.com/nubbel
)
[
Dominique d'Argent
](
https://github.com/nubbel
)
[
#3971
](
https://github.com/CocoaPods/CocoaPods/pull/3971
)
[
#3971
](
https://github.com/CocoaPods/CocoaPods/pull/3971
)
*
Embed frameworks into app and watch extensions.
[
Boris Bügling
](
https://github.com/neonichu
)
[
#4004
](
https://github.com/CocoaPods/CocoaPods/pull/4004
)
##### Enhancements
##### Enhancements
*
Collapse the namespaced public and private pod xcconfig into one single
*
Collapse the namespaced public and private pod xcconfig into one single
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
4c2395b0
...
@@ -12,7 +12,7 @@ module Pod
...
@@ -12,7 +12,7 @@ module Pod
# @return [Array<Symbol>] the symbol types, which require that the pod
# @return [Array<Symbol>] the symbol types, which require that the pod
# frameworks are embedded in the output directory / product bundle.
# frameworks are embedded in the output directory / product bundle.
#
#
EMBED_FRAMEWORK_TARGET_TYPES
=
[
:application
,
:unit_test_bundle
].
freeze
EMBED_FRAMEWORK_TARGET_TYPES
=
[
:application
,
:unit_test_bundle
,
:app_extension
,
:watch_extension
,
:watch2_extension
].
freeze
# @return [String] the name of the embed frameworks phase
# @return [String] the name of the embed frameworks phase
#
#
...
...
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
4c2395b0
...
@@ -116,6 +116,7 @@ module Pod
...
@@ -116,6 +116,7 @@ module Pod
end
end
it
'does not add an embed frameworks build phase if the target to integrate is a framework'
do
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
target
=
@target_integrator
.
send
(
:native_targets
).
first
target
.
stubs
(
:symbol_type
).
returns
(
:framework
)
target
.
stubs
(
:symbol_type
).
returns
(
:framework
)
@target_integrator
.
integrate!
@target_integrator
.
integrate!
...
@@ -123,6 +124,33 @@ module Pod
...
@@ -123,6 +124,33 @@ module Pod
phase
.
nil?
.
should
==
true
phase
.
nil?
.
should
==
true
end
end
it
'adds an embed frameworks build phase if the target to integrate is an app extension'
do
@pod_bundle
.
stubs
(
:requires_frameworks?
=>
true
)
target
=
@target_integrator
.
send
(
:native_targets
).
first
target
.
stubs
(
:symbol_type
).
returns
(
:app_extension
)
@target_integrator
.
integrate!
phase
=
target
.
shell_script_build_phases
.
find
{
|
bp
|
bp
.
name
==
'Embed Pods Frameworks'
}
phase
.
nil?
.
should
==
false
end
it
'adds an embed frameworks build phase if the target to integrate is a watch extension'
do
@pod_bundle
.
stubs
(
:requires_frameworks?
=>
true
)
target
=
@target_integrator
.
send
(
:native_targets
).
first
target
.
stubs
(
:symbol_type
).
returns
(
:watch_extension
)
@target_integrator
.
integrate!
phase
=
target
.
shell_script_build_phases
.
find
{
|
bp
|
bp
.
name
==
'Embed Pods Frameworks'
}
phase
.
nil?
.
should
==
false
end
it
'adds an embed frameworks build phase if the target to integrate is a watchOS 2 extension'
do
@pod_bundle
.
stubs
(
:requires_frameworks?
=>
true
)
target
=
@target_integrator
.
send
(
:native_targets
).
first
target
.
stubs
(
:symbol_type
).
returns
(
:watch2_extension
)
@target_integrator
.
integrate!
phase
=
target
.
shell_script_build_phases
.
find
{
|
bp
|
bp
.
name
==
'Embed Pods Frameworks'
}
phase
.
nil?
.
should
==
false
end
it
'removes existing embed frameworks build phases from integrated framework targets'
do
it
'removes existing embed frameworks build phases from integrated framework targets'
do
@pod_bundle
.
stubs
(
:requires_frameworks?
=>
true
)
@pod_bundle
.
stubs
(
:requires_frameworks?
=>
true
)
@target_integrator
.
integrate!
@target_integrator
.
integrate!
...
...
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