diff --git a/Readme.markdown b/Readme.markdown index 5216cbc..46c73a3 100644 --- a/Readme.markdown +++ b/Readme.markdown @@ -1,33 +1,33 @@ -# SSKeychain +# SAMKeychain -SSKeychain is a simple wrapper for accessing accounts, getting passwords, setting passwords, and deleting passwords using the system Keychain on Mac OS X and iOS. +SAMKeychain is a simple wrapper for accessing accounts, getting passwords, setting passwords, and deleting passwords using the system Keychain on Mac OS X and iOS. ## Adding to Your Project Simply add the following to your Podfile if you're using CocoaPods: ``` ruby -pod 'SSKeychain' +pod 'SAMKeychain' ``` or Cartfile if you're using Carthage: ``` -github "soffes/SSKeychain" +github "soffes/SAMKeychain" ``` To manually add to your project: 1. Add `Security.framework` to your target -2. Add `SSKeychain.h`, `SSKeychain.m`, `SSKeychainQuery.h`, and `SSKeychainQuery.m` to your project. +2. Add `SAMKeychain.h`, `SAMKeychain.m`, `SAMKeychainQuery.h`, and `SAMKeychainQuery.m` to your project. -SSKeychain requires ARC. +SAMKeychain requires ARC. -Note: Currently SSKeychain does not support Mac OS 10.6. +Note: Currently SAMKeychain does not support Mac OS 10.6. ## Working with the Keychain -SSKeychain has the following class methods for working with the system keychain: +SAMKeychain has the following class methods for working with the system keychain: ```objective-c + (NSArray *)allAccounts; @@ -38,22 +38,22 @@ SSKeychain has the following class methods for working with the system keychain: + (BOOL)setPassword:(NSString *)password forService:(NSString *)serviceName account:(NSString *)account; ``` -Easy as that. (See [SSKeychain.h](https://github.com/soffes/sskeychain/blob/master/SSKeychain/SSKeychain.h) and [SSKeychainQuery.h](https://github.com/soffes/sskeychain/blob/master/SSKeychain/SSKeychainQuery.h) for all of the methods.) +Easy as that. (See [SAMKeychain.h](https://github.com/soffes/samkeychain/blob/master/Sources/SAMKeychain.h) and [SAMKeychainQuery.h](https://github.com/soffes/samkeychain/blob/master/Sources/SAMKeychainQuery.h) for all of the methods.) ## Documentation ### Use prepared documentation -Read the [online documentation](http://cocoadocs.org/docsets/SSKeychain). +Read the [online documentation](http://cocoadocs.org/docsets/SAMKeychain). ## Debugging -If your saving to the keychain fails, use the NSError object to handle it. You can invoke `[error code]` to get the numeric error code. A few values are defined in SSKeychain.h, and the rest in SecBase.h. +If your saving to the keychain fails, use the NSError object to handle it. You can invoke `[error code]` to get the numeric error code. A few values are defined in SAMKeychain.h, and the rest in SecBase.h. ```objective-c NSError *error = nil; -SSKeychainQuery *query = [[SSKeychainQuery alloc] init]; +SAMKeychainQuery *query = [[SAMKeychainQuery alloc] init]; query.service = @"MyService"; query.account = @"soffes"; [query fetch:&error]; @@ -78,6 +78,6 @@ for other options. ## Thanks -This was originally inspired by EMKeychain and SDKeychain (both of which are now gone). Thanks to the authors. SSKeychain has since switched to a simpler implementation that was abstracted from [SSToolkit](http://sstoolk.it). +This was originally inspired by EMKeychain and SDKeychain (both of which are now gone). Thanks to the authors. SAMKeychain has since switched to a simpler implementation that was abstracted from [SSToolkit](http://sstoolk.it). -A huge thanks to [Caleb Davenport](https://github.com/calebd) for leading the way on version 1.0 of SSKeychain. +A huge thanks to [Caleb Davenport](https://github.com/calebd) for leading the way on version 1.0 of SAMKeychain. diff --git a/SSKeychain.podspec b/SAMKeychain.podspec similarity index 69% rename from SSKeychain.podspec rename to SAMKeychain.podspec index b664159..ae6dad4 100644 --- a/SSKeychain.podspec +++ b/SAMKeychain.podspec @@ -1,15 +1,15 @@ Pod::Spec.new do |spec| - spec.name = 'SSKeychain' + spec.name = 'SAMKeychain' spec.version = '1.4.0' spec.description = 'Simple Cocoa wrapper for the keychain that works on OS X, iOS, tvOS, and watchOS.' spec.summary = 'Simple Cocoa wrapper for the keychain.' - spec.homepage = 'https://github.com/soffes/sskeychain' + spec.homepage = 'https://github.com/soffes/samkeychain' spec.author = { 'Sam Soffes' => 'sam@soff.es' } - spec.source = { :git => 'https://github.com/soffes/sskeychain.git', :tag => "v#{spec.version}" } + spec.source = { :git => 'https://github.com/soffes/samkeychain.git', :tag => "v#{spec.version}" } spec.license = { :type => 'MIT', :file => 'LICENSE' } spec.source_files = 'Sources/*.{h,m}' - spec.resources = 'Support/SSKeychain.bundle' + spec.resources = 'Support/SAMKeychain.bundle' spec.frameworks = 'Security', 'Foundation' diff --git a/SSKeychain.xcodeproj/project.pbxproj b/SAMKeychain.xcodeproj/project.pbxproj similarity index 76% rename from SSKeychain.xcodeproj/project.pbxproj rename to SAMKeychain.xcodeproj/project.pbxproj index 790adb9..ec94a14 100644 --- a/SSKeychain.xcodeproj/project.pbxproj +++ b/SAMKeychain.xcodeproj/project.pbxproj @@ -7,69 +7,69 @@ objects = { /* Begin PBXBuildFile section */ - 02AB79B61CA69B4700E52F3D /* SSKeychain.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 02AB79B51CA69B4700E52F3D /* SSKeychain.bundle */; }; - 02AB79B71CA69B4700E52F3D /* SSKeychain.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 02AB79B51CA69B4700E52F3D /* SSKeychain.bundle */; }; - 02AB79B81CA69B4700E52F3D /* SSKeychain.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 02AB79B51CA69B4700E52F3D /* SSKeychain.bundle */; }; - 02AB79B91CA69B4700E52F3D /* SSKeychain.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 02AB79B51CA69B4700E52F3D /* SSKeychain.bundle */; }; - 21632D821C92599100C40D7D /* SSKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7C1C92599100C40D7D /* SSKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 21632D831C92599100C40D7D /* SSKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7D1C92599100C40D7D /* SSKeychain.m */; }; - 21632D841C92599100C40D7D /* SSKeychainQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7E1C92599100C40D7D /* SSKeychainQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 21632D851C92599100C40D7D /* SSKeychainQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7F1C92599100C40D7D /* SSKeychainQuery.m */; }; - 21632D8F1C9259C100C40D7D /* SSKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7C1C92599100C40D7D /* SSKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 21632D901C9259C100C40D7D /* SSKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7D1C92599100C40D7D /* SSKeychain.m */; }; - 21632D911C9259C100C40D7D /* SSKeychainQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7E1C92599100C40D7D /* SSKeychainQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 21632D921C9259C100C40D7D /* SSKeychainQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7F1C92599100C40D7D /* SSKeychainQuery.m */; }; - 21632DA21C925A3C00C40D7D /* SSKeychain.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21632D981C925A3C00C40D7D /* SSKeychain.framework */; }; - 21632DB11C925A6000C40D7D /* SSKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7C1C92599100C40D7D /* SSKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 21632DB21C925A6000C40D7D /* SSKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7D1C92599100C40D7D /* SSKeychain.m */; }; - 21632DB31C925A6000C40D7D /* SSKeychainQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7E1C92599100C40D7D /* SSKeychainQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 21632DB41C925A6000C40D7D /* SSKeychainQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7F1C92599100C40D7D /* SSKeychainQuery.m */; }; - 21632DC51C925B3700C40D7D /* SSKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7C1C92599100C40D7D /* SSKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 21632DC61C925B3700C40D7D /* SSKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7D1C92599100C40D7D /* SSKeychain.m */; }; - 21632DC71C925B3700C40D7D /* SSKeychainQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7E1C92599100C40D7D /* SSKeychainQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 21632DC81C925B3700C40D7D /* SSKeychainQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7F1C92599100C40D7D /* SSKeychainQuery.m */; }; + 02AB79B61CA69B4700E52F3D /* SAMKeychain.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 02AB79B51CA69B4700E52F3D /* SAMKeychain.bundle */; }; + 02AB79B71CA69B4700E52F3D /* SAMKeychain.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 02AB79B51CA69B4700E52F3D /* SAMKeychain.bundle */; }; + 02AB79B81CA69B4700E52F3D /* SAMKeychain.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 02AB79B51CA69B4700E52F3D /* SAMKeychain.bundle */; }; + 02AB79B91CA69B4700E52F3D /* SAMKeychain.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 02AB79B51CA69B4700E52F3D /* SAMKeychain.bundle */; }; + 21632D821C92599100C40D7D /* SAMKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7C1C92599100C40D7D /* SAMKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21632D831C92599100C40D7D /* SAMKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7D1C92599100C40D7D /* SAMKeychain.m */; }; + 21632D841C92599100C40D7D /* SAMKeychainQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7E1C92599100C40D7D /* SAMKeychainQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21632D851C92599100C40D7D /* SAMKeychainQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7F1C92599100C40D7D /* SAMKeychainQuery.m */; }; + 21632D8F1C9259C100C40D7D /* SAMKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7C1C92599100C40D7D /* SAMKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21632D901C9259C100C40D7D /* SAMKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7D1C92599100C40D7D /* SAMKeychain.m */; }; + 21632D911C9259C100C40D7D /* SAMKeychainQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7E1C92599100C40D7D /* SAMKeychainQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21632D921C9259C100C40D7D /* SAMKeychainQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7F1C92599100C40D7D /* SAMKeychainQuery.m */; }; + 21632DA21C925A3C00C40D7D /* SAMKeychain.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21632D981C925A3C00C40D7D /* SAMKeychain.framework */; }; + 21632DB11C925A6000C40D7D /* SAMKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7C1C92599100C40D7D /* SAMKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21632DB21C925A6000C40D7D /* SAMKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7D1C92599100C40D7D /* SAMKeychain.m */; }; + 21632DB31C925A6000C40D7D /* SAMKeychainQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7E1C92599100C40D7D /* SAMKeychainQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21632DB41C925A6000C40D7D /* SAMKeychainQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7F1C92599100C40D7D /* SAMKeychainQuery.m */; }; + 21632DC51C925B3700C40D7D /* SAMKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7C1C92599100C40D7D /* SAMKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21632DC61C925B3700C40D7D /* SAMKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7D1C92599100C40D7D /* SAMKeychain.m */; }; + 21632DC71C925B3700C40D7D /* SAMKeychainQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 21632D7E1C92599100C40D7D /* SAMKeychainQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21632DC81C925B3700C40D7D /* SAMKeychainQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 21632D7F1C92599100C40D7D /* SAMKeychainQuery.m */; }; 21632DD31C9282BD00C40D7D /* KeychainTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21632DD21C9282BD00C40D7D /* KeychainTests.swift */; }; 21632DD41C9282BD00C40D7D /* KeychainTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21632DD21C9282BD00C40D7D /* KeychainTests.swift */; }; 21632DD51C9282BD00C40D7D /* KeychainTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21632DD21C9282BD00C40D7D /* KeychainTests.swift */; }; - E8A6665B1A844D3A00287CA3 /* SSKeychain.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8A666341A844CC400287CA3 /* SSKeychain.framework */; }; - E8A6667A1A844E4100287CA3 /* SSKeychain.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8A6666F1A844E4100287CA3 /* SSKeychain.framework */; }; + E8A6665B1A844D3A00287CA3 /* SAMKeychain.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8A666341A844CC400287CA3 /* SAMKeychain.framework */; }; + E8A6667A1A844E4100287CA3 /* SAMKeychain.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8A6666F1A844E4100287CA3 /* SAMKeychain.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 21632DA31C925A3C00C40D7D /* PBXContainerItemProxy */ = { + 852915A51D4670E400871559 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 21CC429F17DB874300201DDC /* Project object */; proxyType = 1; remoteGlobalIDString = 21632D971C925A3C00C40D7D; - remoteInfo = SSKeychain; + remoteInfo = "SAMKeychain-tvOS"; }; - E8A6665C1A844D3A00287CA3 /* PBXContainerItemProxy */ = { + 852915A11D4670A700871559 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 21CC429F17DB874300201DDC /* Project object */; proxyType = 1; remoteGlobalIDString = E8A666331A844CC400287CA3; - remoteInfo = "SSKeychain iOS"; + remoteInfo = "SAMKeychain-iOS"; }; - E8A6667B1A844E4100287CA3 /* PBXContainerItemProxy */ = { + 852915A31D4670C500871559 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 21CC429F17DB874300201DDC /* Project object */; proxyType = 1; remoteGlobalIDString = E8A6666E1A844E4100287CA3; - remoteInfo = "SSKeychain Mac"; + remoteInfo = "SAMKeychain-OSX"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 02AB79B51CA69B4700E52F3D /* SSKeychain.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = SSKeychain.bundle; sourceTree = ""; }; - 21632D7C1C92599100C40D7D /* SSKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSKeychain.h; sourceTree = ""; }; - 21632D7D1C92599100C40D7D /* SSKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSKeychain.m; sourceTree = ""; }; - 21632D7E1C92599100C40D7D /* SSKeychainQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSKeychainQuery.h; sourceTree = ""; }; - 21632D7F1C92599100C40D7D /* SSKeychainQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSKeychainQuery.m; sourceTree = ""; }; + 02AB79B51CA69B4700E52F3D /* SAMKeychain.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = SAMKeychain.bundle; sourceTree = ""; }; + 21632D7C1C92599100C40D7D /* SAMKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SAMKeychain.h; sourceTree = ""; }; + 21632D7D1C92599100C40D7D /* SAMKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SAMKeychain.m; sourceTree = ""; }; + 21632D7E1C92599100C40D7D /* SAMKeychainQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SAMKeychainQuery.h; sourceTree = ""; }; + 21632D7F1C92599100C40D7D /* SAMKeychainQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SAMKeychainQuery.m; sourceTree = ""; }; 21632D891C9259B400C40D7D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 21632D8A1C9259B400C40D7D /* Tests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; - 21632D981C925A3C00C40D7D /* SSKeychain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SSKeychain.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 21632DA11C925A3C00C40D7D /* SSKeychainTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SSKeychainTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 21632DBC1C925B1F00C40D7D /* SSKeychain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SSKeychain.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 21632D981C925A3C00C40D7D /* SAMKeychain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SAMKeychain.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 21632DA11C925A3C00C40D7D /* SAMKeychainTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SAMKeychainTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 21632DBC1C925B1F00C40D7D /* SAMKeychain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SAMKeychain.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 21632DD21C9282BD00C40D7D /* KeychainTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeychainTests.swift; sourceTree = ""; }; 21B85B1E18EC9391009D2B98 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; 21B85B2518EC9455009D2B98 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; @@ -82,10 +82,10 @@ 21CC42AE17DB874300201DDC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 21CC42C317DB874300201DDC /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 21CC42F917DB87C300201DDC /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - E8A666341A844CC400287CA3 /* SSKeychain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SSKeychain.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E8A666551A844D3A00287CA3 /* SSKeychainTests-iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SSKeychainTests-iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - E8A6666F1A844E4100287CA3 /* SSKeychain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SSKeychain.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E8A666791A844E4100287CA3 /* SSKeychainTests-OSX.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SSKeychainTests-OSX.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + E8A666341A844CC400287CA3 /* SAMKeychain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SAMKeychain.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E8A666551A844D3A00287CA3 /* SAMKeychainTests-iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SAMKeychainTests-iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + E8A6666F1A844E4100287CA3 /* SAMKeychain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SAMKeychain.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E8A666791A844E4100287CA3 /* SAMKeychainTests-OSX.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SAMKeychainTests-OSX.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -100,7 +100,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 21632DA21C925A3C00C40D7D /* SSKeychain.framework in Frameworks */, + 21632DA21C925A3C00C40D7D /* SAMKeychain.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -122,7 +122,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E8A6665B1A844D3A00287CA3 /* SSKeychain.framework in Frameworks */, + E8A6665B1A844D3A00287CA3 /* SAMKeychain.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -137,7 +137,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E8A6667A1A844E4100287CA3 /* SSKeychain.framework in Frameworks */, + E8A6667A1A844E4100287CA3 /* SAMKeychain.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -147,10 +147,10 @@ 21632D781C92599100C40D7D /* Sources */ = { isa = PBXGroup; children = ( - 21632D7C1C92599100C40D7D /* SSKeychain.h */, - 21632D7D1C92599100C40D7D /* SSKeychain.m */, - 21632D7E1C92599100C40D7D /* SSKeychainQuery.h */, - 21632D7F1C92599100C40D7D /* SSKeychainQuery.m */, + 21632D7C1C92599100C40D7D /* SAMKeychain.h */, + 21632D7D1C92599100C40D7D /* SAMKeychain.m */, + 21632D7E1C92599100C40D7D /* SAMKeychainQuery.h */, + 21632D7F1C92599100C40D7D /* SAMKeychainQuery.m */, ); path = Sources; sourceTree = ""; @@ -158,7 +158,7 @@ 21632D861C9259B400C40D7D /* Support */ = { isa = PBXGroup; children = ( - 02AB79B51CA69B4700E52F3D /* SSKeychain.bundle */, + 02AB79B51CA69B4700E52F3D /* SAMKeychain.bundle */, 21632D891C9259B400C40D7D /* Info.plist */, 21632D8A1C9259B400C40D7D /* Tests-Info.plist */, ); @@ -190,13 +190,13 @@ 21CC42A817DB874300201DDC /* Products */ = { isa = PBXGroup; children = ( - E8A666341A844CC400287CA3 /* SSKeychain.framework */, - E8A666551A844D3A00287CA3 /* SSKeychainTests-iOS.xctest */, - E8A6666F1A844E4100287CA3 /* SSKeychain.framework */, - E8A666791A844E4100287CA3 /* SSKeychainTests-OSX.xctest */, - 21632D981C925A3C00C40D7D /* SSKeychain.framework */, - 21632DA11C925A3C00C40D7D /* SSKeychainTests.xctest */, - 21632DBC1C925B1F00C40D7D /* SSKeychain.framework */, + E8A666341A844CC400287CA3 /* SAMKeychain.framework */, + E8A666551A844D3A00287CA3 /* SAMKeychainTests-iOS.xctest */, + E8A6666F1A844E4100287CA3 /* SAMKeychain.framework */, + E8A666791A844E4100287CA3 /* SAMKeychainTests-OSX.xctest */, + 21632D981C925A3C00C40D7D /* SAMKeychain.framework */, + 21632DA11C925A3C00C40D7D /* SAMKeychainTests.xctest */, + 21632DBC1C925B1F00C40D7D /* SAMKeychain.framework */, ); name = Products; sourceTree = ""; @@ -232,8 +232,8 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 21632DB11C925A6000C40D7D /* SSKeychain.h in Headers */, - 21632DB31C925A6000C40D7D /* SSKeychainQuery.h in Headers */, + 21632DB11C925A6000C40D7D /* SAMKeychain.h in Headers */, + 21632DB31C925A6000C40D7D /* SAMKeychainQuery.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -241,8 +241,8 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 21632DC51C925B3700C40D7D /* SSKeychain.h in Headers */, - 21632DC71C925B3700C40D7D /* SSKeychainQuery.h in Headers */, + 21632DC51C925B3700C40D7D /* SAMKeychain.h in Headers */, + 21632DC71C925B3700C40D7D /* SAMKeychainQuery.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -250,8 +250,8 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 21632D821C92599100C40D7D /* SSKeychain.h in Headers */, - 21632D841C92599100C40D7D /* SSKeychainQuery.h in Headers */, + 21632D821C92599100C40D7D /* SAMKeychain.h in Headers */, + 21632D841C92599100C40D7D /* SAMKeychainQuery.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -259,17 +259,17 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 21632D8F1C9259C100C40D7D /* SSKeychain.h in Headers */, - 21632D911C9259C100C40D7D /* SSKeychainQuery.h in Headers */, + 21632D8F1C9259C100C40D7D /* SAMKeychain.h in Headers */, + 21632D911C9259C100C40D7D /* SAMKeychainQuery.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 21632D971C925A3C00C40D7D /* SSKeychain-tvOS */ = { + 21632D971C925A3C00C40D7D /* SAMKeychain-tvOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 21632DA91C925A3C00C40D7D /* Build configuration list for PBXNativeTarget "SSKeychain-tvOS" */; + buildConfigurationList = 21632DA91C925A3C00C40D7D /* Build configuration list for PBXNativeTarget "SAMKeychain-tvOS" */; buildPhases = ( 21632D931C925A3C00C40D7D /* Sources */, 21632D941C925A3C00C40D7D /* Frameworks */, @@ -280,14 +280,14 @@ ); dependencies = ( ); - name = "SSKeychain-tvOS"; + name = "SAMKeychain-tvOS"; productName = SSKeychain; - productReference = 21632D981C925A3C00C40D7D /* SSKeychain.framework */; + productReference = 21632D981C925A3C00C40D7D /* SAMKeychain.framework */; productType = "com.apple.product-type.framework"; }; - 21632DA01C925A3C00C40D7D /* SSKeychainTests-tvOS */ = { + 21632DA01C925A3C00C40D7D /* SAMKeychainTests-tvOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 21632DAD1C925A3C00C40D7D /* Build configuration list for PBXNativeTarget "SSKeychainTests-tvOS" */; + buildConfigurationList = 21632DAD1C925A3C00C40D7D /* Build configuration list for PBXNativeTarget "SAMKeychainTests-tvOS" */; buildPhases = ( 21632D9D1C925A3C00C40D7D /* Sources */, 21632D9E1C925A3C00C40D7D /* Frameworks */, @@ -296,16 +296,16 @@ buildRules = ( ); dependencies = ( - 21632DA41C925A3C00C40D7D /* PBXTargetDependency */, + 852915A61D4670E400871559 /* PBXTargetDependency */, ); - name = "SSKeychainTests-tvOS"; + name = "SAMKeychainTests-tvOS"; productName = SSKeychainTests; - productReference = 21632DA11C925A3C00C40D7D /* SSKeychainTests.xctest */; + productReference = 21632DA11C925A3C00C40D7D /* SAMKeychainTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 21632DBB1C925B1F00C40D7D /* SSKeychain-watchOS */ = { + 21632DBB1C925B1F00C40D7D /* SAMKeychain-watchOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 21632DC11C925B1F00C40D7D /* Build configuration list for PBXNativeTarget "SSKeychain-watchOS" */; + buildConfigurationList = 21632DC11C925B1F00C40D7D /* Build configuration list for PBXNativeTarget "SAMKeychain-watchOS" */; buildPhases = ( 21632DB71C925B1F00C40D7D /* Sources */, 21632DB81C925B1F00C40D7D /* Frameworks */, @@ -316,14 +316,14 @@ ); dependencies = ( ); - name = "SSKeychain-watchOS"; + name = "SAMKeychain-watchOS"; productName = SSKeychain; - productReference = 21632DBC1C925B1F00C40D7D /* SSKeychain.framework */; + productReference = 21632DBC1C925B1F00C40D7D /* SAMKeychain.framework */; productType = "com.apple.product-type.framework"; }; - E8A666331A844CC400287CA3 /* SSKeychain-iOS */ = { + E8A666331A844CC400287CA3 /* SAMKeychain-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = E8A666471A844CC400287CA3 /* Build configuration list for PBXNativeTarget "SSKeychain-iOS" */; + buildConfigurationList = E8A666471A844CC400287CA3 /* Build configuration list for PBXNativeTarget "SAMKeychain-iOS" */; buildPhases = ( E8A6662F1A844CC400287CA3 /* Sources */, E8A666301A844CC400287CA3 /* Frameworks */, @@ -334,14 +334,14 @@ ); dependencies = ( ); - name = "SSKeychain-iOS"; + name = "SAMKeychain-iOS"; productName = "SSKeychain iOS"; - productReference = E8A666341A844CC400287CA3 /* SSKeychain.framework */; + productReference = E8A666341A844CC400287CA3 /* SAMKeychain.framework */; productType = "com.apple.product-type.framework"; }; - E8A666541A844D3A00287CA3 /* SSKeychainTests-iOS */ = { + E8A666541A844D3A00287CA3 /* SAMKeychainTests-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = E8A6665E1A844D3A00287CA3 /* Build configuration list for PBXNativeTarget "SSKeychainTests-iOS" */; + buildConfigurationList = E8A6665E1A844D3A00287CA3 /* Build configuration list for PBXNativeTarget "SAMKeychainTests-iOS" */; buildPhases = ( E8A666511A844D3A00287CA3 /* Sources */, E8A666521A844D3A00287CA3 /* Frameworks */, @@ -349,16 +349,16 @@ buildRules = ( ); dependencies = ( - E8A6665D1A844D3A00287CA3 /* PBXTargetDependency */, + 852915A21D4670A700871559 /* PBXTargetDependency */, ); - name = "SSKeychainTests-iOS"; + name = "SAMKeychainTests-iOS"; productName = "SSKeychain iOS Tests"; - productReference = E8A666551A844D3A00287CA3 /* SSKeychainTests-iOS.xctest */; + productReference = E8A666551A844D3A00287CA3 /* SAMKeychainTests-iOS.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - E8A6666E1A844E4100287CA3 /* SSKeychain-OSX */ = { + E8A6666E1A844E4100287CA3 /* SAMKeychain-OSX */ = { isa = PBXNativeTarget; - buildConfigurationList = E8A666821A844E4100287CA3 /* Build configuration list for PBXNativeTarget "SSKeychain-OSX" */; + buildConfigurationList = E8A666821A844E4100287CA3 /* Build configuration list for PBXNativeTarget "SAMKeychain-OSX" */; buildPhases = ( E8A6666A1A844E4100287CA3 /* Sources */, E8A6666B1A844E4100287CA3 /* Frameworks */, @@ -369,14 +369,14 @@ ); dependencies = ( ); - name = "SSKeychain-OSX"; + name = "SAMKeychain-OSX"; productName = "SSKeychain Mac"; - productReference = E8A6666F1A844E4100287CA3 /* SSKeychain.framework */; + productReference = E8A6666F1A844E4100287CA3 /* SAMKeychain.framework */; productType = "com.apple.product-type.framework"; }; - E8A666781A844E4100287CA3 /* SSKeychainTests-OSX */ = { + E8A666781A844E4100287CA3 /* SAMKeychainTests-OSX */ = { isa = PBXNativeTarget; - buildConfigurationList = E8A666861A844E4100287CA3 /* Build configuration list for PBXNativeTarget "SSKeychainTests-OSX" */; + buildConfigurationList = E8A666861A844E4100287CA3 /* Build configuration list for PBXNativeTarget "SAMKeychainTests-OSX" */; buildPhases = ( E8A666751A844E4100287CA3 /* Sources */, E8A666761A844E4100287CA3 /* Frameworks */, @@ -385,11 +385,11 @@ buildRules = ( ); dependencies = ( - E8A6667C1A844E4100287CA3 /* PBXTargetDependency */, + 852915A41D4670C500871559 /* PBXTargetDependency */, ); - name = "SSKeychainTests-OSX"; + name = "SAMKeychainTests-OSX"; productName = "SSKeychain MacTests"; - productReference = E8A666791A844E4100287CA3 /* SSKeychainTests-OSX.xctest */; + productReference = E8A666791A844E4100287CA3 /* SAMKeychainTests-OSX.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ @@ -398,7 +398,7 @@ 21CC429F17DB874300201DDC /* Project object */ = { isa = PBXProject; attributes = { - CLASSPREFIX = SS; + CLASSPREFIX = SAM; LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0720; ORGANIZATIONNAME = "Sam Soffes"; @@ -426,7 +426,7 @@ }; }; }; - buildConfigurationList = 21CC42A217DB874300201DDC /* Build configuration list for PBXProject "SSKeychain" */; + buildConfigurationList = 21CC42A217DB874300201DDC /* Build configuration list for PBXProject "SAMKeychain" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -439,13 +439,13 @@ projectDirPath = ""; projectRoot = ""; targets = ( - E8A666331A844CC400287CA3 /* SSKeychain-iOS */, - E8A666541A844D3A00287CA3 /* SSKeychainTests-iOS */, - E8A6666E1A844E4100287CA3 /* SSKeychain-OSX */, - E8A666781A844E4100287CA3 /* SSKeychainTests-OSX */, - 21632D971C925A3C00C40D7D /* SSKeychain-tvOS */, - 21632DA01C925A3C00C40D7D /* SSKeychainTests-tvOS */, - 21632DBB1C925B1F00C40D7D /* SSKeychain-watchOS */, + E8A666331A844CC400287CA3 /* SAMKeychain-iOS */, + E8A666541A844D3A00287CA3 /* SAMKeychainTests-iOS */, + E8A6666E1A844E4100287CA3 /* SAMKeychain-OSX */, + E8A666781A844E4100287CA3 /* SAMKeychainTests-OSX */, + 21632D971C925A3C00C40D7D /* SAMKeychain-tvOS */, + 21632DA01C925A3C00C40D7D /* SAMKeychainTests-tvOS */, + 21632DBB1C925B1F00C40D7D /* SAMKeychain-watchOS */, ); }; /* End PBXProject section */ @@ -455,7 +455,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 02AB79B81CA69B4700E52F3D /* SSKeychain.bundle in Resources */, + 02AB79B81CA69B4700E52F3D /* SAMKeychain.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -470,7 +470,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 02AB79B91CA69B4700E52F3D /* SSKeychain.bundle in Resources */, + 02AB79B91CA69B4700E52F3D /* SAMKeychain.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -478,7 +478,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 02AB79B61CA69B4700E52F3D /* SSKeychain.bundle in Resources */, + 02AB79B61CA69B4700E52F3D /* SAMKeychain.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -486,7 +486,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 02AB79B71CA69B4700E52F3D /* SSKeychain.bundle in Resources */, + 02AB79B71CA69B4700E52F3D /* SAMKeychain.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -504,8 +504,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 21632DB41C925A6000C40D7D /* SSKeychainQuery.m in Sources */, - 21632DB21C925A6000C40D7D /* SSKeychain.m in Sources */, + 21632DB41C925A6000C40D7D /* SAMKeychainQuery.m in Sources */, + 21632DB21C925A6000C40D7D /* SAMKeychain.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -521,8 +521,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 21632DC81C925B3700C40D7D /* SSKeychainQuery.m in Sources */, - 21632DC61C925B3700C40D7D /* SSKeychain.m in Sources */, + 21632DC81C925B3700C40D7D /* SAMKeychainQuery.m in Sources */, + 21632DC61C925B3700C40D7D /* SAMKeychain.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -530,8 +530,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 21632D851C92599100C40D7D /* SSKeychainQuery.m in Sources */, - 21632D831C92599100C40D7D /* SSKeychain.m in Sources */, + 21632D851C92599100C40D7D /* SAMKeychainQuery.m in Sources */, + 21632D831C92599100C40D7D /* SAMKeychain.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -547,8 +547,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 21632D921C9259C100C40D7D /* SSKeychainQuery.m in Sources */, - 21632D901C9259C100C40D7D /* SSKeychain.m in Sources */, + 21632D921C9259C100C40D7D /* SAMKeychainQuery.m in Sources */, + 21632D901C9259C100C40D7D /* SAMKeychain.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -563,20 +563,20 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 21632DA41C925A3C00C40D7D /* PBXTargetDependency */ = { + 852915A61D4670E400871559 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 21632D971C925A3C00C40D7D /* SSKeychain-tvOS */; - targetProxy = 21632DA31C925A3C00C40D7D /* PBXContainerItemProxy */; + target = 21632D971C925A3C00C40D7D /* SAMKeychain-tvOS */; + targetProxy = 852915A51D4670E400871559 /* PBXContainerItemProxy */; }; - E8A6665D1A844D3A00287CA3 /* PBXTargetDependency */ = { + 852915A21D4670A700871559 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = E8A666331A844CC400287CA3 /* SSKeychain-iOS */; - targetProxy = E8A6665C1A844D3A00287CA3 /* PBXContainerItemProxy */; + target = E8A666331A844CC400287CA3 /* SAMKeychain-iOS */; + targetProxy = 852915A11D4670A700871559 /* PBXContainerItemProxy */; }; - E8A6667C1A844E4100287CA3 /* PBXTargetDependency */ = { + 852915A41D4670C500871559 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = E8A6666E1A844E4100287CA3 /* SSKeychain-OSX */; - targetProxy = E8A6667B1A844E4100287CA3 /* PBXContainerItemProxy */; + target = E8A6666E1A844E4100287CA3 /* SAMKeychain-OSX */; + targetProxy = 852915A31D4670C500871559 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -642,8 +642,8 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SSKeychain; - PRODUCT_NAME = SSKeychain; + PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SAMKeychain; + PRODUCT_NAME = SAMKeychain; SDKROOT = appletvos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 3; @@ -672,8 +672,8 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SSKeychain; - PRODUCT_NAME = SSKeychain; + PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SAMKeychain; + PRODUCT_NAME = SAMKeychain; SDKROOT = appletvos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 3; @@ -702,8 +702,8 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SSKeychain; - PRODUCT_NAME = SSKeychain; + PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SAMKeychain; + PRODUCT_NAME = SAMKeychain; SDKROOT = appletvos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 3; @@ -726,8 +726,8 @@ INFOPLIST_FILE = "Support/Tests-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SSKeychainTests; - PRODUCT_NAME = SSKeychainTests; + PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SAMKeychainTests; + PRODUCT_NAME = SAMKeychainTests; SDKROOT = appletvos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TVOS_DEPLOYMENT_TARGET = 9.2; @@ -749,8 +749,8 @@ INFOPLIST_FILE = "Support/Tests-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SSKeychainTests; - PRODUCT_NAME = SSKeychainTests; + PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SAMKeychainTests; + PRODUCT_NAME = SAMKeychainTests; SDKROOT = appletvos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TVOS_DEPLOYMENT_TARGET = 9.2; @@ -772,8 +772,8 @@ INFOPLIST_FILE = "Support/Tests-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SSKeychainTests; - PRODUCT_NAME = SSKeychainTests; + PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SAMKeychainTests; + PRODUCT_NAME = SAMKeychainTests; SDKROOT = appletvos; TVOS_DEPLOYMENT_TARGET = 9.2; }; @@ -798,8 +798,8 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SSKeychain; - PRODUCT_NAME = SSKeychain; + PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SAMKeychain; + PRODUCT_NAME = SAMKeychain; SDKROOT = watchos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 4; @@ -828,8 +828,8 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SSKeychain; - PRODUCT_NAME = SSKeychain; + PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SAMKeychain; + PRODUCT_NAME = SAMKeychain; SDKROOT = watchos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 4; @@ -858,8 +858,8 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SSKeychain; - PRODUCT_NAME = SSKeychain; + PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SAMKeychain; + PRODUCT_NAME = SAMKeychain; SDKROOT = watchos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 4; @@ -969,7 +969,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = SSKeychain; + PRODUCT_NAME = SAMKeychain; SKIP_INSTALL = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -994,7 +994,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = SSKeychain; + PRODUCT_NAME = SAMKeychain; SKIP_INSTALL = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1019,7 +1019,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = SSKeychain; + PRODUCT_NAME = SAMKeychain; SKIP_INSTALL = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1118,7 +1118,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = SSKeychain; + PRODUCT_NAME = SAMKeychain; SDKROOT = macosx; SKIP_INSTALL = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -1146,7 +1146,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = SSKeychain; + PRODUCT_NAME = SAMKeychain; SDKROOT = macosx; SKIP_INSTALL = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -1174,7 +1174,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = SSKeychain; + PRODUCT_NAME = SAMKeychain; SDKROOT = macosx; SKIP_INSTALL = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -1262,7 +1262,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 21632DA91C925A3C00C40D7D /* Build configuration list for PBXNativeTarget "SSKeychain-tvOS" */ = { + 21632DA91C925A3C00C40D7D /* Build configuration list for PBXNativeTarget "SAMKeychain-tvOS" */ = { isa = XCConfigurationList; buildConfigurations = ( 21632DAA1C925A3C00C40D7D /* Debug */, @@ -1272,7 +1272,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 21632DAD1C925A3C00C40D7D /* Build configuration list for PBXNativeTarget "SSKeychainTests-tvOS" */ = { + 21632DAD1C925A3C00C40D7D /* Build configuration list for PBXNativeTarget "SAMKeychainTests-tvOS" */ = { isa = XCConfigurationList; buildConfigurations = ( 21632DAE1C925A3C00C40D7D /* Debug */, @@ -1282,7 +1282,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 21632DC11C925B1F00C40D7D /* Build configuration list for PBXNativeTarget "SSKeychain-watchOS" */ = { + 21632DC11C925B1F00C40D7D /* Build configuration list for PBXNativeTarget "SAMKeychain-watchOS" */ = { isa = XCConfigurationList; buildConfigurations = ( 21632DC21C925B1F00C40D7D /* Debug */, @@ -1292,7 +1292,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 21CC42A217DB874300201DDC /* Build configuration list for PBXProject "SSKeychain" */ = { + 21CC42A217DB874300201DDC /* Build configuration list for PBXProject "SAMKeychain" */ = { isa = XCConfigurationList; buildConfigurations = ( 21CC42D117DB874300201DDC /* Debug */, @@ -1302,7 +1302,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E8A666471A844CC400287CA3 /* Build configuration list for PBXNativeTarget "SSKeychain-iOS" */ = { + E8A666471A844CC400287CA3 /* Build configuration list for PBXNativeTarget "SAMKeychain-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( E8A666481A844CC400287CA3 /* Debug */, @@ -1312,7 +1312,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E8A6665E1A844D3A00287CA3 /* Build configuration list for PBXNativeTarget "SSKeychainTests-iOS" */ = { + E8A6665E1A844D3A00287CA3 /* Build configuration list for PBXNativeTarget "SAMKeychainTests-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( E8A6665F1A844D3A00287CA3 /* Debug */, @@ -1322,7 +1322,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E8A666821A844E4100287CA3 /* Build configuration list for PBXNativeTarget "SSKeychain-OSX" */ = { + E8A666821A844E4100287CA3 /* Build configuration list for PBXNativeTarget "SAMKeychain-OSX" */ = { isa = XCConfigurationList; buildConfigurations = ( E8A666831A844E4100287CA3 /* Debug */, @@ -1332,7 +1332,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E8A666861A844E4100287CA3 /* Build configuration list for PBXNativeTarget "SSKeychainTests-OSX" */ = { + E8A666861A844E4100287CA3 /* Build configuration list for PBXNativeTarget "SAMKeychainTests-OSX" */ = { isa = XCConfigurationList; buildConfigurations = ( E8A666871A844E4100287CA3 /* Debug */, diff --git a/SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-OSX.xcscheme b/SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-OSX.xcscheme similarity index 76% rename from SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-OSX.xcscheme rename to SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-OSX.xcscheme index 32798e1..a6b10f9 100644 --- a/SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-OSX.xcscheme +++ b/SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-OSX.xcscheme @@ -15,9 +15,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-OSX" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -33,9 +33,9 @@ + BuildableName = "SAMKeychainTests-OSX.xctest" + BlueprintName = "SAMKeychainTests-OSX" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -43,9 +43,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-OSX" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -65,9 +65,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-OSX" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -83,9 +83,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-OSX" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> diff --git a/SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-iOS.xcscheme b/SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-iOS.xcscheme similarity index 76% rename from SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-iOS.xcscheme rename to SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-iOS.xcscheme index 40b8989..c3291aa 100644 --- a/SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-iOS.xcscheme +++ b/SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-iOS.xcscheme @@ -15,9 +15,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-iOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -33,9 +33,9 @@ + BuildableName = "SAMKeychainTests-iOS.xctest" + BlueprintName = "SAMKeychainTests-iOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -43,9 +43,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-iOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -65,9 +65,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-iOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -83,9 +83,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-iOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> diff --git a/SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-tvOS.xcscheme b/SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-tvOS.xcscheme similarity index 76% rename from SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-tvOS.xcscheme rename to SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-tvOS.xcscheme index 229395d..b3e4a59 100644 --- a/SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-tvOS.xcscheme +++ b/SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-tvOS.xcscheme @@ -15,9 +15,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-tvOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -33,9 +33,9 @@ + BuildableName = "SAMKeychainTests.xctest" + BlueprintName = "SAMKeychainTests-tvOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -43,9 +43,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-tvOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -65,9 +65,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-tvOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -83,9 +83,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-tvOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> diff --git a/SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-watchOS.xcscheme b/SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-watchOS.xcscheme similarity index 82% rename from SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-watchOS.xcscheme rename to SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-watchOS.xcscheme index 3f6a4f0..b992472 100644 --- a/SSKeychain.xcodeproj/xcshareddata/xcschemes/SSKeychain-watchOS.xcscheme +++ b/SAMKeychain.xcodeproj/xcshareddata/xcschemes/SAMKeychain-watchOS.xcscheme @@ -15,9 +15,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-watchOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -46,9 +46,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-watchOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> @@ -64,9 +64,9 @@ + BuildableName = "SAMKeychain.framework" + BlueprintName = "SAMKeychain-watchOS" + ReferencedContainer = "container:SAMKeychain.xcodeproj"> diff --git a/Sources/SSKeychain.h b/Sources/SAMKeychain.h similarity index 85% rename from Sources/SSKeychain.h rename to Sources/SAMKeychain.h index bad5740..0d1efad 100644 --- a/Sources/SSKeychain.h +++ b/Sources/SAMKeychain.h @@ -1,6 +1,6 @@ // -// SSKeychain.h -// SSKeychain +// SAMKeychain.h +// SAMKeychain // // Created by Sam Soffes on 5/19/10. // Copyright (c) 2010-2014 Sam Soffes. All rights reserved. @@ -13,54 +13,54 @@ #endif /** - Error code specific to SSKeychain that can be returned in NSError objects. + Error code specific to SAMKeychain that can be returned in NSError objects. For codes returned by the operating system, refer to SecBase.h for your platform. */ -typedef NS_ENUM(OSStatus, SSKeychainErrorCode) { +typedef NS_ENUM(OSStatus, SAMKeychainErrorCode) { /** Some of the arguments were invalid. */ - SSKeychainErrorBadArguments = -1001, + SAMKeychainErrorBadArguments = -1001, }; -/** SSKeychain error domain */ -extern NSString *const kSSKeychainErrorDomain; +/** SAMKeychain error domain */ +extern NSString *const kSAMKeychainErrorDomain; /** Account name. */ -extern NSString *const kSSKeychainAccountKey; +extern NSString *const kSAMKeychainAccountKey; /** Time the item was created. The value will be a string. */ -extern NSString *const kSSKeychainCreatedAtKey; +extern NSString *const kSAMKeychainCreatedAtKey; /** Item class. */ -extern NSString *const kSSKeychainClassKey; +extern NSString *const kSAMKeychainClassKey; /** Item description. */ -extern NSString *const kSSKeychainDescriptionKey; +extern NSString *const kSAMKeychainDescriptionKey; /** Item label. */ -extern NSString *const kSSKeychainLabelKey; +extern NSString *const kSAMKeychainLabelKey; /** Time the item was last modified. The value will be a string. */ -extern NSString *const kSSKeychainLastModifiedKey; +extern NSString *const kSAMKeychainLastModifiedKey; /** Where the item was created. */ -extern NSString *const kSSKeychainWhereKey; +extern NSString *const kSAMKeychainWhereKey; /** Simple wrapper for accessing accounts, getting passwords, setting passwords, and deleting passwords using the system Keychain on Mac OS X and iOS. This was originally inspired by EMKeychain and SDKeychain (both of which are now gone). Thanks to the authors. - SSKeychain has since switched to a simpler implementation that was abstracted from [SSToolkit](http://sstoolk.it). + SAMKeychain has since switched to a simpler implementation that was abstracted from [SSToolkit](http://sstoolk.it). */ -@interface SSKeychain : NSObject +@interface SAMKeychain : NSObject #pragma mark - Classic methods @@ -137,7 +137,7 @@ extern NSString *const kSSKeychainWhereKey; /** Returns an array containing the Keychain's accounts, or `nil` if the Keychain has no accounts. - See the `NSString` constants declared in SSKeychain.h for a list of keys that can be used when accessing the + See the `NSString` constants declared in SAMKeychain.h for a list of keys that can be used when accessing the dictionaries returned by this method. @return An array of dictionaries containing the Keychain's accounts, or `nil` if the Keychain doesn't have any @@ -151,7 +151,7 @@ extern NSString *const kSSKeychainWhereKey; Returns an array containing the Keychain's accounts for a given service, or `nil` if the Keychain doesn't have any accounts for the given service. - See the `NSString` constants declared in SSKeychain.h for a list of keys that can be used when accessing the + See the `NSString` constants declared in SAMKeychain.h for a list of keys that can be used when accessing the dictionaries returned by this method. @param serviceName The service for which to return the corresponding accounts. @@ -196,4 +196,4 @@ extern NSString *const kSSKeychainWhereKey; @end -#import +#import diff --git a/Sources/SSKeychain.m b/Sources/SAMKeychain.m similarity index 72% rename from Sources/SSKeychain.m rename to Sources/SAMKeychain.m index de52f72..9ba73be 100644 --- a/Sources/SSKeychain.m +++ b/Sources/SAMKeychain.m @@ -1,28 +1,28 @@ // -// SSKeychain.m -// SSKeychain +// SAMKeychain.m +// SAMKeychain // // Created by Sam Soffes on 5/19/10. // Copyright (c) 2010-2014 Sam Soffes. All rights reserved. // -#import "SSKeychain.h" -#import "SSKeychainQuery.h" +#import "SAMKeychain.h" +#import "SAMKeychainQuery.h" -NSString *const kSSKeychainErrorDomain = @"com.samsoffes.sskeychain"; -NSString *const kSSKeychainAccountKey = @"acct"; -NSString *const kSSKeychainCreatedAtKey = @"cdat"; -NSString *const kSSKeychainClassKey = @"labl"; -NSString *const kSSKeychainDescriptionKey = @"desc"; -NSString *const kSSKeychainLabelKey = @"labl"; -NSString *const kSSKeychainLastModifiedKey = @"mdat"; -NSString *const kSSKeychainWhereKey = @"svce"; +NSString *const kSAMKeychainErrorDomain = @"com.samsoffes.samkeychain"; +NSString *const kSAMKeychainAccountKey = @"acct"; +NSString *const kSAMKeychainCreatedAtKey = @"cdat"; +NSString *const kSAMKeychainClassKey = @"labl"; +NSString *const kSAMKeychainDescriptionKey = @"desc"; +NSString *const kSAMKeychainLabelKey = @"labl"; +NSString *const kSAMKeychainLastModifiedKey = @"mdat"; +NSString *const kSAMKeychainWhereKey = @"svce"; #if __IPHONE_4_0 && TARGET_OS_IPHONE - static CFTypeRef SSKeychainAccessibilityType = NULL; + static CFTypeRef SAMKeychainAccessibilityType = NULL; #endif -@implementation SSKeychain +@implementation SAMKeychain + (NSString *)passwordForService:(NSString *)serviceName account:(NSString *)account { return [self passwordForService:serviceName account:account error:nil]; @@ -30,7 +30,7 @@ + (NSString *)passwordForService:(NSString *)serviceName account:(NSString *)acc + (NSString *)passwordForService:(NSString *)serviceName account:(NSString *)account error:(NSError *__autoreleasing *)error { - SSKeychainQuery *query = [[SSKeychainQuery alloc] init]; + SAMKeychainQuery *query = [[SAMKeychainQuery alloc] init]; query.service = serviceName; query.account = account; [query fetch:error]; @@ -42,7 +42,7 @@ + (NSData *)passwordDataForService:(NSString *)serviceName account:(NSString *)a } + (NSData *)passwordDataForService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error { - SSKeychainQuery *query = [[SSKeychainQuery alloc] init]; + SAMKeychainQuery *query = [[SAMKeychainQuery alloc] init]; query.service = serviceName; query.account = account; [query fetch:error]; @@ -57,7 +57,7 @@ + (BOOL)deletePasswordForService:(NSString *)serviceName account:(NSString *)acc + (BOOL)deletePasswordForService:(NSString *)serviceName account:(NSString *)account error:(NSError *__autoreleasing *)error { - SSKeychainQuery *query = [[SSKeychainQuery alloc] init]; + SAMKeychainQuery *query = [[SAMKeychainQuery alloc] init]; query.service = serviceName; query.account = account; return [query deleteItem:error]; @@ -70,7 +70,7 @@ + (BOOL)setPassword:(NSString *)password forService:(NSString *)serviceName acco + (BOOL)setPassword:(NSString *)password forService:(NSString *)serviceName account:(NSString *)account error:(NSError *__autoreleasing *)error { - SSKeychainQuery *query = [[SSKeychainQuery alloc] init]; + SAMKeychainQuery *query = [[SAMKeychainQuery alloc] init]; query.service = serviceName; query.account = account; query.password = password; @@ -83,7 +83,7 @@ + (BOOL)setPasswordData:(NSData *)password forService:(NSString *)serviceName ac + (BOOL)setPasswordData:(NSData *)password forService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error { - SSKeychainQuery *query = [[SSKeychainQuery alloc] init]; + SAMKeychainQuery *query = [[SAMKeychainQuery alloc] init]; query.service = serviceName; query.account = account; query.passwordData = password; @@ -106,7 +106,7 @@ + (NSArray *)accountsForService:(NSString *)serviceName { + (NSArray *)accountsForService:(NSString *)serviceName error:(NSError *__autoreleasing *)error { - SSKeychainQuery *query = [[SSKeychainQuery alloc] init]; + SAMKeychainQuery *query = [[SAMKeychainQuery alloc] init]; query.service = serviceName; return [query fetchAll:error]; } @@ -114,16 +114,16 @@ + (NSArray *)accountsForService:(NSString *)serviceName error:(NSError *__autore #if __IPHONE_4_0 && TARGET_OS_IPHONE + (CFTypeRef)accessibilityType { - return SSKeychainAccessibilityType; + return SAMKeychainAccessibilityType; } + (void)setAccessibilityType:(CFTypeRef)accessibilityType { CFRetain(accessibilityType); - if (SSKeychainAccessibilityType) { - CFRelease(SSKeychainAccessibilityType); + if (SAMKeychainAccessibilityType) { + CFRelease(SAMKeychainAccessibilityType); } - SSKeychainAccessibilityType = accessibilityType; + SAMKeychainAccessibilityType = accessibilityType; } #endif diff --git a/Sources/SSKeychainQuery.h b/Sources/SAMKeychainQuery.h similarity index 81% rename from Sources/SSKeychainQuery.h rename to Sources/SAMKeychainQuery.h index 7f8ebc2..8854103 100644 --- a/Sources/SSKeychainQuery.h +++ b/Sources/SAMKeychainQuery.h @@ -1,6 +1,6 @@ // -// SSKeychainQuery.h -// SSKeychain +// SAMKeychainQuery.h +// SAMKeychain // // Created by Caleb Davenport on 3/19/13. // Copyright (c) 2013-2014 Sam Soffes. All rights reserved. @@ -16,26 +16,26 @@ #if __IPHONE_7_0 || __MAC_10_9 // Keychain synchronization available at compile time - #define SSKEYCHAIN_SYNCHRONIZATION_AVAILABLE 1 + #define SAMKEYCHAIN_SYNCHRONIZATION_AVAILABLE 1 #endif #if __IPHONE_3_0 || __MAC_10_9 // Keychain access group available at compile time - #define SSKEYCHAIN_ACCESS_GROUP_AVAILABLE 1 + #define SAMKEYCHAIN_ACCESS_GROUP_AVAILABLE 1 #endif -#ifdef SSKEYCHAIN_SYNCHRONIZATION_AVAILABLE -typedef NS_ENUM(NSUInteger, SSKeychainQuerySynchronizationMode) { - SSKeychainQuerySynchronizationModeAny, - SSKeychainQuerySynchronizationModeNo, - SSKeychainQuerySynchronizationModeYes +#ifdef SAMKEYCHAIN_SYNCHRONIZATION_AVAILABLE +typedef NS_ENUM(NSUInteger, SAMKeychainQuerySynchronizationMode) { + SAMKeychainQuerySynchronizationModeAny, + SAMKeychainQuerySynchronizationModeNo, + SAMKeychainQuerySynchronizationModeYes }; #endif /** Simple interface for querying or modifying keychain items. */ -@interface SSKeychainQuery : NSObject +@interface SAMKeychainQuery : NSObject /** kSecAttrAccount */ @property (nonatomic, copy) NSString *account; @@ -46,14 +46,14 @@ typedef NS_ENUM(NSUInteger, SSKeychainQuerySynchronizationMode) { /** kSecAttrLabel */ @property (nonatomic, copy) NSString *label; -#ifdef SSKEYCHAIN_ACCESS_GROUP_AVAILABLE +#ifdef SAMKEYCHAIN_ACCESS_GROUP_AVAILABLE /** kSecAttrAccessGroup (only used on iOS) */ @property (nonatomic, copy) NSString *accessGroup; #endif -#ifdef SSKEYCHAIN_SYNCHRONIZATION_AVAILABLE +#ifdef SAMKEYCHAIN_SYNCHRONIZATION_AVAILABLE /** kSecAttrSynchronizable */ -@property (nonatomic) SSKeychainQuerySynchronizationMode synchronizationMode; +@property (nonatomic) SAMKeychainQuerySynchronizationMode synchronizationMode; #endif /** Root storage for password information */ @@ -129,10 +129,10 @@ typedef NS_ENUM(NSUInteger, SSKeychainQuerySynchronizationMode) { /// @name Synchronization Status ///----------------------------- -#ifdef SSKEYCHAIN_SYNCHRONIZATION_AVAILABLE +#ifdef SAMKEYCHAIN_SYNCHRONIZATION_AVAILABLE /** Returns a boolean indicating if keychain synchronization is available on the device at runtime. The #define - SSKEYCHAIN_SYNCHRONIZATION_AVAILABLE is only for compile time. If you are checking for the presence of synchronization, + SAMKEYCHAIN_SYNCHRONIZATION_AVAILABLE is only for compile time. If you are checking for the presence of synchronization, you should use this method. @return A value indicating if keychain synchronization is available diff --git a/Sources/SSKeychainQuery.m b/Sources/SAMKeychainQuery.m similarity index 83% rename from Sources/SSKeychainQuery.m rename to Sources/SAMKeychainQuery.m index 28887b0..466b8aa 100644 --- a/Sources/SSKeychainQuery.m +++ b/Sources/SAMKeychainQuery.m @@ -1,33 +1,33 @@ // -// SSKeychainQuery.m -// SSKeychain +// SAMKeychainQuery.m +// SAMKeychain // // Created by Caleb Davenport on 3/19/13. // Copyright (c) 2013-2014 Sam Soffes. All rights reserved. // -#import "SSKeychainQuery.h" -#import "SSKeychain.h" +#import "SAMKeychainQuery.h" +#import "SAMKeychain.h" -@implementation SSKeychainQuery +@implementation SAMKeychainQuery @synthesize account = _account; @synthesize service = _service; @synthesize label = _label; @synthesize passwordData = _passwordData; -#ifdef SSKEYCHAIN_ACCESS_GROUP_AVAILABLE +#ifdef SAMKEYCHAIN_ACCESS_GROUP_AVAILABLE @synthesize accessGroup = _accessGroup; #endif -#ifdef SSKEYCHAIN_SYNCHRONIZATION_AVAILABLE +#ifdef SAMKEYCHAIN_SYNCHRONIZATION_AVAILABLE @synthesize synchronizationMode = _synchronizationMode; #endif #pragma mark - Public - (BOOL)save:(NSError *__autoreleasing *)error { - OSStatus status = SSKeychainErrorBadArguments; + OSStatus status = SAMKeychainErrorBadArguments; if (!self.service || !self.account || !self.passwordData) { if (error) { *error = [[self class] errorWithCode:status]; @@ -41,7 +41,7 @@ - (BOOL)save:(NSError *__autoreleasing *)error { query = [[NSMutableDictionary alloc]init]; [query setObject:self.passwordData forKey:(__bridge id)kSecValueData]; #if __IPHONE_4_0 && TARGET_OS_IPHONE - CFTypeRef accessibilityType = [SSKeychain accessibilityType]; + CFTypeRef accessibilityType = [SAMKeychain accessibilityType]; if (accessibilityType) { [query setObject:(__bridge id)accessibilityType forKey:(__bridge id)kSecAttrAccessible]; } @@ -54,7 +54,7 @@ - (BOOL)save:(NSError *__autoreleasing *)error { } [query setObject:self.passwordData forKey:(__bridge id)kSecValueData]; #if __IPHONE_4_0 && TARGET_OS_IPHONE - CFTypeRef accessibilityType = [SSKeychain accessibilityType]; + CFTypeRef accessibilityType = [SAMKeychain accessibilityType]; if (accessibilityType) { [query setObject:(__bridge id)accessibilityType forKey:(__bridge id)kSecAttrAccessible]; } @@ -68,7 +68,7 @@ - (BOOL)save:(NSError *__autoreleasing *)error { - (BOOL)deleteItem:(NSError *__autoreleasing *)error { - OSStatus status = SSKeychainErrorBadArguments; + OSStatus status = SAMKeychainErrorBadArguments; if (!self.service || !self.account) { if (error) { *error = [[self class] errorWithCode:status]; @@ -111,7 +111,7 @@ - (NSArray *)fetchAll:(NSError *__autoreleasing *)error { [query setObject:@YES forKey:(__bridge id)kSecReturnAttributes]; [query setObject:(__bridge id)kSecMatchLimitAll forKey:(__bridge id)kSecMatchLimit]; #if __IPHONE_4_0 && TARGET_OS_IPHONE - CFTypeRef accessibilityType = [SSKeychain accessibilityType]; + CFTypeRef accessibilityType = [SAMKeychain accessibilityType]; if (accessibilityType) { [query setObject:(__bridge id)accessibilityType forKey:(__bridge id)kSecAttrAccessible]; } @@ -129,7 +129,7 @@ - (NSArray *)fetchAll:(NSError *__autoreleasing *)error { - (BOOL)fetch:(NSError *__autoreleasing *)error { - OSStatus status = SSKeychainErrorBadArguments; + OSStatus status = SAMKeychainErrorBadArguments; if (!self.service || !self.account) { if (error) { *error = [[self class] errorWithCode:status]; @@ -185,7 +185,7 @@ - (NSString *)password { #pragma mark - Synchronization Status -#ifdef SSKEYCHAIN_SYNCHRONIZATION_AVAILABLE +#ifdef SAMKEYCHAIN_SYNCHRONIZATION_AVAILABLE + (BOOL)isSynchronizationAvailable { #if TARGET_OS_IPHONE // Apple suggested way to check for 7.0 at runtime @@ -212,7 +212,7 @@ - (NSMutableDictionary *)query { [dictionary setObject:self.account forKey:(__bridge id)kSecAttrAccount]; } -#ifdef SSKEYCHAIN_ACCESS_GROUP_AVAILABLE +#ifdef SAMKEYCHAIN_ACCESS_GROUP_AVAILABLE #if !TARGET_IPHONE_SIMULATOR if (self.accessGroup) { [dictionary setObject:self.accessGroup forKey:(__bridge id)kSecAttrAccessGroup]; @@ -220,20 +220,20 @@ - (NSMutableDictionary *)query { #endif #endif -#ifdef SSKEYCHAIN_SYNCHRONIZATION_AVAILABLE +#ifdef SAMKEYCHAIN_SYNCHRONIZATION_AVAILABLE if ([[self class] isSynchronizationAvailable]) { id value; switch (self.synchronizationMode) { - case SSKeychainQuerySynchronizationModeNo: { + case SAMKeychainQuerySynchronizationModeNo: { value = @NO; break; } - case SSKeychainQuerySynchronizationModeYes: { + case SAMKeychainQuerySynchronizationModeYes: { value = @YES; break; } - case SSKeychainQuerySynchronizationModeAny: { + case SAMKeychainQuerySynchronizationModeAny: { value = (__bridge id)(kSecAttrSynchronizableAny); break; } @@ -251,54 +251,54 @@ + (NSError *)errorWithCode:(OSStatus) code { static dispatch_once_t onceToken; static NSBundle *resourcesBundle = nil; dispatch_once(&onceToken, ^{ - NSURL *url = [[NSBundle bundleForClass:[self class]] URLForResource:@"SSKeychain" withExtension:@"bundle"]; + NSURL *url = [[NSBundle bundleForClass:[self class]] URLForResource:@"SAMKeychain" withExtension:@"bundle"]; resourcesBundle = [NSBundle bundleWithURL:url]; }); NSString *message = nil; switch (code) { case errSecSuccess: return nil; - case SSKeychainErrorBadArguments: message = NSLocalizedStringFromTableInBundle(@"SSKeychainErrorBadArguments", @"SSKeychain", resourcesBundle, nil); break; + case SAMKeychainErrorBadArguments: message = NSLocalizedStringFromTableInBundle(@"SAMKeychainErrorBadArguments", @"SAMKeychain", resourcesBundle, nil); break; #if TARGET_OS_IPHONE case errSecUnimplemented: { - message = NSLocalizedStringFromTableInBundle(@"errSecUnimplemented", @"SSKeychain", resourcesBundle, nil); + message = NSLocalizedStringFromTableInBundle(@"errSecUnimplemented", @"SAMKeychain", resourcesBundle, nil); break; } case errSecParam: { - message = NSLocalizedStringFromTableInBundle(@"errSecParam", @"SSKeychain", resourcesBundle, nil); + message = NSLocalizedStringFromTableInBundle(@"errSecParam", @"SAMKeychain", resourcesBundle, nil); break; } case errSecAllocate: { - message = NSLocalizedStringFromTableInBundle(@"errSecAllocate", @"SSKeychain", resourcesBundle, nil); + message = NSLocalizedStringFromTableInBundle(@"errSecAllocate", @"SAMKeychain", resourcesBundle, nil); break; } case errSecNotAvailable: { - message = NSLocalizedStringFromTableInBundle(@"errSecNotAvailable", @"SSKeychain", resourcesBundle, nil); + message = NSLocalizedStringFromTableInBundle(@"errSecNotAvailable", @"SAMKeychain", resourcesBundle, nil); break; } case errSecDuplicateItem: { - message = NSLocalizedStringFromTableInBundle(@"errSecDuplicateItem", @"SSKeychain", resourcesBundle, nil); + message = NSLocalizedStringFromTableInBundle(@"errSecDuplicateItem", @"SAMKeychain", resourcesBundle, nil); break; } case errSecItemNotFound: { - message = NSLocalizedStringFromTableInBundle(@"errSecItemNotFound", @"SSKeychain", resourcesBundle, nil); + message = NSLocalizedStringFromTableInBundle(@"errSecItemNotFound", @"SAMKeychain", resourcesBundle, nil); break; } case errSecInteractionNotAllowed: { - message = NSLocalizedStringFromTableInBundle(@"errSecInteractionNotAllowed", @"SSKeychain", resourcesBundle, nil); + message = NSLocalizedStringFromTableInBundle(@"errSecInteractionNotAllowed", @"SAMKeychain", resourcesBundle, nil); break; } case errSecDecode: { - message = NSLocalizedStringFromTableInBundle(@"errSecDecode", @"SSKeychain", resourcesBundle, nil); + message = NSLocalizedStringFromTableInBundle(@"errSecDecode", @"SAMKeychain", resourcesBundle, nil); break; } case errSecAuthFailed: { - message = NSLocalizedStringFromTableInBundle(@"errSecAuthFailed", @"SSKeychain", resourcesBundle, nil); + message = NSLocalizedStringFromTableInBundle(@"errSecAuthFailed", @"SAMKeychain", resourcesBundle, nil); break; } default: { - message = NSLocalizedStringFromTableInBundle(@"errSecDefault", @"SSKeychain", resourcesBundle, nil); + message = NSLocalizedStringFromTableInBundle(@"errSecDefault", @"SAMKeychain", resourcesBundle, nil); } #else default: @@ -310,7 +310,7 @@ + (NSError *)errorWithCode:(OSStatus) code { if (message) { userInfo = @{ NSLocalizedDescriptionKey : message }; } - return [NSError errorWithDomain:kSSKeychainErrorDomain code:code userInfo:userInfo]; + return [NSError errorWithDomain:kSAMKeychainErrorDomain code:code userInfo:userInfo]; } @end diff --git a/Support/SSKeychain.bundle/en.lproj/SSKeychain.strings b/Support/SAMKeychain.bundle/en.lproj/SAMKeychain.strings similarity index 88% rename from Support/SSKeychain.bundle/en.lproj/SSKeychain.strings rename to Support/SAMKeychain.bundle/en.lproj/SAMKeychain.strings index faeb205..5c0f174 100644 Binary files a/Support/SSKeychain.bundle/en.lproj/SSKeychain.strings and b/Support/SAMKeychain.bundle/en.lproj/SAMKeychain.strings differ diff --git a/Tests/KeychainTests.swift b/Tests/KeychainTests.swift index 05125f1..f51c480 100644 --- a/Tests/KeychainTests.swift +++ b/Tests/KeychainTests.swift @@ -1,13 +1,13 @@ // // KeychainTests.swift -// SSKeychain +// SAMKeychain // // Created by Sam Soffes on 3/10/16. // Copyright © 2010-2016 Sam Soffes. All rights reserved. // import XCTest -import SSKeychain +import SAMKeychain class KeychainTests: XCTestCase { @@ -22,7 +22,7 @@ class KeychainTests: XCTestCase { // MARK: - XCTestCase override func tearDown() { - SSKeychain.deletePasswordForService(testService, account: testAccount) + SAMKeychain.deletePasswordForService(testService, account: testAccount) super.tearDown() } @@ -31,7 +31,7 @@ class KeychainTests: XCTestCase { func testNewItem() { // New item - let newQuery = SSKeychainQuery() + let newQuery = SAMKeychainQuery() newQuery.password = testPassword newQuery.service = testService newQuery.account = testAccount @@ -39,7 +39,7 @@ class KeychainTests: XCTestCase { try! newQuery.save() // Look up - let lookupQuery = SSKeychainQuery() + let lookupQuery = SAMKeychainQuery() lookupQuery.service = testService lookupQuery.account = testAccount try! lookupQuery.fetch() @@ -47,7 +47,7 @@ class KeychainTests: XCTestCase { XCTAssertEqual(newQuery.password, lookupQuery.password) // Search for all accounts - let allQuery = SSKeychainQuery() + let allQuery = SAMKeychainQuery() var accounts = try! allQuery.fetchAll() XCTAssertTrue(self.accounts(accounts, containsAccountWithName: testAccount), "Matching account was not returned") @@ -57,14 +57,14 @@ class KeychainTests: XCTestCase { XCTAssertTrue(self.accounts(accounts, containsAccountWithName: testAccount), "Matching account was not returned") // Delete - let deleteQuery = SSKeychainQuery() + let deleteQuery = SAMKeychainQuery() deleteQuery.service = testService deleteQuery.account = testAccount try! deleteQuery.deleteItem() } func testPasswordObject() { - let newQuery = SSKeychainQuery() + let newQuery = SAMKeychainQuery() newQuery.service = testService newQuery.account = testAccount @@ -76,7 +76,7 @@ class KeychainTests: XCTestCase { newQuery.passwordObject = dictionary try! newQuery.save() - let lookupQuery = SSKeychainQuery() + let lookupQuery = SAMKeychainQuery() lookupQuery.service = testService lookupQuery.account = testAccount try! lookupQuery.fetch() @@ -86,62 +86,62 @@ class KeychainTests: XCTestCase { } func testCreateWithMissingInformation() { - var query = SSKeychainQuery() + var query = SAMKeychainQuery() query.service = testService query.account = testAccount XCTAssertThrowsError(try query.save()) - query = SSKeychainQuery() + query = SAMKeychainQuery() query.account = testAccount query.password = testPassword XCTAssertThrowsError(try query.save()) - query = SSKeychainQuery() + query = SAMKeychainQuery() query.service = testService query.password = testPassword XCTAssertThrowsError(try query.save()) } func testDeleteWithMissingInformation() { - var query = SSKeychainQuery() + var query = SAMKeychainQuery() query.account = testAccount XCTAssertThrowsError(try query.deleteItem()) - query = SSKeychainQuery() + query = SAMKeychainQuery() query.service = testService XCTAssertThrowsError(try query.deleteItem()) - query = SSKeychainQuery() + query = SAMKeychainQuery() query.account = testAccount XCTAssertThrowsError(try query.deleteItem()) } func testFetchWithMissingInformation() { - var query = SSKeychainQuery() + var query = SAMKeychainQuery() query.account = testAccount XCTAssertThrowsError(try query.fetch()) - query = SSKeychainQuery() + query = SAMKeychainQuery() query.service = testService XCTAssertThrowsError(try query.fetch()) } func testSynchronizable() { - let createQuery = SSKeychainQuery() + let createQuery = SAMKeychainQuery() createQuery.service = testService createQuery.account = testAccount createQuery.password = testPassword createQuery.synchronizationMode = .Yes try! createQuery.save() - let noFetchQuery = SSKeychainQuery() + let noFetchQuery = SAMKeychainQuery() noFetchQuery.service = testService noFetchQuery.account = testAccount noFetchQuery.synchronizationMode = .No XCTAssertThrowsError(try noFetchQuery.fetch()) XCTAssertNotEqual(createQuery.password, noFetchQuery.password) - let anyFetchQuery = SSKeychainQuery() + let anyFetchQuery = SAMKeychainQuery() anyFetchQuery.service = testService anyFetchQuery.account = testAccount anyFetchQuery.synchronizationMode = .Any @@ -151,43 +151,43 @@ class KeychainTests: XCTestCase { func testConvenienceMethods() { // Create a new item - SSKeychain.setPassword(testPassword, forService: testService, account: testAccount) + SAMKeychain.setPassword(testPassword, forService: testService, account: testAccount) // Check password - XCTAssertEqual(testPassword, SSKeychain.passwordForService(testService, account: testAccount)) + XCTAssertEqual(testPassword, SAMKeychain.passwordForService(testService, account: testAccount)) // Check all accounts - XCTAssertTrue(accounts(SSKeychain.allAccounts(), containsAccountWithName: testAccount)) + XCTAssertTrue(accounts(SAMKeychain.allAccounts(), containsAccountWithName: testAccount)) // Check account - XCTAssertTrue(accounts(SSKeychain.accountsForService(testService), containsAccountWithName: testAccount)) + XCTAssertTrue(accounts(SAMKeychain.accountsForService(testService), containsAccountWithName: testAccount)) #if !os(OSX) - SSKeychain.setAccessibilityType(kSecAttrAccessibleWhenUnlockedThisDeviceOnly) - XCTAssertEqual(String(kSecAttrAccessibleWhenUnlockedThisDeviceOnly), String(SSKeychain.accessibilityType().takeRetainedValue())) + SAMKeychain.setAccessibilityType(kSecAttrAccessibleWhenUnlockedThisDeviceOnly) + XCTAssertEqual(String(kSecAttrAccessibleWhenUnlockedThisDeviceOnly), String(SAMKeychain.accessibilityType().takeRetainedValue())) #endif } func testUpdateAccessibilityType() { - SSKeychain.setAccessibilityType(kSecAttrAccessibleWhenUnlockedThisDeviceOnly) + SAMKeychain.setAccessibilityType(kSecAttrAccessibleWhenUnlockedThisDeviceOnly) // Create a new item - SSKeychain.setPassword(testPassword, forService: testService, account: testAccount) + SAMKeychain.setPassword(testPassword, forService: testService, account: testAccount) // Check all accounts - XCTAssertTrue(accounts(SSKeychain.allAccounts(), containsAccountWithName: testAccount)) + XCTAssertTrue(accounts(SAMKeychain.allAccounts(), containsAccountWithName: testAccount)) // Check account - XCTAssertTrue(accounts(SSKeychain.accountsForService(testService), containsAccountWithName: testAccount)) + XCTAssertTrue(accounts(SAMKeychain.accountsForService(testService), containsAccountWithName: testAccount)) - SSKeychain.setAccessibilityType(kSecAttrAccessibleAlwaysThisDeviceOnly) - SSKeychain.setPassword(testPassword, forService: testService, account: testAccount) + SAMKeychain.setAccessibilityType(kSecAttrAccessibleAlwaysThisDeviceOnly) + SAMKeychain.setPassword(testPassword, forService: testService, account: testAccount) // Check all accounts - XCTAssertTrue(accounts(SSKeychain.allAccounts(), containsAccountWithName: testAccount)) + XCTAssertTrue(accounts(SAMKeychain.allAccounts(), containsAccountWithName: testAccount)) // Check account - XCTAssertTrue(accounts(SSKeychain.accountsForService(testService), containsAccountWithName: testAccount)) + XCTAssertTrue(accounts(SAMKeychain.accountsForService(testService), containsAccountWithName: testAccount)) }