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
9d841f52
Commit
9d841f52
authored
Mar 07, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Validator] Allows Swift pods to have a deployment target under iOS 8.0 if they use XCTest.
parent
86424fc3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
CHANGELOG.md
CHANGELOG.md
+7
-0
validator.rb
lib/cocoapods/validator.rb
+2
-1
validator_spec.rb
spec/unit/validator_spec.rb
+7
-0
No files found.
CHANGELOG.md
View file @
9d841f52
...
@@ -6,6 +6,13 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -6,6 +6,13 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
## Master
## Master
##### Enhancements
*
Allows Swift pods to have a deployment target under iOS 8.0 if they use
XCTest.
[
Samuel Giddins
](
https://github.com/segiddins
)
[
#3225
](
https://github.com/CocoaPods/CocoaPods/issues/3225
)
##### Bug Fixes
##### Bug Fixes
*
Correctly filter Xcode warnings about the use of dynamic frameworks.
*
Correctly filter Xcode warnings about the use of dynamic frameworks.
...
...
lib/cocoapods/validator.rb
View file @
9d841f52
...
@@ -313,7 +313,8 @@ module Pod
...
@@ -313,7 +313,8 @@ module Pod
file_accessors
=
installer
.
aggregate_targets
.
map
do
|
target
|
file_accessors
=
installer
.
aggregate_targets
.
map
do
|
target
|
if
target
.
pod_targets
.
any?
(
&
:uses_swift?
)
&&
consumer
.
platform_name
==
:ios
&&
if
target
.
pod_targets
.
any?
(
&
:uses_swift?
)
&&
consumer
.
platform_name
==
:ios
&&
(
deployment_target
.
nil?
||
Version
.
new
(
deployment_target
).
major
<
8
)
(
deployment_target
.
nil?
||
Version
.
new
(
deployment_target
).
major
<
8
)
error
(
'swift'
,
'Swift support uses dynamic frameworks and is therefore only supported on iOS > 8.'
)
uses_xctest
=
target
.
spec_consumers
.
any?
{
|
c
|
(
c
.
frameworks
+
c
.
weak_frameworks
).
include?
'XCTest'
}
error
(
'swift'
,
'Swift support uses dynamic frameworks and is therefore only supported on iOS > 8.'
)
unless
uses_xctest
end
end
target
.
pod_targets
.
map
(
&
:file_accessors
)
target
.
pod_targets
.
map
(
&
:file_accessors
)
...
...
spec/unit/validator_spec.rb
View file @
9d841f52
...
@@ -523,6 +523,13 @@ module Pod
...
@@ -523,6 +523,13 @@ module Pod
validator
.
result_type
.
should
==
:error
validator
.
result_type
.
should
==
:error
end
end
it
'succeeds on deployment target < iOS 8 for Swift Pods using XCTest'
do
Specification
::
Consumer
.
any_instance
.
stubs
(
:frameworks
).
returns
(
%w(XCTest)
)
validator
=
test_swiftpod
validator
.
results
.
count
.
should
==
0
end
it
'succeeds on deployment targets >= iOS 8 for Swift Pods'
do
it
'succeeds on deployment targets >= iOS 8 for Swift Pods'
do
Specification
.
any_instance
.
stubs
(
:deployment_target
).
returns
(
'9.0'
)
Specification
.
any_instance
.
stubs
(
:deployment_target
).
returns
(
'9.0'
)
...
...
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