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
6cc8ec58
Commit
6cc8ec58
authored
Apr 28, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3469 from CocoaPods/use-user-object-version-for-pods
Use user project's object version for pods project
parents
3395336a
c3981ad0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
4 deletions
+40
-4
CHANGELOG.md
CHANGELOG.md
+4
-0
Gemfile.lock
Gemfile.lock
+1
-1
installer.rb
lib/cocoapods/installer.rb
+8
-0
project.rb
lib/cocoapods/project.rb
+5
-2
installer_spec.rb
spec/unit/installer_spec.rb
+22
-1
No files found.
CHANGELOG.md
View file @
6cc8ec58
...
@@ -13,6 +13,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -13,6 +13,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Andrea Mazzini
](
https://github.com/andreamazz
)
[
Andrea Mazzini
](
https://github.com/andreamazz
)
[
#3364
](
https://github.com/CocoaPods/CocoaPods/issues/3364
)
[
#3364
](
https://github.com/CocoaPods/CocoaPods/issues/3364
)
*
Use user project's object version for pods project.
[
Boris Bügling
](
https://github.com/neonichu
)
[
#253
](
https://github.com/CocoaPods/Xcodeproj/issues/253
)
##### Bug Fixes
##### Bug Fixes
*
Adding
`$(inherited)`
to
`FRAMEWORK_SEARCH_PATHS`
build setting in xcconfig for aggregate.
*
Adding
`$(inherited)`
to
`FRAMEWORK_SEARCH_PATHS`
build setting in xcconfig for aggregate.
...
...
Gemfile.lock
View file @
6cc8ec58
...
@@ -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 @
6cc8ec58
...
@@ -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
object_version
=
aggregate_targets
.
map
(
&
:user_project_path
).
compact
.
map
do
|
path
|
Xcodeproj
::
Project
.
open
(
path
).
object_version
.
to_i
end
.
min
if
object_version
@pods_project
=
Pod
::
Project
.
new
(
sandbox
.
project_path
,
false
,
object_version
)
else
@pods_project
=
Pod
::
Project
.
new
(
sandbox
.
project_path
)
@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 @
6cc8ec58
...
@@ -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 @
6cc8ec58
...
@@ -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
)
...
@@ -585,6 +589,23 @@ module Pod
...
@@ -585,6 +589,23 @@ module Pod
@installer
.
pods_project
.
expects
(
:save
)
@installer
.
pods_project
.
expects
(
:save
)
@installer
.
send
(
:write_pod_project
)
@installer
.
send
(
:write_pod_project
)
end
end
it
"uses the user project's object version for the pods project"
do
tmp_directory
=
Pathname
(
Dir
.
tmpdir
)
+
'CocoaPods'
FileUtils
.
mkdir_p
(
tmp_directory
)
proj
=
Xcodeproj
::
Project
.
new
(
tmp_directory
+
'Yolo.xcodeproj'
,
false
,
1
)
proj
.
save
aggregate_target
=
AggregateTarget
.
new
(
nil
,
config
.
sandbox
)
aggregate_target
.
stubs
(
:platform
).
returns
(
Platform
.
new
(
:ios
,
'6.0'
))
aggregate_target
.
stubs
(
:user_project_path
).
returns
(
proj
.
path
)
@installer
.
stubs
(
:aggregate_targets
).
returns
([
aggregate_target
])
@installer
.
send
(
:prepare_pods_project
)
@installer
.
pods_project
.
object_version
.
should
==
'1'
FileUtils
.
rm_rf
(
tmp_directory
)
end
end
end
#--------------------------------------#
#--------------------------------------#
...
...
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