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
61ddc073
Commit
61ddc073
authored
Apr 09, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Installer] Define deployment target of the Pods project.
Closes #556
parent
b2bb2869
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
83 additions
and
30 deletions
+83
-30
CHANGELOG.md
CHANGELOG.md
+2
-0
installer.rb
lib/cocoapods/installer.rb
+10
-3
Pods.xcodeproj.yaml
...ntegration/install_add_pod/after/Pods/Pods.xcodeproj.yaml
+4
-2
Pods.xcodeproj.yaml
...n/install_custom_workspace/after/Pods/Pods.xcodeproj.yaml
+4
-2
Pods.xcodeproj.yaml
...on/install_external_source/after/Pods/Pods.xcodeproj.yaml
+4
-2
Pods.xcodeproj.yaml
...ation/install_local_source/after/Pods/Pods.xcodeproj.yaml
+4
-2
Pods.xcodeproj.yaml
...n/install_multiple_targets/after/Pods/Pods.xcodeproj.yaml
+4
-2
Pods.xcodeproj.yaml
spec/integration/install_new/after/Pods/Pods.xcodeproj.yaml
+4
-2
Pods.xcodeproj.yaml
.../install_podfile_callbacks/after/Pods/Pods.xcodeproj.yaml
+4
-2
Pods.xcodeproj.yaml
...ntegration/install_podspec/after/Pods/Pods.xcodeproj.yaml
+4
-2
Pods.xcodeproj.yaml
...gration/install_remove_pod/after/Pods/Pods.xcodeproj.yaml
+4
-2
Pods.xcodeproj.yaml
...ion/install_spec_callbacks/after/Pods/Pods.xcodeproj.yaml
+4
-2
Pods.xcodeproj.yaml
...tegration/install_subspecs/after/Pods/Pods.xcodeproj.yaml
+6
-2
Pods.xcodeproj.yaml
spec/integration/update/after/Pods/Pods.xcodeproj.yaml
+4
-2
installer_spec.rb
spec/unit/installer_spec.rb
+21
-3
No files found.
CHANGELOG.md
View file @
61ddc073
...
...
@@ -5,6 +5,8 @@
*
CocoaPods now defines the
`COCOAPODS=1`
macro in the Pod and the Client
targets. This is useful for libraries which conditionally expose interfaces.
[
#903
](
https://github.com/CocoaPods/CocoaPods/issues/903
)
*
CocoaPods now defines the deployment target of the project.
[
#556
](
https://github.com/CocoaPods/CocoaPods/issues/556
)
###### Bug fixes
...
...
lib/cocoapods/installer.rb
View file @
61ddc073
...
...
@@ -55,9 +55,9 @@ module Pod
# @param [Lockfile] lockfile @see lockfile
#
def
initialize
(
sandbox
,
podfile
,
lockfile
=
nil
)
@sandbox
=
sandbox
@podfile
=
podfile
@lockfile
=
lockfile
@sandbox
=
sandbox
@podfile
=
podfile
@lockfile
=
lockfile
end
# @return [Bool] Whether the installer is in update mode. In update mode
...
...
@@ -276,6 +276,13 @@ module Pod
@pods_project
.
add_podfile
(
config
.
podfile_path
)
end
sandbox
.
project
=
@pods_project
platforms
=
libraries
.
map
(
&
:platform
)
osx_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:osx
}.
map
(
&
:deployment_target
).
min
ios_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:ios
}.
map
(
&
:deployment_target
).
min
@pods_project
.
build_configurations
.
each
do
|
build_configuration
|
build_configuration
.
build_settings
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
osx_deployment_target
.
to_s
if
osx_deployment_target
build_configuration
.
build_settings
[
'IPHONEOS_DEPLOYMENT_TARGET'
]
=
ios_deployment_target
.
to_s
if
ios_deployment_target
end
end
end
...
...
spec/integration/install_add_pod/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -96,6 +96,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
spec/integration/install_custom_workspace/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -163,6 +163,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
spec/integration/install_external_source/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -96,6 +96,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
4.3'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
4.3'
spec/integration/install_local_source/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -91,6 +91,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
4.3'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
4.3'
spec/integration/install_multiple_targets/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -240,6 +240,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
spec/integration/install_new/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -91,6 +91,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
spec/integration/install_podfile_callbacks/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -93,6 +93,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
spec/integration/install_podspec/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -91,6 +91,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
spec/integration/install_remove_pod/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -91,6 +91,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
spec/integration/install_spec_callbacks/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -95,6 +95,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
spec/integration/install_subspecs/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -170,6 +170,10 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
4.3'
MACOSX_DEPLOYMENT_TARGET
:
'
10.6'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
4.3'
MACOSX_DEPLOYMENT_TARGET
:
'
10.6'
spec/integration/update/after/Pods/Pods.xcodeproj.yaml
View file @
61ddc073
...
...
@@ -91,6 +91,8 @@ Targets:
Build Configurations
:
-
Release
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
-
Debug
:
Build Settings
:
{}
Build Settings
:
IPHONEOS_DEPLOYMENT_TARGET
:
'
6.0'
spec/unit/installer_spec.rb
View file @
61ddc073
...
...
@@ -205,16 +205,32 @@ module Pod
describe
"#prepare_pods_project"
do
it
"creates the Pods project"
do
@installer
.
stubs
(
:libraries
).
returns
([])
@installer
.
send
(
:prepare_pods_project
)
@installer
.
pods_project
.
class
.
should
==
Pod
::
Project
end
it
"adds the Podfile to the Pods project"
do
@installer
.
stubs
(
:libraries
).
returns
([])
config
.
podfile_path
.
stubs
(
:exist?
).
returns
(
true
)
@installer
.
send
(
:prepare_pods_project
)
f
=
@installer
.
pods_project
[
'Podfile'
]
f
.
name
.
should
==
'Podfile'
end
it
"sets the deployment target for the whole project"
do
library_ios
=
Library
.
new
(
nil
)
library_osx
=
Library
.
new
(
nil
)
library_ios
.
platform
=
Platform
.
new
(
:ios
,
'6.0'
)
library_osx
.
platform
=
Platform
.
new
(
:osx
,
'10.8'
)
@installer
.
stubs
(
:libraries
).
returns
([
library_ios
,
library_osx
])
@installer
.
send
(
:prepare_pods_project
)
build_settings
=
@installer
.
pods_project
.
build_configurations
.
map
(
&
:build_settings
)
build_settings
.
should
==
[
{
"MACOSX_DEPLOYMENT_TARGET"
=>
"10.8"
,
"IPHONEOS_DEPLOYMENT_TARGET"
=>
"6.0"
},
{
"MACOSX_DEPLOYMENT_TARGET"
=>
"10.8"
,
"IPHONEOS_DEPLOYMENT_TARGET"
=>
"6.0"
},
]
end
end
#--------------------------------------#
...
...
@@ -259,20 +275,22 @@ module Pod
describe
"#write_pod_project"
do
it
"sorts the main group"
do
before
do
@installer
.
stubs
(
:libraries
).
returns
([])
@installer
.
send
(
:prepare_pods_project
)
end
it
"sorts the main group"
do
@installer
.
pods_project
.
main_group
.
expects
(
:sort_by_type!
)
@installer
.
send
(
:write_pod_project
)
end
it
"sorts the frameworks group"
do
@installer
.
send
(
:prepare_pods_project
)
@installer
.
pods_project
[
'Frameworks'
].
expects
(
:sort_by_type!
)
@installer
.
send
(
:write_pod_project
)
end
it
"saves the project to the given path"
do
@installer
.
send
(
:prepare_pods_project
)
path
=
temporary_directory
+
'Pods/Pods.xcodeproj'
@installer
.
pods_project
.
expects
(
:save_as
).
with
(
path
)
@installer
.
send
(
:write_pod_project
)
...
...
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