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
76b5b7f9
Commit
76b5b7f9
authored
Jan 29, 2013
by
Daniel Rodríguez Troitiño
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate Pods target in Mac OS X with the specified deployment target.
Fix #757
parent
c37de717
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
platform.rb
lib/cocoapods/platform.rb
+7
-0
project.rb
lib/cocoapods/project.rb
+2
-3
project_spec.rb
spec/unit/project_spec.rb
+16
-0
No files found.
lib/cocoapods/platform.rb
View file @
76b5b7f9
...
...
@@ -116,5 +116,12 @@ module Pod
def
requires_legacy_ios_archs?
(
name
==
:ios
)
&&
deployment_target
&&
(
deployment_target
<
Version
.
new
(
"4.3"
))
end
def
deployment_target_setting_name
case
@symbolic_name
when
:ios
then
'IPHONEOS_DEPLOYMENT_TARGET'
when
:osx
then
'MACOSX_DEPLOYMENT_TARGET'
end
end
end
end
lib/cocoapods/project.rb
View file @
76b5b7f9
...
...
@@ -63,9 +63,8 @@ module Pod
settings
[
'ARCHS'
]
=
"armv6 armv7"
end
if
platform
==
:ios
&&
platform
.
deployment_target
# TODO: add for osx as well
settings
[
'IPHONEOS_DEPLOYMENT_TARGET'
]
=
platform
.
deployment_target
.
to_s
if
platform
.
deployment_target
settings
[
platform
.
deployment_target_setting_name
]
=
platform
.
deployment_target
.
to_s
end
target
.
build_settings
(
'Debug'
).
merge!
(
settings
)
...
...
spec/unit/project_spec.rb
View file @
76b5b7f9
...
...
@@ -90,4 +90,20 @@ describe 'Pod::Project' do
target
.
build_settings
(
'Release'
)[
"IPHONEOS_DEPLOYMENT_TARGET"
].
should
==
"4.0"
end
end
describe
"concerning its :osx targets with a deployment target"
do
before
do
@project
=
Pod
::
Project
.
new
end
it
"sets MACOSX_DEPLOYMENT_TARGET for both configurations"
do
target
=
@project
.
add_pod_target
(
'Pods'
,
Pod
::
Platform
.
new
(
:osx
))
target
.
build_settings
(
'Debug'
)[
"MACOSX_DEPLOYMENT_TARGET"
].
should
==
"10.7"
target
.
build_settings
(
'Release'
)[
"MACOSX_DEPLOYMENT_TARGET"
].
should
==
"10.7"
target
=
@project
.
add_pod_target
(
'Pods'
,
Pod
::
Platform
.
new
(
:osx
,
:deployment_target
=>
"10.6"
))
target
.
build_settings
(
'Debug'
)[
"MACOSX_DEPLOYMENT_TARGET"
].
should
==
"10.6"
target
.
build_settings
(
'Release'
)[
"MACOSX_DEPLOYMENT_TARGET"
].
should
==
"10.6"
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