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
faab948e
Commit
faab948e
authored
Nov 30, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PodTarget] Refactor #platform & document
parent
3198bde0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
pod_target.rb
lib/cocoapods/target/pod_target.rb
+9
-7
No files found.
lib/cocoapods/target/pod_target.rb
View file @
faab948e
...
@@ -88,28 +88,30 @@ module Pod
...
@@ -88,28 +88,30 @@ module Pod
end
end
end
end
# The deployment target for the pod target, which is the maximum of all
# @note The deployment target for the pod target is the maximum of all
# the deployment targets for the current platform of the target.
# the deployment targets for the current platform of the target
# (or the minimum required to support the current installation
# strategy, if higher).
#
#
# @return [
String] The deployment
target.
# @return [
Platform] the platform for this
target.
#
#
def
platform
def
platform
@platform
||=
begin
@platform
||=
begin
platform_name
=
target_definitions
.
first
.
platform
.
name
platform_name
=
target_definitions
.
first
.
platform
.
name
default
=
Podfile
::
TargetDefinition
::
PLATFORM_DEFAULTS
[
platform_name
]
default
=
Podfile
::
TargetDefinition
::
PLATFORM_DEFAULTS
[
platform_name
]
deployment_target
=
specs
.
map
do
|
spec
|
deployment_target
=
specs
.
map
do
|
spec
|
version
=
Pod
::
Version
.
new
(
spec
.
deployment_target
(
platform_name
)
||
default
)
Version
.
new
(
spec
.
deployment_target
(
platform_name
)
||
default
)
end
.
max
if
platform_name
==
:ios
&&
requires_frameworks?
if
platform_name
==
:ios
&&
requires_frameworks?
minimum
=
Version
.
new
(
'8.0'
)
minimum
=
Version
.
new
(
'8.0'
)
version
=
[
version
,
minimum
].
max
deployment_target
=
[
deployment_target
,
minimum
].
max
end
end
version
end
.
max
Platform
.
new
(
platform_name
,
deployment_target
)
Platform
.
new
(
platform_name
,
deployment_target
)
end
end
end
end
# @visibility private
# @visibility private
#
attr_writer
:platform
attr_writer
:platform
# @return [Podfile] The podfile which declares the dependency.
# @return [Podfile] The podfile which declares the dependency.
...
...
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