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
210c8a68
Commit
210c8a68
authored
Apr 27, 2015
by
Boris Bügling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use user project's object version for pods project
parent
7e2faef5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
5 deletions
+20
-5
Gemfile.lock
Gemfile.lock
+1
-1
installer.rb
lib/cocoapods/installer.rb
+9
-1
project.rb
lib/cocoapods/project.rb
+5
-2
installer_spec.rb
spec/unit/installer_spec.rb
+5
-1
No files found.
Gemfile.lock
View file @
210c8a68
...
@@ -24,7 +24,7 @@ GIT
...
@@ -24,7 +24,7 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
remote: https://github.com/CocoaPods/Xcodeproj.git
revision:
6dbb3c73e5d0de6a2c171da0cabd90a5c4d20c09
revision:
7c37e41dafa5f6394900dab19eac9cc6580a9718
branch: master
branch: master
specs:
specs:
xcodeproj (0.24.0)
xcodeproj (0.24.0)
...
...
lib/cocoapods/installer.rb
View file @
210c8a68
...
@@ -444,7 +444,15 @@ module Pod
...
@@ -444,7 +444,15 @@ module Pod
#
#
def
prepare_pods_project
def
prepare_pods_project
UI
.
message
'- Creating Pods project'
do
UI
.
message
'- Creating Pods project'
do
@pods_project
=
Pod
::
Project
.
new
(
sandbox
.
project_path
)
object_version
=
aggregate_targets
.
map
(
&
:user_project_path
).
compact
.
map
do
|
path
|
Xcodeproj
::
Project
.
open
(
path
)
end
.
map
(
&
:object_version
).
map
(
&
:to_i
).
sort
.
first
if
object_version
@pods_project
=
Pod
::
Project
.
new
(
sandbox
.
project_path
,
false
,
object_version
)
else
@pods_project
=
Pod
::
Project
.
new
(
sandbox
.
project_path
)
end
analysis_result
.
all_user_build_configurations
.
each
do
|
name
,
type
|
analysis_result
.
all_user_build_configurations
.
each
do
|
name
,
type
|
@pods_project
.
add_build_configuration
(
name
,
type
)
@pods_project
.
add_build_configuration
(
name
,
type
)
...
...
lib/cocoapods/project.rb
View file @
210c8a68
...
@@ -10,9 +10,12 @@ module Pod
...
@@ -10,9 +10,12 @@ module Pod
# @param [Pathname, String] path @see path
# @param [Pathname, String] path @see path
# @param [Bool] skip_initialization
# @param [Bool] skip_initialization
# Whether the project should be initialized from scratch.
# Whether the project should be initialized from scratch.
# @param [Int] object_version
# Object version to use for serialization, defaults to Xcode 3.2 compatible.
#
#
def
initialize
(
path
,
skip_initialization
=
false
)
def
initialize
(
path
,
skip_initialization
=
false
,
super
(
path
,
skip_initialization
)
object_version
=
Xcodeproj
::
Constants
::
DEFAULT_OBJECT_VERSION
)
super
(
path
,
skip_initialization
,
object_version
)
@support_files_group
=
new_group
(
'Targets Support Files'
)
@support_files_group
=
new_group
(
'Targets Support Files'
)
@refs_by_absolute_path
=
{}
@refs_by_absolute_path
=
{}
@pods
=
new_group
(
'Pods'
)
@pods
=
new_group
(
'Pods'
)
...
...
spec/unit/installer_spec.rb
View file @
210c8a68
...
@@ -440,7 +440,11 @@ module Pod
...
@@ -440,7 +440,11 @@ module Pod
pod_target_osx
=
PodTarget
.
new
([],
nil
,
config
.
sandbox
)
pod_target_osx
=
PodTarget
.
new
([],
nil
,
config
.
sandbox
)
pod_target_ios
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
pod_target_ios
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
pod_target_osx
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:osx
,
'10.8'
))
pod_target_osx
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:osx
,
'10.8'
))
@installer
.
stubs
(
:aggregate_targets
).
returns
([
pod_target_ios
,
pod_target_osx
])
aggregate_target_ios
=
AggregateTarget
.
new
(
nil
,
config
.
sandbox
)
aggregate_target_osx
=
AggregateTarget
.
new
(
nil
,
config
.
sandbox
)
aggregate_target_ios
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
aggregate_target_osx
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:osx
,
'10.8'
))
@installer
.
stubs
(
:aggregate_targets
).
returns
([
aggregate_target_ios
,
aggregate_target_osx
])
@installer
.
stubs
(
:pod_targets
).
returns
([])
@installer
.
stubs
(
:pod_targets
).
returns
([])
@installer
.
send
(
:prepare_pods_project
)
@installer
.
send
(
:prepare_pods_project
)
build_settings
=
@installer
.
pods_project
.
build_configurations
.
map
(
&
:build_settings
)
build_settings
=
@installer
.
pods_project
.
build_configurations
.
map
(
&
:build_settings
)
...
...
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