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
a06624b3
Commit
a06624b3
authored
Oct 11, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the installer work with the refactored Xcode::Project.
parent
ffefba98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
installer.rb
lib/cocoapods/installer.rb
+4
-4
project.rb
lib/cocoapods/xcode/project.rb
+6
-1
project_spec.rb
spec/unit/xcode/project_spec.rb
+2
-2
No files found.
lib/cocoapods/installer.rb
View file @
a06624b3
...
@@ -52,19 +52,19 @@ module Pod
...
@@ -52,19 +52,19 @@ module Pod
build_specification_sets
.
each
do
|
set
|
build_specification_sets
.
each
do
|
set
|
spec
=
set
.
specification
spec
=
set
.
specification
xcconfig
.
merge!
(
spec
.
xcconfig
)
xcconfig
.
merge!
(
spec
.
xcconfig
)
xcodeproj
.
ad
d_group
(
spec
.
name
)
group
=
xcodeproj
.
add_po
d_group
(
spec
.
name
)
# Only add implementation files to the compile phase
# Only add implementation files to the compile phase
spec
.
implementation_files
.
each
do
|
file
|
spec
.
implementation_files
.
each
do
|
file
|
xcodeproj
.
add_source_file
(
file
,
spec
.
nam
e
,
nil
,
spec
.
compiler_flags
)
group
.
add_source_file
(
fil
e
,
nil
,
spec
.
compiler_flags
)
end
end
# Add header files to a `copy header build phase` for each destination
# Add header files to a `copy header build phase` for each destination
# directory in the pod's header directory.
# directory in the pod's header directory.
set
.
specification
.
copy_header_mappings
.
each
do
|
header_dir
,
files
|
set
.
specification
.
copy_header_mappings
.
each
do
|
header_dir
,
files
|
copy_phase
_uuid
=
xcodeproj
.
add_copy_header_build_phase
(
spec
.
name
,
header_dir
)
copy_phase
=
xcodeproj
.
add_copy_header_build_phase
(
spec
.
name
,
header_dir
)
files
.
each
do
|
file
|
files
.
each
do
|
file
|
xcodeproj
.
add_source_file
(
file
,
spec
.
name
,
copy_phase_uuid
)
group
.
add_source_file
(
file
,
copy_phase
)
end
end
end
end
...
...
lib/cocoapods/xcode/project.rb
View file @
a06624b3
...
@@ -130,6 +130,11 @@ module Pod
...
@@ -130,6 +130,11 @@ module Pod
alias_method
:file_uuids
,
:files
alias_method
:file_uuids
,
:files
alias_method
:file_uuids
=
,
:files
=
alias_method
:file_uuids
=
,
:files
=
def
initialize
(
project
,
uuid
,
attributes
)
super
self
.
file_uuids
||=
[]
end
def
files
def
files
list_by_class
(
file_uuids
,
PBXBuildFile
)
list_by_class
(
file_uuids
,
PBXBuildFile
)
end
end
...
@@ -307,7 +312,7 @@ module Pod
...
@@ -307,7 +312,7 @@ module Pod
"runOnlyForDeploymentPostprocessing"
=>
"0"
,
"runOnlyForDeploymentPostprocessing"
=>
"0"
,
})
})
targets
.
first
.
buildPhases
<<
phase
targets
.
first
.
buildPhases
<<
phase
phase
.
uuid
phase
end
end
# A silly hack to pretty print the objects hash from MacRuby.
# A silly hack to pretty print the objects hash from MacRuby.
...
...
spec/unit/xcode/project_spec.rb
View file @
a06624b3
...
@@ -144,14 +144,14 @@ describe "Pod::Xcode::Project" do
...
@@ -144,14 +144,14 @@ describe "Pod::Xcode::Project" do
end
end
it
"creates a copy build header phase which will copy headers to a specified path"
do
it
"creates a copy build header phase which will copy headers to a specified path"
do
phase
_uuid
=
@project
.
add_copy_header_build_phase
(
"SomePod"
,
"Path/To/Source"
)
phase
=
@project
.
add_copy_header_build_phase
(
"SomePod"
,
"Path/To/Source"
)
find_object
({
find_object
({
'isa'
=>
'PBXCopyFilesBuildPhase'
,
'isa'
=>
'PBXCopyFilesBuildPhase'
,
'dstPath'
=>
'$(PUBLIC_HEADERS_FOLDER_PATH)/Path/To/Source'
,
'dstPath'
=>
'$(PUBLIC_HEADERS_FOLDER_PATH)/Path/To/Source'
,
'name'
=>
'Copy SomePod Public Headers'
'name'
=>
'Copy SomePod Public Headers'
}).
should
.
not
==
nil
}).
should
.
not
==
nil
target
=
@project
.
targets
.
first
target
=
@project
.
targets
.
first
target
.
attributes
[
'buildPhases'
].
should
.
include
phase
_
uuid
target
.
attributes
[
'buildPhases'
].
should
.
include
phase
.
uuid
end
end
it
"adds a `h' file as a build file and adds it to the `headers build' phase list"
do
it
"adds a `h' file as a build file and adds it to the `headers build' phase list"
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