Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,17 @@ script:
- ./Scripts/ci.sh
matrix:
include:
- osx_image: xcode11
- osx_image: xcode11.3
env: ACTION="swift-package";PLATFORMS="iOS_13,tvOS_13,macOS_10_15,watchOS_6";
- osx_image: xcode11
- osx_image: xcode11.3
env: ACTION="xcode";PLATFORMS="iOS_12,tvOS_12,watchOS_5";
- osx_image: xcode11.3
env: ACTION="xcode";PLATFORMS="iOS_11,tvOS_11,watchOS_4";
- osx_image: xcode11.3
env: ACTION="xcode";PLATFORMS="iOS_13,tvOS_13,macOS_10_15,watchOS_6";
- osx_image: xcode11
env: ACTION="carthage"

- osx_image: xcode10.2
env: ACTION="xcode";PLATFORMS="iOS_12,tvOS_12,macOS_10_14,watchOS_5";
- osx_image: xcode10.2
- osx_image: xcode11.3
env: ACTION="pod-lint";SWIFT_VERSION="5.0"
- osx_image: xcode10.2
env: ACTION="carthage"

- osx_image: xcode9
env: ACTION="xcode";PLATFORMS="iOS_11,tvOS_11,macOS_10_13,watchOS_4";
- osx_image: xcode9
env: ACTION="pod-lint";SWIFT_VERSION="4.0"
- osx_image: xcode9
- osx_image: xcode11.3
env: ACTION="carthage"

branches:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'https://rubygems.org' do
gem 'cocoapods', '~> 1.7.0'
gem 'cocoapods', '~> 1.8.0'
end
35 changes: 21 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,56 +1,63 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
CFPropertyList (3.0.1)
activesupport (4.2.11.1)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
algoliasearch (1.27.1)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.0.2)
cocoapods (1.7.0)
claide (1.0.3)
cocoapods (1.8.4)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.7.0)
cocoapods-core (= 1.8.4)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.3.1, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.2.0, < 3.0)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.8.2, < 2.0)
cocoapods-core (1.7.0)
xcodeproj (>= 1.11.1, < 2.0)
cocoapods-core (1.8.4)
activesupport (>= 4.0.2, < 6)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.2.2)
cocoapods-downloader (1.3.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.3.1)
cocoapods-trunk (1.4.1)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored2 (3.1.2)
concurrent-ruby (1.1.5)
escape (0.0.4)
fourflusher (2.2.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
minitest (5.11.3)
json (2.2.0)
minitest (5.13.0)
molinillo (0.6.6)
nanaimo (0.2.6)
nap (1.1.0)
Expand All @@ -59,7 +66,7 @@ GEM
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
xcodeproj (1.9.0)
xcodeproj (1.13.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -70,7 +77,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.7.0)!
cocoapods (~> 1.8.0)!

BUNDLED WITH
1.17.3
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ let package = Package(
name: "Valet",
dependencies: []),
],
swiftLanguageVersions: [.v4, .v4_2, .v5]
swiftLanguageVersions: [.v5]
)
let version = Version(3, 2, 7)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Valet guarantees it will never fail to write to or read from the keychain unless

## Requirements

* Xcode 9.0 or later. Earlier versions of Xcode require [Valet version 2.4.2](https://github.com/square/Valet/releases/tag/2.4.2).
* Xcode 11.0 or later. Xcode 10 and Xcode 9 require [Valet version 3.2.6](https://github.com/square/Valet/releases/tag/3.2.6). Earlier versions of Xcode require [Valet version 2.4.2](https://github.com/square/Valet/releases/tag/2.4.2).
* iOS 9 or later.
* tvOS 9 or later.
* watchOS 2 or later.
Expand Down
2 changes: 1 addition & 1 deletion Scripts/build.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ enum Platform: String, CustomStringConvertible {
var destination: String {
switch self {
case .iOS_11:
return "platform=iOS Simulator,OS=11.0,name=iPad Pro (12.9-inch) (2nd generation)"
return "platform=iOS Simulator,OS=11.0.1,name=iPad Pro (12.9-inch) (2nd generation)"
case .iOS_12:
return "platform=iOS Simulator,OS=12.2,name=iPad Pro (12.9-inch) (3rd generation)"
case .iOS_13:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extension SecureEnclaveIntegrationTests {
@available (*, deprecated)
func test_backwardsCompatibility_withLegacyValet()
{
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extension SinglePromptSecureEnclaveIntegrationTests {
@available (*, deprecated)
func test_backwardsCompatibility_withLegacyValet()
{
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SecureEnclaveIntegrationTests: XCTestCase

func test_secureEnclaveValetsWithEqualConfiguration_canAccessSameData()
{
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand All @@ -58,7 +58,7 @@ class SecureEnclaveIntegrationTests: XCTestCase

func test_secureEnclaveValetsWithDifferingAccessControl_canNotAccessSameData()
{
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand Down Expand Up @@ -142,7 +142,7 @@ class SecureEnclaveIntegrationTests: XCTestCase

func test_migrateObjectsFromValet_migratesSuccessfullyToSecureEnclave()
{
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand Down Expand Up @@ -178,7 +178,7 @@ class SecureEnclaveIntegrationTests: XCTestCase
}

func test_migrateObjectsFromValet_migratesSuccessfullyAfterCanAccessKeychainCalls() {
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SinglePromptSecureEnclaveIntegrationTests: XCTestCase

func test_SinglePromptSecureEnclaveValetsWithEqualConfiguration_canAccessSameData()
{
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand All @@ -58,7 +58,7 @@ class SinglePromptSecureEnclaveIntegrationTests: XCTestCase

func test_SinglePromptSecureEnclaveValetsWithDifferingAccessControl_canNotAccessSameData()
{
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand All @@ -73,7 +73,7 @@ class SinglePromptSecureEnclaveIntegrationTests: XCTestCase

func test_allKeys()
{
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand Down Expand Up @@ -164,7 +164,7 @@ class SinglePromptSecureEnclaveIntegrationTests: XCTestCase

func test_migrateObjectsFromValet_migratesSuccessfullyToSecureEnclave()
{
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand Down Expand Up @@ -200,7 +200,7 @@ class SinglePromptSecureEnclaveIntegrationTests: XCTestCase
}

func test_migrateObjectsFromValet_migratesSuccessfullyAfterCanAccessKeychainCalls() {
guard testEnvironmentIsSigned() else {
guard testEnvironmentIsSigned() && testEnvironmentSupportsWhenPasscodeSet() else {
return
}

Expand Down
10 changes: 9 additions & 1 deletion Tests/ValetIntegrationTests/ValetIntegrationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,19 @@ func testEnvironmentIsSigned() -> Bool {
return false
}

return true
}

func testEnvironmentSupportsWhenPasscodeSet() -> Bool {
if let simulatorVersionInfo = ProcessInfo.processInfo.environment["SIMULATOR_VERSION_INFO"],
simulatorVersionInfo.contains("iOS 13") || simulatorVersionInfo.contains("tvOS 13")
{
// Xcode 11's simulator does not support code-signing.
// iOS and tvOS 13 simulators fail to store items in a Valet that has a
// kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly flag. The documentation for this flag says:
// "No items can be stored in this class on devices without a passcode". I currently do not
// understand why prior simulators work with this flag, given that no simulators have a passcode.
return false

} else {
return true
}
Expand Down
2 changes: 1 addition & 1 deletion Valet.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/square/Valet'
s.authors = 'Square'
s.source = { :git => 'https://github.com/square/Valet.git', :tag => s.version }
s.swift_version = '4.0', '4.1', '4.2', '5.0'
s.swift_version = '5.0'
s.source_files = 'Sources/Valet/**/*.{swift,h}'
s.public_header_files = 'Sources/Valet/*.h'
s.frameworks = 'Security'
Expand Down
4 changes: 2 additions & 2 deletions Valet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2553,7 +2553,7 @@
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.squareup.Valet;
PRODUCT_NAME = Valet;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand Down Expand Up @@ -2607,7 +2607,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.squareup.Valet;
PRODUCT_NAME = Valet;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
Expand Down