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
1168e907
Commit
1168e907
authored
Feb 04, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TargetInstaller] Minor improvement to #add_files_to_build_phases.
parent
6b29904c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+6
-7
target_installer_spec.rb
spec/unit/installer/target_installer_spec.rb
+2
-3
No files found.
lib/cocoapods/installer/target_installer.rb
View file @
1168e907
...
@@ -91,10 +91,10 @@ module Pod
...
@@ -91,10 +91,10 @@ module Pod
library
.
target
=
@target
library
.
target
=
@target
end
end
# Adds the build files of the pods to the target and adds a refence to
# Adds the build files of the pods to the target and adds a refe
re
nce to
# the frameworks of the Pods.
# the frameworks of the Pods.
#
#
# @note The Frameworks are used only for presentation purpo
r
ses as the
# @note The Frameworks are used only for presentation purposes as the
# xcconfig is the authoritative source about their information.
# xcconfig is the authoritative source about their information.
#
#
# @return [void]
# @return [void]
...
@@ -102,15 +102,14 @@ module Pod
...
@@ -102,15 +102,14 @@ module Pod
def
add_files_to_build_phases
def
add_files_to_build_phases
UI
.
message
"- Adding Build files"
do
UI
.
message
"- Adding Build files"
do
library
.
file_accessors
.
each
do
|
file_accessor
|
library
.
file_accessors
.
each
do
|
file_accessor
|
UI
.
message
"-
#{
file_accessor
.
spec
}
"
file_accessor
.
source_files
.
each
do
|
source_file
|
file_reference
=
project
.
file_reference
(
source_file
,
file_accessor
.
spec_consumer
.
spec
.
name
)
consumer
=
file_accessor
.
spec_consumer
consumer
=
file_accessor
.
spec_consumer
flags
=
consumer
.
compiler_flags
.
dup
flags
=
consumer
.
compiler_flags
.
dup
flags
<<
'-fobjc-arc'
if
consumer
.
requires_arc
flags
<<
'-fobjc-arc'
if
consumer
.
requires_arc
flags
=
flags
*
" "
flags
=
flags
*
" "
target
.
add_file_references
([
file_reference
],
flags
)
source_files
=
file_accessor
.
source_files
end
file_refs
=
source_files
.
map
{
|
sf
|
project
.
file_reference
(
sf
)
}
target
.
add_file_references
(
file_refs
,
flags
)
file_accessor
.
spec_consumer
.
frameworks
.
each
do
|
framework
|
file_accessor
.
spec_consumer
.
frameworks
.
each
do
|
framework
|
framework_ref
=
project
.
add_system_framework
(
framework
,
target
)
framework_ref
=
project
.
add_system_framework
(
framework
,
target
)
end
end
...
...
spec/unit/installer/target_installer_spec.rb
View file @
1168e907
...
@@ -11,14 +11,13 @@ module Pod
...
@@ -11,14 +11,13 @@ module Pod
xcodeproj
'dummy'
xcodeproj
'dummy'
end
end
@target_definition
=
@podfile
.
target_definitions
[
:default
]
@target_definition
=
@podfile
.
target_definitions
[
:default
]
@project
=
Project
.
new
@project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
config
.
sandbox
.
project
=
@project
config
.
sandbox
.
project
=
@project
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
file_accessor
=
Sandbox
::
FileAccessor
.
new
(
path_list
,
@spec
.
consumer
(
:ios
))
file_accessor
=
Sandbox
::
FileAccessor
.
new
(
path_list
,
@spec
.
consumer
(
:ios
))
source_files
=
config
.
sandbox
.
relativize_paths
(
file_accessor
.
source_files
)
@project
.
add_file_references
(
file_accessor
.
source_files
,
'BananaLib'
,
@project
.
pods
)
@project
.
add_source_files
(
source_files
,
'BananaLib'
,
@project
.
pods
)
@library
=
Library
.
new
(
@target_definition
)
@library
=
Library
.
new
(
@target_definition
)
@library
.
platform
=
Platform
.
new
(
:ios
,
'6.0'
)
@library
.
platform
=
Platform
.
new
(
:ios
,
'6.0'
)
...
...
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