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
c89f74e9
Commit
c89f74e9
authored
Sep 25, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TargetIntegrator] Ensure the embed frameworks script is added to existing targets
parent
4ee54d23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+15
-6
No files found.
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
c89f74e9
...
@@ -127,11 +127,16 @@ module Pod
...
@@ -127,11 +127,16 @@ module Pod
# @todo This can be removed for CocoaPods 1.0
# @todo This can be removed for CocoaPods 1.0
#
#
def
update_to_cocoapods_0_39
def
update_to_cocoapods_0_39
requires_update
=
native_targets_to_embed_in
.
any?
do
|
target
|
targets_to_embed
=
native_targets
.
select
do
|
target
|
!
target
.
shell_script_build_phases
.
find
{
|
bp
|
bp
.
name
==
'Embed Pods Frameworks'
}
EMBED_FRAMEWORK_TARGET_TYPES
.
include?
(
target
.
symbol_type
)
end
requires_update
=
targets_to_embed
.
any?
do
|
target
|
!
target
.
shell_script_build_phases
.
find
{
|
bp
|
bp
.
name
==
EMBED_FRAMEWORK_PHASE_NAME
}
end
end
if
requires_update
if
requires_update
add_embed_frameworks_script_phase
targets_to_embed
.
each
do
|
native_target
|
add_embed_frameworks_script_phase_to_target
(
native_target
)
end
end
end
frameworks
=
user_project
.
frameworks_group
frameworks
=
user_project
.
frameworks_group
...
@@ -190,12 +195,16 @@ module Pod
...
@@ -190,12 +195,16 @@ module Pod
#
#
def
add_embed_frameworks_script_phase
def
add_embed_frameworks_script_phase
native_targets_to_embed_in
.
each
do
|
native_target
|
native_targets_to_embed_in
.
each
do
|
native_target
|
phase
=
create_or_update_build_phase
(
native_target
,
EMBED_FRAMEWORK_PHASE_NAME
)
add_embed_frameworks_script_phase_to_target
(
native_target
)
script_path
=
target
.
embed_frameworks_script_relative_path
phase
.
shell_script
=
%("#{script_path}"\n)
end
end
end
end
def
add_embed_frameworks_script_phase_to_target
(
native_target
)
phase
=
create_or_update_build_phase
(
native_target
,
EMBED_FRAMEWORK_PHASE_NAME
)
script_path
=
target
.
embed_frameworks_script_relative_path
phase
.
shell_script
=
%("#{script_path}"\n)
end
# Delete a 'Embed Pods Frameworks' Copy Files Build Phase if present
# Delete a 'Embed Pods Frameworks' Copy Files Build Phase if present
#
#
# @param [PBXNativeTarget] native_target
# @param [PBXNativeTarget] native_target
...
...
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