kishikawa katsumi 10 жил өмнө
parent
commit
ba8ba186d9

+ 2 - 2
.travis.yml

@@ -1,12 +1,12 @@
 language: objective-c
-osx_image: xcode7
+osx_image: xcode7.1
 cache:
   directories:
     - Lib/vendor/bundle
 install:
   - (cd Lib && bundle install --path=vendor/bundle --binstubs=vendor/bin)
 script:
-  - (cd Lib && bundle exec rake test:ios test:osx coverage:coveralls)
+  - (cd Lib && bundle exec rake test:ios test:tvos test:osx coverage:coveralls)
 branches:
   only:
     - master

+ 2 - 0
KeychainAccess.podspec

@@ -14,6 +14,7 @@ Pod::Spec.new do |s|
                            - **Support TouchID and Keychain integration (iOS 8+)**
                            - **Support Shared Web Credentials (iOS 8+)**
                            - Works on both iOS & OS X
+                           - watchOS and tvOS are also supported
                        DESC
   s.homepage         = "https://github.com/kishikawakatsumi/KeychainAccess"
   s.screenshots      = "https://raw.githubusercontent.com/kishikawakatsumi/KeychainAccess/master/Screenshots/01.png"
@@ -25,6 +26,7 @@ Pod::Spec.new do |s|
   s.ios.deployment_target = "8.0"
   s.osx.deployment_target = "10.9"
   s.watchos.deployment_target = '2.0'
+  s.tvos.deployment_target = '9.0'
   s.requires_arc = true
 
   s.source_files = 'Lib/KeychainAccess/*.swift'

+ 1 - 1
Lib/Gemfile.lock

@@ -3,7 +3,7 @@ GEM
   specs:
     rake (10.4.2)
     rouge (1.10.1)
-    xcjobs (0.2.1)
+    xcjobs (0.2.2)
     xcpretty (0.2.0)
       rouge (~> 1.8)
 

+ 222 - 9
Lib/KeychainAccess.xcodeproj/project.pbxproj

@@ -15,11 +15,17 @@
 		140F196F1A49D79500B0016A /* KeychainAccessTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 140F196E1A49D79500B0016A /* KeychainAccessTests.swift */; };
 		140F197B1A49D89200B0016A /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 140F197A1A49D89200B0016A /* Keychain.swift */; };
 		142852A71B1CED3500F27BD9 /* KeychainAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 140F19611A49D79400B0016A /* KeychainAccess.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		142EDA851BCB505F00A32149 /* ErrorTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142EDA841BCB505F00A32149 /* ErrorTypeTests.swift */; settings = {ASSET_TAGS = (); }; };
-		142EDA861BCB505F00A32149 /* ErrorTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142EDA841BCB505F00A32149 /* ErrorTypeTests.swift */; settings = {ASSET_TAGS = (); }; };
-		142EDB041BCBB0DD00A32149 /* SharedCredentialTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142EDB031BCBB0DD00A32149 /* SharedCredentialTests.swift */; settings = {ASSET_TAGS = (); }; };
-		148F9D4A1BCB4118006EDF48 /* EnumTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 148F9D491BCB4118006EDF48 /* EnumTests.swift */; settings = {ASSET_TAGS = (); }; };
-		148F9D4B1BCB4118006EDF48 /* EnumTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 148F9D491BCB4118006EDF48 /* EnumTests.swift */; settings = {ASSET_TAGS = (); }; };
+		142EDA851BCB505F00A32149 /* ErrorTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142EDA841BCB505F00A32149 /* ErrorTypeTests.swift */; };
+		142EDA861BCB505F00A32149 /* ErrorTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142EDA841BCB505F00A32149 /* ErrorTypeTests.swift */; };
+		142EDB041BCBB0DD00A32149 /* SharedCredentialTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142EDB031BCBB0DD00A32149 /* SharedCredentialTests.swift */; };
+		145EEB991BCBEBC0001341DE /* KeychainAccess.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145EEB8F1BCBEBC0001341DE /* KeychainAccess.framework */; };
+		145EEBA61BCBEC82001341DE /* KeychainAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 140F19611A49D79400B0016A /* KeychainAccess.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		145EEBA71BCBEC88001341DE /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 140F197A1A49D89200B0016A /* Keychain.swift */; };
+		145EEBAC1BCBEF3A001341DE /* KeychainAccessTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 140F196E1A49D79500B0016A /* KeychainAccessTests.swift */; };
+		145EEBAE1BCBEF3A001341DE /* EnumTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 148F9D491BCB4118006EDF48 /* EnumTests.swift */; };
+		145EEBAF1BCBEF3A001341DE /* ErrorTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142EDA841BCB505F00A32149 /* ErrorTypeTests.swift */; };
+		148F9D4A1BCB4118006EDF48 /* EnumTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 148F9D491BCB4118006EDF48 /* EnumTests.swift */; };
+		148F9D4B1BCB4118006EDF48 /* EnumTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 148F9D491BCB4118006EDF48 /* EnumTests.swift */; };
 		14FDD4681B49B9EF00C39FE8 /* KeychainAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 140F19611A49D79400B0016A /* KeychainAccess.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		14FDD4691B49BA0200C39FE8 /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 140F197A1A49D89200B0016A /* Keychain.swift */; };
 /* End PBXBuildFile section */
@@ -39,6 +45,13 @@
 			remoteGlobalIDString = 140F195B1A49D79400B0016A;
 			remoteInfo = KeychainAccess;
 		};
+		145EEB9A1BCBEBC0001341DE /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 140F19531A49D79400B0016A /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 145EEB8E1BCBEBC0001341DE;
+			remoteInfo = "KeychainAccess-tvOS";
+		};
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
@@ -53,6 +66,8 @@
 		140F197A1A49D89200B0016A /* Keychain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Keychain.swift; sourceTree = "<group>"; };
 		142EDA841BCB505F00A32149 /* ErrorTypeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorTypeTests.swift; sourceTree = "<group>"; };
 		142EDB031BCBB0DD00A32149 /* SharedCredentialTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharedCredentialTests.swift; sourceTree = "<group>"; };
+		145EEB8F1BCBEBC0001341DE /* KeychainAccess.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = KeychainAccess.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		145EEB981BCBEBC0001341DE /* KeychainAccess-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "KeychainAccess-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
 		148F9D491BCB4118006EDF48 /* EnumTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnumTests.swift; sourceTree = "<group>"; };
 		14FDD4601B49B9AD00C39FE8 /* KeychainAccess.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = KeychainAccess.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
@@ -88,6 +103,21 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		145EEB8B1BCBEBC0001341DE /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		145EEB951BCBEBC0001341DE /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				145EEB991BCBEBC0001341DE /* KeychainAccess.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		14FDD45C1B49B9AD00C39FE8 /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
@@ -115,6 +145,8 @@
 				140C8F0A1A4EBE3100F85556 /* KeychainAccess.framework */,
 				140C8F141A4EBE3100F85556 /* KeychainAccess-MacTests.xctest */,
 				14FDD4601B49B9AD00C39FE8 /* KeychainAccess.framework */,
+				145EEB8F1BCBEBC0001341DE /* KeychainAccess.framework */,
+				145EEB981BCBEBC0001341DE /* KeychainAccess-tvOSTests.xctest */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -141,9 +173,9 @@
 			isa = PBXGroup;
 			children = (
 				140F196E1A49D79500B0016A /* KeychainAccessTests.swift */,
-				142EDB031BCBB0DD00A32149 /* SharedCredentialTests.swift */,
 				148F9D491BCB4118006EDF48 /* EnumTests.swift */,
 				142EDA841BCB505F00A32149 /* ErrorTypeTests.swift */,
+				142EDB031BCBB0DD00A32149 /* SharedCredentialTests.swift */,
 				140F196C1A49D79500B0016A /* Supporting Files */,
 			);
 			path = KeychainAccessTests;
@@ -176,6 +208,14 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		145EEB8C1BCBEBC0001341DE /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				145EEBA61BCBEC82001341DE /* KeychainAccess.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		14FDD45D1B49B9AD00C39FE8 /* Headers */ = {
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
@@ -259,6 +299,42 @@
 			productReference = 140F19671A49D79500B0016A /* KeychainAccess-iOSTests.xctest */;
 			productType = "com.apple.product-type.bundle.unit-test";
 		};
+		145EEB8E1BCBEBC0001341DE /* KeychainAccess-tvOS */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 145EEBA41BCBEBC0001341DE /* Build configuration list for PBXNativeTarget "KeychainAccess-tvOS" */;
+			buildPhases = (
+				145EEB8A1BCBEBC0001341DE /* Sources */,
+				145EEB8B1BCBEBC0001341DE /* Frameworks */,
+				145EEB8C1BCBEBC0001341DE /* Headers */,
+				145EEB8D1BCBEBC0001341DE /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "KeychainAccess-tvOS";
+			productName = "KeychainAccess-tvOS";
+			productReference = 145EEB8F1BCBEBC0001341DE /* KeychainAccess.framework */;
+			productType = "com.apple.product-type.framework";
+		};
+		145EEB971BCBEBC0001341DE /* KeychainAccess-tvOSTests */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 145EEBA51BCBEBC0001341DE /* Build configuration list for PBXNativeTarget "KeychainAccess-tvOSTests" */;
+			buildPhases = (
+				145EEB941BCBEBC0001341DE /* Sources */,
+				145EEB951BCBEBC0001341DE /* Frameworks */,
+				145EEB961BCBEBC0001341DE /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				145EEB9B1BCBEBC0001341DE /* PBXTargetDependency */,
+			);
+			name = "KeychainAccess-tvOSTests";
+			productName = "KeychainAccess-tvOSTests";
+			productReference = 145EEB981BCBEBC0001341DE /* KeychainAccess-tvOSTests.xctest */;
+			productType = "com.apple.product-type.bundle.unit-test";
+		};
 		14FDD45F1B49B9AD00C39FE8 /* KeychainAccess-watchOS */ = {
 			isa = PBXNativeTarget;
 			buildConfigurationList = 14FDD4671B49B9AD00C39FE8 /* Build configuration list for PBXNativeTarget "KeychainAccess-watchOS" */;
@@ -283,7 +359,7 @@
 		140F19531A49D79400B0016A /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastSwiftUpdateCheck = 0700;
+				LastSwiftUpdateCheck = 0710;
 				LastUpgradeCheck = 0700;
 				ORGANIZATIONNAME = "kishikawa katsumi";
 				TargetAttributes = {
@@ -299,6 +375,12 @@
 					140F19661A49D79500B0016A = {
 						CreatedOnToolsVersion = 6.1.1;
 					};
+					145EEB8E1BCBEBC0001341DE = {
+						CreatedOnToolsVersion = 7.1;
+					};
+					145EEB971BCBEBC0001341DE = {
+						CreatedOnToolsVersion = 7.1;
+					};
 					14FDD45F1B49B9AD00C39FE8 = {
 						CreatedOnToolsVersion = 7.0;
 					};
@@ -321,6 +403,8 @@
 				140C8F091A4EBE3100F85556 /* KeychainAccess-Mac */,
 				140C8F131A4EBE3100F85556 /* KeychainAccess-MacTests */,
 				14FDD45F1B49B9AD00C39FE8 /* KeychainAccess-watchOS */,
+				145EEB8E1BCBEBC0001341DE /* KeychainAccess-tvOS */,
+				145EEB971BCBEBC0001341DE /* KeychainAccess-tvOSTests */,
 			);
 		};
 /* End PBXProject section */
@@ -354,6 +438,20 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		145EEB8D1BCBEBC0001341DE /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		145EEB961BCBEBC0001341DE /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		14FDD45E1B49B9AD00C39FE8 /* Resources */ = {
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -376,9 +474,9 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				140C8F241A4EBF9A00F85556 /* KeychainAccessTests.swift in Sources */,
 				148F9D4B1BCB4118006EDF48 /* EnumTests.swift in Sources */,
 				142EDA861BCB505F00A32149 /* ErrorTypeTests.swift in Sources */,
-				140C8F241A4EBF9A00F85556 /* KeychainAccessTests.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -394,13 +492,31 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				140F196F1A49D79500B0016A /* KeychainAccessTests.swift in Sources */,
 				148F9D4A1BCB4118006EDF48 /* EnumTests.swift in Sources */,
 				142EDA851BCB505F00A32149 /* ErrorTypeTests.swift in Sources */,
-				140F196F1A49D79500B0016A /* KeychainAccessTests.swift in Sources */,
 				142EDB041BCBB0DD00A32149 /* SharedCredentialTests.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		145EEB8A1BCBEBC0001341DE /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				145EEBA71BCBEC88001341DE /* Keychain.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		145EEB941BCBEBC0001341DE /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				145EEBAC1BCBEF3A001341DE /* KeychainAccessTests.swift in Sources */,
+				145EEBAE1BCBEF3A001341DE /* EnumTests.swift in Sources */,
+				145EEBAF1BCBEF3A001341DE /* ErrorTypeTests.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		14FDD45B1B49B9AD00C39FE8 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -422,6 +538,11 @@
 			target = 140F195B1A49D79400B0016A /* KeychainAccess-iOS */;
 			targetProxy = 140F19691A49D79500B0016A /* PBXContainerItemProxy */;
 		};
+		145EEB9B1BCBEBC0001341DE /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 145EEB8E1BCBEBC0001341DE /* KeychainAccess-tvOS */;
+			targetProxy = 145EEB9A1BCBEBC0001341DE /* PBXContainerItemProxy */;
+		};
 /* End PBXTargetDependency section */
 
 /* Begin XCBuildConfiguration section */
@@ -666,6 +787,80 @@
 			};
 			name = Release;
 		};
+		145EEBA01BCBEBC0001341DE /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				BITCODE_GENERATION_MODE = bitcode;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				DEFINES_MODULE = YES;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				GCC_NO_COMMON_BLOCKS = YES;
+				INFOPLIST_FILE = KeychainAccess/Info.plist;
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "com.kishikawakatsumi.$(PRODUCT_NAME:rfc1034identifier)";
+				PRODUCT_NAME = "$(PROJECT_NAME)";
+				SDKROOT = appletvos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = 3;
+				TVOS_DEPLOYMENT_TARGET = 9.0;
+			};
+			name = Debug;
+		};
+		145EEBA11BCBEBC0001341DE /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				BITCODE_GENERATION_MODE = bitcode;
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				DEFINES_MODULE = YES;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				GCC_NO_COMMON_BLOCKS = YES;
+				INFOPLIST_FILE = KeychainAccess/Info.plist;
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "com.kishikawakatsumi.$(PRODUCT_NAME:rfc1034identifier)";
+				PRODUCT_NAME = "$(PROJECT_NAME)";
+				SDKROOT = appletvos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = 3;
+				TVOS_DEPLOYMENT_TARGET = 9.0;
+			};
+			name = Release;
+		};
+		145EEBA21BCBEBC0001341DE /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				GCC_NO_COMMON_BLOCKS = YES;
+				INFOPLIST_FILE = KeychainAccessTests/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "com.kishikawakatsumi.KeychainAccess-tvOSTests";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SDKROOT = appletvos;
+				TVOS_DEPLOYMENT_TARGET = 9.0;
+			};
+			name = Debug;
+		};
+		145EEBA31BCBEBC0001341DE /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_NO_COMMON_BLOCKS = YES;
+				INFOPLIST_FILE = KeychainAccessTests/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "com.kishikawakatsumi.KeychainAccess-tvOSTests";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SDKROOT = appletvos;
+				TVOS_DEPLOYMENT_TARGET = 9.0;
+			};
+			name = Release;
+		};
 		14FDD4651B49B9AD00C39FE8 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -761,6 +956,24 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		145EEBA41BCBEBC0001341DE /* Build configuration list for PBXNativeTarget "KeychainAccess-tvOS" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				145EEBA01BCBEBC0001341DE /* Debug */,
+				145EEBA11BCBEBC0001341DE /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		145EEBA51BCBEBC0001341DE /* Build configuration list for PBXNativeTarget "KeychainAccess-tvOSTests" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				145EEBA21BCBEBC0001341DE /* Debug */,
+				145EEBA31BCBEBC0001341DE /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
 		14FDD4671B49B9AD00C39FE8 /* Build configuration list for PBXNativeTarget "KeychainAccess-watchOS" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (

+ 99 - 0
Lib/KeychainAccess.xcodeproj/xcshareddata/xcschemes/KeychainAccess-tvOS.xcscheme

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0710"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "145EEB8E1BCBEBC0001341DE"
+               BuildableName = "KeychainAccess.framework"
+               BlueprintName = "KeychainAccess-tvOS"
+               ReferencedContainer = "container:KeychainAccess.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "145EEB971BCBEBC0001341DE"
+               BuildableName = "KeychainAccess-tvOSTests.xctest"
+               BlueprintName = "KeychainAccess-tvOSTests"
+               ReferencedContainer = "container:KeychainAccess.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "145EEB8E1BCBEBC0001341DE"
+            BuildableName = "KeychainAccess.framework"
+            BlueprintName = "KeychainAccess-tvOS"
+            ReferencedContainer = "container:KeychainAccess.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "145EEB8E1BCBEBC0001341DE"
+            BuildableName = "KeychainAccess.framework"
+            BlueprintName = "KeychainAccess-tvOS"
+            ReferencedContainer = "container:KeychainAccess.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "145EEB8E1BCBEBC0001341DE"
+            BuildableName = "KeychainAccess.framework"
+            BlueprintName = "KeychainAccess-tvOS"
+            ReferencedContainer = "container:KeychainAccess.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 4 - 4
Lib/KeychainAccess/Keychain.swift

@@ -601,7 +601,7 @@ public class Keychain {
     
     public func removeAll() throws {
         var query = options.query()
-        #if !os(iOS) && !os(watchOS)
+        #if !os(iOS) && !os(watchOS) && !os(tvOS)
         query[MatchLimit] = MatchLimitAll
         #endif
         
@@ -670,7 +670,7 @@ public class Keychain {
         query[Class] = itemClass.rawValue
         query[MatchLimit] = MatchLimitAll
         query[ReturnAttributes] = true
-        #if os(iOS) || os(watchOS)
+        #if os(iOS) || os(watchOS) || os(tvOS)
         query[ReturnData] = true
         #endif
         
@@ -840,7 +840,7 @@ public class Keychain {
         var query = options.query()
         query[MatchLimit] = MatchLimitAll
         query[ReturnAttributes] = true
-        #if os(iOS)
+        #if os(iOS) || os(watchOS) || os(tvOS)
         query[ReturnData] = true
         #endif
         
@@ -998,7 +998,7 @@ extension Options {
         case .GenericPassword:
             query[AttributeService] = service
             // Access group is not supported on any simulators.
-            #if (!arch(i386) && !arch(x86_64)) || (!os(iOS) && !os(watchOS))
+            #if (!arch(i386) && !arch(x86_64)) || (!os(iOS) && !os(watchOS) && !os(tvOS))
             if let accessGroup = self.accessGroup {
                 query[AttributeAccessGroup] = accessGroup
             }

+ 37 - 3
Lib/Rakefile

@@ -14,12 +14,14 @@ def destinations
       'name=iPhone 6,OS=8.1',
       'name=iPhone 6 Plus,OS=8.1',
       'name=iPhone 6,OS=9.0',
-      'name=iPhone 6 Plus,OS=9.0'
+      'name=iPhone 6 Plus,OS=9.0',
+      'name=iPhone 6,OS=9.1',
+      'name=iPhone 6 Plus,OS=9.1'
     ]
   end
 end
 
-XCJobs::Build.new('build:simulator') do |t|
+XCJobs::Build.new('build:ios:simulator') do |t|
   t.project = 'KeychainAccess'
   t.scheme = 'KeychainAccess-iOS'
   t.sdk = 'iphonesimulator'
@@ -30,7 +32,7 @@ XCJobs::Build.new('build:simulator') do |t|
   t.add_build_setting('CODE_SIGNING_REQUIRED', 'NO')
 end
 
-XCJobs::Build.new('build:device') do |t|
+XCJobs::Build.new('build:ios:device') do |t|
   t.project = 'KeychainAccess'
   t.scheme = 'KeychainAccess-iOS'
   t.sdk = 'iphoneos'
@@ -41,6 +43,28 @@ XCJobs::Build.new('build:device') do |t|
   t.add_build_setting('CODE_SIGNING_REQUIRED', 'NO')
 end
 
+XCJobs::Build.new('build:tvos:simulator') do |t|
+  t.project = 'KeychainAccess'
+  t.scheme = 'KeychainAccess-tvOS'
+  t.sdk = 'appletvsimulator'
+  t.configuration = 'Release'
+  t.build_dir = 'build'
+  t.formatter = 'xcpretty -c'
+  t.add_build_setting('CODE_SIGN_IDENTITY', '')
+  t.add_build_setting('CODE_SIGNING_REQUIRED', 'NO')
+end
+
+XCJobs::Build.new('build:tvos:device') do |t|
+  t.project = 'KeychainAccess'
+  t.scheme = 'KeychainAccess-tvOS'
+  t.sdk = 'appletvos'
+  t.configuration = 'Release'
+  t.build_dir = 'build'
+  t.formatter = 'xcpretty -c'
+  t.add_build_setting('CODE_SIGN_IDENTITY', '')
+  t.add_build_setting('CODE_SIGNING_REQUIRED', 'NO')
+end
+
 XCJobs::Build.new('build:osx') do |t|
   t.project = 'KeychainAccess'
   t.scheme = 'KeychainAccess-Mac'
@@ -63,6 +87,16 @@ XCJobs::Test.new('test:ios') do |t|
   t.formatter = 'xcpretty -c'
 end
 
+XCJobs::Test.new('test:tvos') do |t|
+  t.project = 'KeychainAccess'
+  t.scheme = 'KeychainAccess-tvOS'
+  t.sdk = 'appletvsimulator'
+  t.configuration = 'Release'
+  t.coverage = true
+  t.build_dir = 'build'
+  t.formatter = 'xcpretty -c'
+end
+
 XCJobs::Test.new('test:osx') do |t|
   t.project = 'KeychainAccess'
   t.scheme = 'KeychainAccess-Mac'