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
271f9e7b
Commit
271f9e7b
authored
Sep 07, 2015
by
Marius Rackwitz
Committed by
Samuel Giddins
Oct 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Installer] Integrate the aggregate target as static
Even with 'use_frameworks!'.
parent
0e8ebf0a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
aggregate_target_installer.rb
.../installer/target_installer/aggregate_target_installer.rb
+1
-0
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+2
-8
aggregate_target_installer_spec.rb
...aller/target_installer/aggregate_target_installer_spec.rb
+7
-0
target_integrator_spec.rb
...staller/user_project_integrator/target_integrator_spec.rb
+0
-1
No files found.
lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
View file @
271f9e7b
...
@@ -47,6 +47,7 @@ module Pod
...
@@ -47,6 +47,7 @@ module Pod
'OTHER_LIBTOOLFLAGS'
=>
''
,
'OTHER_LIBTOOLFLAGS'
=>
''
,
'PODS_ROOT'
=>
'$(SRCROOT)'
,
'PODS_ROOT'
=>
'$(SRCROOT)'
,
'SKIP_INSTALL'
=>
'YES'
,
'SKIP_INSTALL'
=>
'YES'
,
'MACH_O_TYPE'
=>
'staticlib'
,
}
}
super
.
merge
(
settings
)
super
.
merge
(
settings
)
end
end
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
271f9e7b
...
@@ -44,6 +44,7 @@ module Pod
...
@@ -44,6 +44,7 @@ module Pod
update_to_cocoapods_0_34
,
update_to_cocoapods_0_34
,
update_to_cocoapods_0_37_1
,
update_to_cocoapods_0_37_1
,
update_to_cocoapods_0_39
,
update_to_cocoapods_0_39
,
update_to_cocoapods_0_40
,
unless
native_targets_to_integrate
.
empty?
unless
native_targets_to_integrate
.
empty?
add_pods_library
add_pods_library
add_embed_frameworks_script_phase
add_embed_frameworks_script_phase
...
@@ -161,15 +162,8 @@ module Pod
...
@@ -161,15 +162,8 @@ module Pod
target_basename
=
target
.
product_basename
target_basename
=
target
.
product_basename
new_product_ref
=
frameworks
.
files
.
find
{
|
f
|
f
.
path
==
target
.
product_name
}
||
new_product_ref
=
frameworks
.
files
.
find
{
|
f
|
f
.
path
==
target
.
product_name
}
||
frameworks
.
new_product_ref_for_target
(
target_basename
,
target
.
product_type
)
frameworks
.
new_product_ref_for_target
(
target_basename
,
target
.
product_type
)
build_
file
=
build_
phase
.
build_file
(
new_product_ref
)
||
build_phase
.
build_file
(
new_product_ref
)
||
build_phase
.
add_file_reference
(
new_product_ref
,
true
)
build_phase
.
add_file_reference
(
new_product_ref
,
true
)
if
target
.
requires_frameworks?
# Weak link the aggregate target's product, because as it contains
# no symbols, it isn't copied into the app bundle. dyld will so
# never try to find the missing executable at runtime.
build_file
.
settings
||=
{}
build_file
.
settings
[
'ATTRIBUTES'
]
=
[
'Weak'
]
end
end
end
end
end
...
...
spec/unit/installer/target_installer/aggregate_target_installer_spec.rb
View file @
271f9e7b
...
@@ -101,6 +101,13 @@ module Pod
...
@@ -101,6 +101,13 @@ module Pod
end
end
end
end
it
'will be built as static library'
do
@installer
.
install!
@installer
.
target
.
native_target
.
build_configurations
.
each
do
|
config
|
config
.
build_settings
[
'MACH_O_TYPE'
].
should
==
'staticlib'
end
end
it
'will be skipped when installing'
do
it
'will be skipped when installing'
do
@installer
.
install!
@installer
.
install!
@installer
.
target
.
native_target
.
build_configurations
.
each
do
|
config
|
@installer
.
target
.
native_target
.
build_configurations
.
each
do
|
config
|
...
...
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
271f9e7b
...
@@ -73,7 +73,6 @@ module Pod
...
@@ -73,7 +73,6 @@ module Pod
phase
=
target
.
frameworks_build_phase
phase
=
target
.
frameworks_build_phase
build_file
=
phase
.
files
.
find
{
|
f
|
f
.
file_ref
.
path
==
'Pods.framework'
}
build_file
=
phase
.
files
.
find
{
|
f
|
f
.
file_ref
.
path
==
'Pods.framework'
}
build_file
.
should
.
not
.
be
.
nil
build_file
.
should
.
not
.
be
.
nil
build_file
.
settings
[
'ATTRIBUTES'
].
should
==
%w(Weak)
end
end
it
'adds a Copy Pods Resources build phase to each target'
do
it
'adds a Copy Pods Resources build phase to each target'
do
...
...
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