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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
pod_target.rb
lib/cocoapods/target/pod_target.rb
+11
-9
No files found.
lib/cocoapods/target/pod_target.rb
View file @
faab948e
...
...
@@ -88,28 +88,30 @@ module Pod
end
end
# The deployment target for the pod target, which is the maximum of all
# the deployment targets for the current platform of the target.
# @note The deployment target for the pod target is the maximum of all
# 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
@platform
||=
begin
platform_name
=
target_definitions
.
first
.
platform
.
name
default
=
Podfile
::
TargetDefinition
::
PLATFORM_DEFAULTS
[
platform_name
]
deployment_target
=
specs
.
map
do
|
spec
|
version
=
Pod
::
Version
.
new
(
spec
.
deployment_target
(
platform_name
)
||
default
)
if
platform_name
==
:ios
&&
requires_frameworks?
minimum
=
Version
.
new
(
'8.0'
)
version
=
[
version
,
minimum
].
max
end
version
Version
.
new
(
spec
.
deployment_target
(
platform_name
)
||
default
)
end
.
max
if
platform_name
==
:ios
&&
requires_frameworks?
minimum
=
Version
.
new
(
'8.0'
)
deployment_target
=
[
deployment_target
,
minimum
].
max
end
Platform
.
new
(
platform_name
,
deployment_target
)
end
end
# @visibility private
#
attr_writer
:platform
# @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