mirror of
https://github.com/zhigang1992/UICKeyChainStore.git
synced 2026-01-12 22:53:17 +08:00
Migrate to XCTest.
This commit is contained in:
@@ -44,7 +44,8 @@ static NSString *_defaultService;
|
||||
return [[self alloc] initWithService:service];
|
||||
}
|
||||
|
||||
+ (UICKeyChainStore *)keyChainStoreWithService:(NSString *)service accessGroup:(NSString *)accessGroup {
|
||||
+ (UICKeyChainStore *)keyChainStoreWithService:(NSString *)service accessGroup:(NSString *)accessGroup
|
||||
{
|
||||
return [[self alloc] initWithService:service accessGroup:accessGroup];
|
||||
}
|
||||
|
||||
|
||||
437
Mac/UICKeyChainStore.xcodeproj/project.pbxproj
Normal file
437
Mac/UICKeyChainStore.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,437 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
147256D61957100600989F75 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 147256D51957100600989F75 /* Cocoa.framework */; };
|
||||
147256E71957100600989F75 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 147256E61957100600989F75 /* XCTest.framework */; };
|
||||
147256E81957100600989F75 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 147256D51957100600989F75 /* Cocoa.framework */; };
|
||||
147256EB1957100600989F75 /* libUICKeyChainStore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147256D21957100600989F75 /* libUICKeyChainStore.a */; };
|
||||
147256F11957100600989F75 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 147256EF1957100600989F75 /* InfoPlist.strings */; };
|
||||
147256F31957100600989F75 /* UICKeyChainStoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 147256F21957100600989F75 /* UICKeyChainStoreTests.m */; };
|
||||
1472570E1957119900989F75 /* UICKeyChainStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 1472570C1957119900989F75 /* UICKeyChainStore.h */; };
|
||||
1472570F1957119900989F75 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 1472570D1957119900989F75 /* UICKeyChainStore.m */; };
|
||||
147257101957119900989F75 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 1472570D1957119900989F75 /* UICKeyChainStore.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
147256E91957100600989F75 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 147256CA1957100600989F75 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 147256D11957100600989F75;
|
||||
remoteInfo = UICKeyChainStore;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
147256D21957100600989F75 /* libUICKeyChainStore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libUICKeyChainStore.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
147256D51957100600989F75 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
147256D81957100600989F75 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
147256D91957100600989F75 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
|
||||
147256DA1957100600989F75 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
147256DD1957100600989F75 /* UICKeyChainStore-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UICKeyChainStore-Prefix.pch"; sourceTree = "<group>"; };
|
||||
147256E51957100600989F75 /* UICKeyChainStoreTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UICKeyChainStoreTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
147256E61957100600989F75 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
147256EE1957100600989F75 /* UICKeyChainStoreTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UICKeyChainStoreTests-Info.plist"; sourceTree = "<group>"; };
|
||||
147256F01957100600989F75 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
147256F21957100600989F75 /* UICKeyChainStoreTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UICKeyChainStoreTests.m; sourceTree = "<group>"; };
|
||||
1472570C1957119900989F75 /* UICKeyChainStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICKeyChainStore.h; sourceTree = "<group>"; };
|
||||
1472570D1957119900989F75 /* UICKeyChainStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICKeyChainStore.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
147256CF1957100600989F75 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
147256D61957100600989F75 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
147256E21957100600989F75 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
147256E81957100600989F75 /* Cocoa.framework in Frameworks */,
|
||||
147256EB1957100600989F75 /* libUICKeyChainStore.a in Frameworks */,
|
||||
147256E71957100600989F75 /* XCTest.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
147256C91957100600989F75 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1472570B1957119900989F75 /* Lib */,
|
||||
147256DB1957100600989F75 /* UICKeyChainStore */,
|
||||
147256EC1957100600989F75 /* UICKeyChainStoreTests */,
|
||||
147256D41957100600989F75 /* Frameworks */,
|
||||
147256D31957100600989F75 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256D31957100600989F75 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256D21957100600989F75 /* libUICKeyChainStore.a */,
|
||||
147256E51957100600989F75 /* UICKeyChainStoreTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256D41957100600989F75 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256D51957100600989F75 /* Cocoa.framework */,
|
||||
147256E61957100600989F75 /* XCTest.framework */,
|
||||
147256D71957100600989F75 /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256D71957100600989F75 /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256D81957100600989F75 /* Foundation.framework */,
|
||||
147256D91957100600989F75 /* CoreData.framework */,
|
||||
147256DA1957100600989F75 /* AppKit.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256DB1957100600989F75 /* UICKeyChainStore */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256DC1957100600989F75 /* Supporting Files */,
|
||||
);
|
||||
path = UICKeyChainStore;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256DC1957100600989F75 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256DD1957100600989F75 /* UICKeyChainStore-Prefix.pch */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256EC1957100600989F75 /* UICKeyChainStoreTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256F21957100600989F75 /* UICKeyChainStoreTests.m */,
|
||||
147256ED1957100600989F75 /* Supporting Files */,
|
||||
);
|
||||
path = UICKeyChainStoreTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256ED1957100600989F75 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256EE1957100600989F75 /* UICKeyChainStoreTests-Info.plist */,
|
||||
147256EF1957100600989F75 /* InfoPlist.strings */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1472570B1957119900989F75 /* Lib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1472570C1957119900989F75 /* UICKeyChainStore.h */,
|
||||
1472570D1957119900989F75 /* UICKeyChainStore.m */,
|
||||
);
|
||||
name = Lib;
|
||||
path = ../Lib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
147256D01957100600989F75 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1472570E1957119900989F75 /* UICKeyChainStore.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
147256D11957100600989F75 /* UICKeyChainStore */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 147256F61957100600989F75 /* Build configuration list for PBXNativeTarget "UICKeyChainStore" */;
|
||||
buildPhases = (
|
||||
147256CE1957100600989F75 /* Sources */,
|
||||
147256CF1957100600989F75 /* Frameworks */,
|
||||
147256D01957100600989F75 /* Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = UICKeyChainStore;
|
||||
productName = UICKeyChainStore;
|
||||
productReference = 147256D21957100600989F75 /* libUICKeyChainStore.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
147256E41957100600989F75 /* UICKeyChainStoreTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 147256F91957100600989F75 /* Build configuration list for PBXNativeTarget "UICKeyChainStoreTests" */;
|
||||
buildPhases = (
|
||||
147256E11957100600989F75 /* Sources */,
|
||||
147256E21957100600989F75 /* Frameworks */,
|
||||
147256E31957100600989F75 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
147256EA1957100600989F75 /* PBXTargetDependency */,
|
||||
);
|
||||
name = UICKeyChainStoreTests;
|
||||
productName = UICKeyChainStoreTests;
|
||||
productReference = 147256E51957100600989F75 /* UICKeyChainStoreTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
147256CA1957100600989F75 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0510;
|
||||
ORGANIZATIONNAME = "kishikawa katsumi";
|
||||
};
|
||||
buildConfigurationList = 147256CD1957100600989F75 /* Build configuration list for PBXProject "UICKeyChainStore" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 147256C91957100600989F75;
|
||||
productRefGroup = 147256D31957100600989F75 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
147256D11957100600989F75 /* UICKeyChainStore */,
|
||||
147256E41957100600989F75 /* UICKeyChainStoreTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
147256E31957100600989F75 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
147256F11957100600989F75 /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
147256CE1957100600989F75 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1472570F1957119900989F75 /* UICKeyChainStore.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
147256E11957100600989F75 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
147256F31957100600989F75 /* UICKeyChainStoreTests.m in Sources */,
|
||||
147257101957119900989F75 /* UICKeyChainStore.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
147256EA1957100600989F75 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 147256D11957100600989F75 /* UICKeyChainStore */;
|
||||
targetProxy = 147256E91957100600989F75 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
147256EF1957100600989F75 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
147256F01957100600989F75 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
147256F41957100600989F75 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
147256F51957100600989F75 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
147256F71957100600989F75 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
147256F81957100600989F75 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
147256FA1957100600989F75 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = "UICKeyChainStoreTests/UICKeyChainStoreTests-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = xctest;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
147256FB1957100600989F75 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
INFOPLIST_FILE = "UICKeyChainStoreTests/UICKeyChainStoreTests-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = xctest;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
147256CD1957100600989F75 /* Build configuration list for PBXProject "UICKeyChainStore" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
147256F41957100600989F75 /* Debug */,
|
||||
147256F51957100600989F75 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
147256F61957100600989F75 /* Build configuration list for PBXNativeTarget "UICKeyChainStore" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
147256F71957100600989F75 /* Debug */,
|
||||
147256F81957100600989F75 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
147256F91957100600989F75 /* Build configuration list for PBXNativeTarget "UICKeyChainStoreTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
147256FA1957100600989F75 /* Debug */,
|
||||
147256FB1957100600989F75 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 147256CA1957100600989F75 /* Project object */;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0500"
|
||||
LastUpgradeVersion = "0510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -14,9 +14,9 @@
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "145652D31822C57A00BF1709"
|
||||
BuildableName = "liblibUICKeyChainStore.a"
|
||||
BlueprintName = "libUICKeyChainStore"
|
||||
BlueprintIdentifier = "147256D11957100600989F75"
|
||||
BuildableName = "libUICKeyChainStore.a"
|
||||
BlueprintName = "UICKeyChainStore"
|
||||
ReferencedContainer = "container:UICKeyChainStore.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
@@ -28,6 +28,16 @@
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "147256E41957100600989F75"
|
||||
BuildableName = "UICKeyChainStoreTests.xctest"
|
||||
BlueprintName = "UICKeyChainStoreTests"
|
||||
ReferencedContainer = "container:UICKeyChainStore.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.beepscore.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>com.kishikawakatsumi.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
219
Mac/UICKeyChainStoreTests/UICKeyChainStoreTests.m
Normal file
219
Mac/UICKeyChainStoreTests/UICKeyChainStoreTests.m
Normal file
@@ -0,0 +1,219 @@
|
||||
//
|
||||
// UICKeyChainStoreTests.m
|
||||
// UICKeyChainStoreTests
|
||||
//
|
||||
// Created by kishikawa katsumi on 2014/06/22.
|
||||
// Copyright (c) 2014 kishikawa katsumi. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "UICKeyChainStore.h"
|
||||
|
||||
@interface UICKeyChainStoreTests : XCTestCase {
|
||||
NSString *kStubKey;
|
||||
NSString *kStubString;
|
||||
NSString *kStubService;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation UICKeyChainStoreTests
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[super setUp];
|
||||
|
||||
kStubKey = @"password";
|
||||
kStubString = @"password1234";
|
||||
kStubService = @"com.kishikawakatsumi";
|
||||
|
||||
[UICKeyChainStore setDefaultService:kStubService];
|
||||
|
||||
[UICKeyChainStore removeAllItems];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
- (void)testSetDefaultService
|
||||
{
|
||||
NSString *serviceName = @"com.kishikawakatsumi.UICKeyChainStore";
|
||||
[UICKeyChainStore setDefaultService:serviceName];
|
||||
XCTAssertEqualObjects(serviceName, [UICKeyChainStore defaultService], @"specitfy default service name");
|
||||
}
|
||||
|
||||
- (void)testInitializers
|
||||
{
|
||||
UICKeyChainStore *store = nil;
|
||||
|
||||
store = [UICKeyChainStore keyChainStore];
|
||||
XCTAssertEqualObjects(store.service, [UICKeyChainStore defaultService], @"instantiate default store");
|
||||
|
||||
store = [[UICKeyChainStore alloc] init];
|
||||
XCTAssertEqualObjects(store.service, [UICKeyChainStore defaultService], @"instantiate default store");
|
||||
|
||||
NSString *serviceName = @"com.kishikawakatsumi.UICKeyChainStore";
|
||||
store = [UICKeyChainStore keyChainStoreWithService:serviceName];
|
||||
XCTAssertEqualObjects(store.service, serviceName, @"instantiate custom service named store");
|
||||
}
|
||||
|
||||
- (void)testSetData
|
||||
{
|
||||
NSString *usernameKey = @"username";
|
||||
NSString *passwordKey = @"password";
|
||||
NSString *username = @"kishikawakatsumi";
|
||||
NSString *password = @"password1234";
|
||||
NSData *usernameData = [username dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
[UICKeyChainStore setData:[username dataUsingEncoding:NSUTF8StringEncoding] forKey:usernameKey];
|
||||
[UICKeyChainStore setData:[password dataUsingEncoding:NSUTF8StringEncoding] forKey:passwordKey];
|
||||
XCTAssertEqualObjects([UICKeyChainStore dataForKey:usernameKey], usernameData, @"stored username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore dataForKey:passwordKey], passwordData, @"stored password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:usernameKey service:[UICKeyChainStore defaultService]];
|
||||
XCTAssertNil([UICKeyChainStore dataForKey:usernameKey], @"removed username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore dataForKey:passwordKey], passwordData, @"left password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:passwordKey service:[UICKeyChainStore defaultService]];
|
||||
XCTAssertNil([UICKeyChainStore dataForKey:usernameKey], @"removed username");
|
||||
XCTAssertNil([UICKeyChainStore dataForKey:passwordKey], @"removed password");
|
||||
}
|
||||
|
||||
- (void)testSetUsernameAndPassword
|
||||
{
|
||||
NSString *usernameKey = @"username";
|
||||
NSString *passwordKey = @"password";
|
||||
NSString *username = @"kishikawakatsumi";
|
||||
NSString *password = @"password1234";
|
||||
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStore];
|
||||
[store removeAllItems];
|
||||
|
||||
[UICKeyChainStore setString:username forKey:usernameKey];
|
||||
[UICKeyChainStore setString:password forKey:passwordKey];
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:usernameKey], username, @"stored username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey], password, @"stored password");
|
||||
XCTAssertEqualObjects([store stringForKey:usernameKey], username, @"stored username");
|
||||
XCTAssertEqualObjects([store stringForKey:passwordKey], password, @"stored password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:usernameKey];
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:usernameKey], @"removed username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey], password, @"left password");
|
||||
XCTAssertEqualObjects([store stringForKey:passwordKey], password, @"left password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:passwordKey];
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:usernameKey], @"removed username");
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:passwordKey], @"removed password");
|
||||
XCTAssertNil([store stringForKey:usernameKey], @"removed username");
|
||||
XCTAssertNil([store stringForKey:passwordKey], @"removed password");
|
||||
}
|
||||
|
||||
- (void)testSetSynchronize
|
||||
{
|
||||
NSString *usernameKey = @"username";
|
||||
NSString *passwordKey = @"password";
|
||||
NSString *username = @"kishikawakatsumi";
|
||||
NSString *password = @"password1234";
|
||||
|
||||
NSString *serviceName = @"com.example.UICKeyChainStore";
|
||||
[UICKeyChainStore removeAllItemsForService:serviceName];
|
||||
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStoreWithService:serviceName];
|
||||
[store removeAllItems];
|
||||
|
||||
[store setString:username forKey:usernameKey];
|
||||
[store setString:password forKey:passwordKey];
|
||||
XCTAssertEqualObjects([store stringForKey:usernameKey], username, @"stored username");
|
||||
XCTAssertEqualObjects([store stringForKey:passwordKey], password, @"stored password");
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:usernameKey service:serviceName], @"not synchronized yet");
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:passwordKey service:serviceName], @"not synchronized yet");
|
||||
|
||||
[store synchronize];
|
||||
XCTAssertEqualObjects([store stringForKey:usernameKey], username, @"stored username");
|
||||
XCTAssertEqualObjects([store stringForKey:passwordKey], password, @"stored password");
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:usernameKey service:serviceName], username, @"stored username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey service:serviceName], password, @"stored password");
|
||||
|
||||
[store removeItemForKey:usernameKey];
|
||||
XCTAssertNil([store stringForKey:usernameKey], @"removed username");
|
||||
XCTAssertEqualObjects([store stringForKey:passwordKey], password, @"left password");
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:usernameKey service:serviceName], @"removed username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey service:serviceName], password, @"left password");
|
||||
|
||||
[store removeItemForKey:passwordKey];
|
||||
XCTAssertNil([store stringForKey:passwordKey], @"removed password");
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:passwordKey service:serviceName], @"removed password");
|
||||
}
|
||||
|
||||
- (void)testClassMethodsSetAndRemoveItem
|
||||
{
|
||||
// write to keychain
|
||||
[UICKeyChainStore setString:kStubString forKey:kStubKey];
|
||||
|
||||
// read from keychain, test keychain contains item
|
||||
NSString *actualString = [UICKeyChainStore stringForKey:kStubKey];
|
||||
NSString *expectedString = kStubString;
|
||||
XCTAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
|
||||
// remove item from keychain
|
||||
[UICKeyChainStore removeItemForKey:kStubKey];
|
||||
|
||||
// read from keychain, test keychain doesn't contain item
|
||||
actualString = [UICKeyChainStore stringForKey:kStubKey];
|
||||
expectedString = NULL;
|
||||
|
||||
XCTAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
}
|
||||
|
||||
- (void)testInstanceMethodsSetAndRemoveItem
|
||||
{
|
||||
// create an instance
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStoreWithService:kStubService];
|
||||
// write to keychain
|
||||
[store setString:kStubString forKey:kStubKey];
|
||||
[store synchronize];
|
||||
|
||||
// read from keychain, test keychain contains item
|
||||
NSString *actualString = [store stringForKey:kStubKey];
|
||||
NSString *expectedString = kStubString;
|
||||
XCTAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
|
||||
// remove item from keychain
|
||||
[store removeItemForKey:kStubKey];
|
||||
[store synchronize];
|
||||
|
||||
// read from keychain, test keychain doesn't contain item
|
||||
actualString = [store stringForKey:kStubKey];
|
||||
expectedString = NULL;
|
||||
XCTAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
|
||||
actualString = [store description];
|
||||
expectedString = @"(\n)";
|
||||
XCTAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
}
|
||||
|
||||
|
||||
- (void)testObjectSubscripting
|
||||
{
|
||||
// create an instance
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStoreWithService:kStubService];
|
||||
|
||||
NSString *expectedString = kStubString;
|
||||
|
||||
// write to keychain using obj subscripting
|
||||
store[kStubKey] = kStubString;
|
||||
[store synchronize];
|
||||
|
||||
// read from keychain using obj subscripting
|
||||
XCTAssertEqualObjects(store[kStubKey], kStubString, @"expected %@ but got %@", expectedString, store[kStubKey]);
|
||||
}
|
||||
|
||||
@end
|
||||
2
Mac/UICKeyChainStoreTests/en.lproj/InfoPlist.strings
Normal file
2
Mac/UICKeyChainStoreTests/en.lproj/InfoPlist.strings
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
@@ -1,606 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
145652D61822C57B00BF1709 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145652D51822C57B00BF1709 /* Cocoa.framework */; };
|
||||
145652E01822C57B00BF1709 /* libUICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 145652DF1822C57B00BF1709 /* libUICKeyChainStore.m */; };
|
||||
DE20784617AEBDA100B126C9 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE20784517AEBDA100B126C9 /* UIKit.framework */; };
|
||||
DE20784817AEBDA100B126C9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE20784717AEBDA100B126C9 /* Foundation.framework */; };
|
||||
DE20784A17AEBDA100B126C9 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE20784917AEBDA100B126C9 /* CoreGraphics.framework */; };
|
||||
DE20785217AEBDA100B126C9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DE20785117AEBDA100B126C9 /* main.m */; };
|
||||
DE20785617AEBDA100B126C9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DE20785517AEBDA100B126C9 /* AppDelegate.m */; };
|
||||
DE20785817AEBDA100B126C9 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = DE20785717AEBDA100B126C9 /* Default.png */; };
|
||||
DE20785A17AEBDA100B126C9 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DE20785917AEBDA100B126C9 /* Default@2x.png */; };
|
||||
DE20785C17AEBDA100B126C9 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DE20785B17AEBDA100B126C9 /* Default-568h@2x.png */; };
|
||||
DE20786417AEBDA100B126C9 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE20786317AEBDA100B126C9 /* SenTestingKit.framework */; };
|
||||
DE20786517AEBDA100B126C9 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE20784517AEBDA100B126C9 /* UIKit.framework */; };
|
||||
DE20786617AEBDA100B126C9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE20784717AEBDA100B126C9 /* Foundation.framework */; };
|
||||
DE20787117AEBDA100B126C9 /* UICKeyChainStoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE20787017AEBDA100B126C9 /* UICKeyChainStoreTests.m */; };
|
||||
DE2AD09917AEC313005E0F26 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = DE2AD09817AEC313005E0F26 /* UICKeyChainStore.m */; };
|
||||
DE2AD09A17AEC313005E0F26 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = DE2AD09817AEC313005E0F26 /* UICKeyChainStore.m */; };
|
||||
DEA2E65F17AED45900348F7B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEA2E65E17AED45900348F7B /* Security.framework */; };
|
||||
DEA2E66017AED46A00348F7B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEA2E65E17AED45900348F7B /* Security.framework */; };
|
||||
DECCCE8A17AEE93200701816 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DECCCE8917AEE93200701816 /* MainStoryboard.storyboard */; };
|
||||
DECCCE8D17AEEA9300701816 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DECCCE8C17AEEA9300701816 /* ViewController.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
DE20786717AEBDA100B126C9 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = DE20783A17AEBDA100B126C9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = DE20784117AEBDA100B126C9;
|
||||
remoteInfo = UICKeyChainStore;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1426600D17B96F6000E17A90 /* UICKeyChainStoreTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICKeyChainStoreTests.h; sourceTree = "<group>"; };
|
||||
145652D41822C57B00BF1709 /* liblibUICKeyChainStore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblibUICKeyChainStore.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
145652D51822C57B00BF1709 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; };
|
||||
145652D81822C57B00BF1709 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
145652D91822C57B00BF1709 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
|
||||
145652DA1822C57B00BF1709 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
145652DD1822C57B00BF1709 /* libUICKeyChainStore-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "libUICKeyChainStore-Prefix.pch"; sourceTree = "<group>"; };
|
||||
145652DE1822C57B00BF1709 /* libUICKeyChainStore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = libUICKeyChainStore.h; sourceTree = "<group>"; };
|
||||
145652DF1822C57B00BF1709 /* libUICKeyChainStore.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = libUICKeyChainStore.m; sourceTree = "<group>"; };
|
||||
145652E61822C57C00BF1709 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
DE20784217AEBDA100B126C9 /* UICKeyChainStore.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UICKeyChainStore.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DE20784517AEBDA100B126C9 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
DE20784717AEBDA100B126C9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
DE20784917AEBDA100B126C9 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
DE20784D17AEBDA100B126C9 /* UICKeyChainStore-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UICKeyChainStore-Info.plist"; sourceTree = "<group>"; };
|
||||
DE20785117AEBDA100B126C9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
DE20785317AEBDA100B126C9 /* UICKeyChainStore-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UICKeyChainStore-Prefix.pch"; sourceTree = "<group>"; };
|
||||
DE20785417AEBDA100B126C9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
DE20785517AEBDA100B126C9 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
DE20785717AEBDA100B126C9 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
|
||||
DE20785917AEBDA100B126C9 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
|
||||
DE20785B17AEBDA100B126C9 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
|
||||
DE20786217AEBDA100B126C9 /* UICKeyChainStoreTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UICKeyChainStoreTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DE20786317AEBDA100B126C9 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
|
||||
DE20786B17AEBDA100B126C9 /* UICKeyChainStoreTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UICKeyChainStoreTests-Info.plist"; sourceTree = "<group>"; };
|
||||
DE20787017AEBDA100B126C9 /* UICKeyChainStoreTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UICKeyChainStoreTests.m; sourceTree = "<group>"; };
|
||||
DE2AD09717AEC313005E0F26 /* UICKeyChainStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICKeyChainStore.h; sourceTree = "<group>"; };
|
||||
DE2AD09817AEC313005E0F26 /* UICKeyChainStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICKeyChainStore.m; sourceTree = "<group>"; };
|
||||
DEA2E65E17AED45900348F7B /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
DECCCE8917AEE93200701816 /* MainStoryboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard.storyboard; sourceTree = "<group>"; };
|
||||
DECCCE8B17AEEA9300701816 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
||||
DECCCE8C17AEEA9300701816 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
145652D11822C57A00BF1709 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
145652D61822C57B00BF1709 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DE20783F17AEBDA100B126C9 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DE20784817AEBDA100B126C9 /* Foundation.framework in Frameworks */,
|
||||
DE20784617AEBDA100B126C9 /* UIKit.framework in Frameworks */,
|
||||
DE20784A17AEBDA100B126C9 /* CoreGraphics.framework in Frameworks */,
|
||||
DEA2E65F17AED45900348F7B /* Security.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DE20785E17AEBDA100B126C9 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DE20786617AEBDA100B126C9 /* Foundation.framework in Frameworks */,
|
||||
DE20786517AEBDA100B126C9 /* UIKit.framework in Frameworks */,
|
||||
DEA2E66017AED46A00348F7B /* Security.framework in Frameworks */,
|
||||
DE20786417AEBDA100B126C9 /* SenTestingKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
145652D71822C57B00BF1709 /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
145652D51822C57B00BF1709 /* Cocoa.framework */,
|
||||
145652D81822C57B00BF1709 /* Foundation.framework */,
|
||||
145652D91822C57B00BF1709 /* CoreData.framework */,
|
||||
145652DA1822C57B00BF1709 /* AppKit.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
145652DB1822C57B00BF1709 /* libUICKeyChainStore */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
145652DE1822C57B00BF1709 /* libUICKeyChainStore.h */,
|
||||
145652DF1822C57B00BF1709 /* libUICKeyChainStore.m */,
|
||||
145652DC1822C57B00BF1709 /* Supporting Files */,
|
||||
);
|
||||
path = libUICKeyChainStore;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
145652DC1822C57B00BF1709 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
145652DD1822C57B00BF1709 /* libUICKeyChainStore-Prefix.pch */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DE20783917AEBDA100B126C9 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DE2AD09617AEC313005E0F26 /* Lib */,
|
||||
DE20784B17AEBDA100B126C9 /* UICKeyChainStore */,
|
||||
DE20786917AEBDA100B126C9 /* UICKeyChainStoreTests */,
|
||||
145652DB1822C57B00BF1709 /* libUICKeyChainStore */,
|
||||
DE20784417AEBDA100B126C9 /* Frameworks */,
|
||||
DE20784317AEBDA100B126C9 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DE20784317AEBDA100B126C9 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DE20784217AEBDA100B126C9 /* UICKeyChainStore.app */,
|
||||
DE20786217AEBDA100B126C9 /* UICKeyChainStoreTests.octest */,
|
||||
145652D41822C57B00BF1709 /* liblibUICKeyChainStore.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DE20784417AEBDA100B126C9 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DE20784717AEBDA100B126C9 /* Foundation.framework */,
|
||||
DE20784517AEBDA100B126C9 /* UIKit.framework */,
|
||||
DE20784917AEBDA100B126C9 /* CoreGraphics.framework */,
|
||||
DEA2E65E17AED45900348F7B /* Security.framework */,
|
||||
DE20786317AEBDA100B126C9 /* SenTestingKit.framework */,
|
||||
145652E61822C57C00BF1709 /* XCTest.framework */,
|
||||
145652D71822C57B00BF1709 /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DE20784B17AEBDA100B126C9 /* UICKeyChainStore */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DE20785417AEBDA100B126C9 /* AppDelegate.h */,
|
||||
DE20785517AEBDA100B126C9 /* AppDelegate.m */,
|
||||
DECCCE8B17AEEA9300701816 /* ViewController.h */,
|
||||
DECCCE8C17AEEA9300701816 /* ViewController.m */,
|
||||
DECCCE8917AEE93200701816 /* MainStoryboard.storyboard */,
|
||||
DE20784C17AEBDA100B126C9 /* Supporting Files */,
|
||||
);
|
||||
path = UICKeyChainStore;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DE20784C17AEBDA100B126C9 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DE20784D17AEBDA100B126C9 /* UICKeyChainStore-Info.plist */,
|
||||
DE20785117AEBDA100B126C9 /* main.m */,
|
||||
DE20785317AEBDA100B126C9 /* UICKeyChainStore-Prefix.pch */,
|
||||
DE20785717AEBDA100B126C9 /* Default.png */,
|
||||
DE20785917AEBDA100B126C9 /* Default@2x.png */,
|
||||
DE20785B17AEBDA100B126C9 /* Default-568h@2x.png */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DE20786917AEBDA100B126C9 /* UICKeyChainStoreTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1426600D17B96F6000E17A90 /* UICKeyChainStoreTests.h */,
|
||||
DE20787017AEBDA100B126C9 /* UICKeyChainStoreTests.m */,
|
||||
DE20786A17AEBDA100B126C9 /* Supporting Files */,
|
||||
);
|
||||
path = UICKeyChainStoreTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DE20786A17AEBDA100B126C9 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DE20786B17AEBDA100B126C9 /* UICKeyChainStoreTests-Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DE2AD09617AEC313005E0F26 /* Lib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DE2AD09717AEC313005E0F26 /* UICKeyChainStore.h */,
|
||||
DE2AD09817AEC313005E0F26 /* UICKeyChainStore.m */,
|
||||
);
|
||||
path = Lib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
145652D21822C57A00BF1709 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
145652D31822C57A00BF1709 /* libUICKeyChainStore */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 145652F81822C57C00BF1709 /* Build configuration list for PBXNativeTarget "libUICKeyChainStore" */;
|
||||
buildPhases = (
|
||||
145652D01822C57A00BF1709 /* Sources */,
|
||||
145652D11822C57A00BF1709 /* Frameworks */,
|
||||
145652D21822C57A00BF1709 /* Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = libUICKeyChainStore;
|
||||
productName = libUICKeyChainStore;
|
||||
productReference = 145652D41822C57B00BF1709 /* liblibUICKeyChainStore.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
DE20784117AEBDA100B126C9 /* UICKeyChainStore */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = DE20787417AEBDA100B126C9 /* Build configuration list for PBXNativeTarget "UICKeyChainStore" */;
|
||||
buildPhases = (
|
||||
DE20783E17AEBDA100B126C9 /* Sources */,
|
||||
DE20783F17AEBDA100B126C9 /* Frameworks */,
|
||||
DE20784017AEBDA100B126C9 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = UICKeyChainStore;
|
||||
productName = UICKeyChainStore;
|
||||
productReference = DE20784217AEBDA100B126C9 /* UICKeyChainStore.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
DE20786117AEBDA100B126C9 /* UICKeyChainStoreTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = DE20787717AEBDA100B126C9 /* Build configuration list for PBXNativeTarget "UICKeyChainStoreTests" */;
|
||||
buildPhases = (
|
||||
DE20785D17AEBDA100B126C9 /* Sources */,
|
||||
DE20785E17AEBDA100B126C9 /* Frameworks */,
|
||||
DE20785F17AEBDA100B126C9 /* Resources */,
|
||||
DE20786017AEBDA100B126C9 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
DE20786817AEBDA100B126C9 /* PBXTargetDependency */,
|
||||
);
|
||||
name = UICKeyChainStoreTests;
|
||||
productName = UICKeyChainStoreTests;
|
||||
productReference = DE20786217AEBDA100B126C9 /* UICKeyChainStoreTests.octest */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
DE20783A17AEBDA100B126C9 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0460;
|
||||
ORGANIZATIONNAME = "Beepscore LLC";
|
||||
};
|
||||
buildConfigurationList = DE20783D17AEBDA100B126C9 /* Build configuration list for PBXProject "UICKeyChainStore" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = DE20783917AEBDA100B126C9;
|
||||
productRefGroup = DE20784317AEBDA100B126C9 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
DE20784117AEBDA100B126C9 /* UICKeyChainStore */,
|
||||
DE20786117AEBDA100B126C9 /* UICKeyChainStoreTests */,
|
||||
145652D31822C57A00BF1709 /* libUICKeyChainStore */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
DE20784017AEBDA100B126C9 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DE20785817AEBDA100B126C9 /* Default.png in Resources */,
|
||||
DE20785A17AEBDA100B126C9 /* Default@2x.png in Resources */,
|
||||
DE20785C17AEBDA100B126C9 /* Default-568h@2x.png in Resources */,
|
||||
DECCCE8A17AEE93200701816 /* MainStoryboard.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DE20785F17AEBDA100B126C9 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
DE20786017AEBDA100B126C9 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
145652D01822C57A00BF1709 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
145652E01822C57B00BF1709 /* libUICKeyChainStore.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DE20783E17AEBDA100B126C9 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DE20785217AEBDA100B126C9 /* main.m in Sources */,
|
||||
DE20785617AEBDA100B126C9 /* AppDelegate.m in Sources */,
|
||||
DECCCE8D17AEEA9300701816 /* ViewController.m in Sources */,
|
||||
DE2AD09917AEC313005E0F26 /* UICKeyChainStore.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DE20785D17AEBDA100B126C9 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DE2AD09A17AEC313005E0F26 /* UICKeyChainStore.m in Sources */,
|
||||
DE20787117AEBDA100B126C9 /* UICKeyChainStoreTests.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
DE20786817AEBDA100B126C9 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = DE20784117AEBDA100B126C9 /* UICKeyChainStore */;
|
||||
targetProxy = DE20786717AEBDA100B126C9 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
145652F41822C57C00BF1709 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
);
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "libUICKeyChainStore/libUICKeyChainStore-Prefix.pch";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
145652F51822C57C00BF1709 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
);
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "libUICKeyChainStore/libUICKeyChainStore-Prefix.pch";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
DE20787217AEBDA100B126C9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DE20787317AEBDA100B126C9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
|
||||
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
DE20787517AEBDA100B126C9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
INFOPLIST_FILE = "UICKeyChainStore/UICKeyChainStore-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DE20787617AEBDA100B126C9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
INFOPLIST_FILE = "UICKeyChainStore/UICKeyChainStore-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
DE20787817AEBDA100B126C9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UICKeyChainStore.app/UICKeyChainStore";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"\"$(SDKROOT)/Developer/Library/Frameworks\"",
|
||||
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
INFOPLIST_FILE = "UICKeyChainStoreTests/UICKeyChainStoreTests-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
WRAPPER_EXTENSION = octest;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DE20787917AEBDA100B126C9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UICKeyChainStore.app/UICKeyChainStore";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"\"$(SDKROOT)/Developer/Library/Frameworks\"",
|
||||
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
INFOPLIST_FILE = "UICKeyChainStoreTests/UICKeyChainStoreTests-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
WRAPPER_EXTENSION = octest;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
145652F81822C57C00BF1709 /* Build configuration list for PBXNativeTarget "libUICKeyChainStore" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
145652F41822C57C00BF1709 /* Debug */,
|
||||
145652F51822C57C00BF1709 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
DE20783D17AEBDA100B126C9 /* Build configuration list for PBXProject "UICKeyChainStore" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DE20787217AEBDA100B126C9 /* Debug */,
|
||||
DE20787317AEBDA100B126C9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
DE20787417AEBDA100B126C9 /* Build configuration list for PBXNativeTarget "UICKeyChainStore" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DE20787517AEBDA100B126C9 /* Debug */,
|
||||
DE20787617AEBDA100B126C9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
DE20787717AEBDA100B126C9 /* Build configuration list for PBXNativeTarget "UICKeyChainStoreTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DE20787817AEBDA100B126C9 /* Debug */,
|
||||
DE20787917AEBDA100B126C9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = DE20783A17AEBDA100B126C9 /* Project object */;
|
||||
}
|
||||
20
UICKeyChainStore.xcworkspace/contents.xcworkspacedata
generated
Normal file
20
UICKeyChainStore.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<Group
|
||||
location = "group:Lib"
|
||||
name = "Lib">
|
||||
<FileRef
|
||||
location = "group:UICKeyChainStore.h">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:UICKeyChainStore.m">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<FileRef
|
||||
location = "group:iOS/UICKeyChainStore.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Mac/UICKeyChainStore.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// AppDelegate.h
|
||||
// UICKeyChainStore
|
||||
//
|
||||
// Created by Steve Baker on 8/4/13.
|
||||
// Copyright (c) 2013 Beepscore LLC. All rights reserved.
|
||||
// MIT License
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// UICKeyChainStore
|
||||
//
|
||||
// Created by Steve Baker on 8/4/13.
|
||||
// Copyright (c) 2013 Beepscore LLC. All rights reserved.
|
||||
// MIT License
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="haE-KW-nhV">
|
||||
<dependencies>
|
||||
<deployment defaultVersion="1552" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="wty-BB-Hb5">
|
||||
<objects>
|
||||
<viewController id="haE-KW-nhV" customClass="ViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="wF4-Ic-3BF">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="V1B-1f-Ehk" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="94" y="-175"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
@@ -1,14 +0,0 @@
|
||||
//
|
||||
// MyViewController.h
|
||||
// UICKeyChainStore
|
||||
//
|
||||
// Created by Steve Baker on 8/4/13.
|
||||
// Copyright (c) 2013 Beepscore LLC. All rights reserved.
|
||||
// MIT License
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ViewController : UIViewController
|
||||
|
||||
@end
|
||||
@@ -1,30 +0,0 @@
|
||||
//
|
||||
// MyViewController.m
|
||||
// UICKeyChainStore
|
||||
//
|
||||
// Created by Steve Baker on 8/4/13.
|
||||
// Copyright (c) 2013 Beepscore LLC. All rights reserved.
|
||||
// MIT License
|
||||
//
|
||||
|
||||
#import "ViewController.h"
|
||||
|
||||
@interface ViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// main.m
|
||||
// UICKeyChainStore
|
||||
//
|
||||
// Created by Steve Baker on 8/4/13.
|
||||
// Copyright (c) 2013 Beepscore LLC. All rights reserved.
|
||||
// MIT License
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
//
|
||||
// UICKeyChainStoreTests.h
|
||||
// UICKeyChainStore
|
||||
//
|
||||
// Created by Steve Baker on 8/4/13.
|
||||
// Copyright (c) 2013 Beepscore LLC. All rights reserved.
|
||||
// MIT License
|
||||
//
|
||||
|
||||
#import <SenTestingKit/SenTestingKit.h>
|
||||
|
||||
@interface UICKeyChainStoreTests : SenTestCase
|
||||
|
||||
@end
|
||||
@@ -1,232 +0,0 @@
|
||||
//
|
||||
// UICKeyChainStoreTests.m
|
||||
// UICKeyChainStoreTests
|
||||
//
|
||||
// Created by Steve Baker on 8/4/13.
|
||||
// Copyright (c) 2013 Beepscore LLC. All rights reserved.
|
||||
// MIT License
|
||||
//
|
||||
|
||||
#import "UICKeyChainStoreTests.h"
|
||||
#import "UICKeyChainStore.h"
|
||||
|
||||
@interface UICKeyChainStoreTests () {
|
||||
NSString *kStubKey;
|
||||
NSString *kStubString;
|
||||
NSString *kStubService;
|
||||
NSString *kStubAccessGroup;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation UICKeyChainStoreTests
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[super setUp];
|
||||
|
||||
// Before running each test, remove items from keychain
|
||||
kStubKey = @"password";
|
||||
kStubString = @"password1234";
|
||||
kStubService = @"com.kishikawakatsumi";
|
||||
// to share keychain access between apps, access group must start with bundle seed id?
|
||||
//http://useyourloaf.com/blog/2010/04/03/keychain-group-access.html
|
||||
kStubAccessGroup = @"stubAccessGroup";
|
||||
|
||||
[UICKeyChainStore removeAllItemsForService:kStubService
|
||||
accessGroup:kStubAccessGroup];
|
||||
[UICKeyChainStore removeAllItems];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
- (void)testSetDefaultService
|
||||
{
|
||||
NSString *serviceName = @"com.kishikawakatsumi.UICKeyChainStore";
|
||||
[UICKeyChainStore setDefaultService:serviceName];
|
||||
STAssertEqualObjects(serviceName, [UICKeyChainStore defaultService], @"specitfy default service name");
|
||||
}
|
||||
|
||||
- (void)testInitializers
|
||||
{
|
||||
UICKeyChainStore *store = nil;
|
||||
|
||||
store = [UICKeyChainStore keyChainStore];
|
||||
STAssertEqualObjects(store.service, [UICKeyChainStore defaultService], @"instantiate default store");
|
||||
|
||||
store = [[UICKeyChainStore alloc] init];
|
||||
STAssertEqualObjects(store.service, [UICKeyChainStore defaultService], @"instantiate default store");
|
||||
|
||||
NSString *serviceName = @"com.kishikawakatsumi.UICKeyChainStore";
|
||||
store = [UICKeyChainStore keyChainStoreWithService:serviceName];
|
||||
STAssertEqualObjects(store.service, serviceName, @"instantiate custom service named store");
|
||||
}
|
||||
|
||||
- (void)testSetData
|
||||
{
|
||||
NSString *usernameKey = @"username";
|
||||
NSString *passwordKey = @"password";
|
||||
NSString *username = @"kishikawakatsumi";
|
||||
NSString *password = @"password1234";
|
||||
NSData *usernameData = [username dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
[UICKeyChainStore setData:[username dataUsingEncoding:NSUTF8StringEncoding] forKey:usernameKey];
|
||||
[UICKeyChainStore setData:[password dataUsingEncoding:NSUTF8StringEncoding] forKey:passwordKey];
|
||||
|
||||
STAssertEqualObjects([UICKeyChainStore dataForKey:usernameKey], usernameData, @"stored username");
|
||||
STAssertEqualObjects([UICKeyChainStore dataForKey:passwordKey], passwordData, @"stored password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:usernameKey service:[UICKeyChainStore defaultService]];
|
||||
STAssertNil([UICKeyChainStore dataForKey:usernameKey], @"removed username");
|
||||
STAssertEqualObjects([UICKeyChainStore dataForKey:passwordKey], passwordData, @"left password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:passwordKey service:[UICKeyChainStore defaultService]];
|
||||
STAssertNil([UICKeyChainStore dataForKey:usernameKey], @"removed username");
|
||||
STAssertNil([UICKeyChainStore dataForKey:passwordKey], @"removed password");
|
||||
}
|
||||
|
||||
- (void)testSetUsernameAndPassword
|
||||
{
|
||||
NSString *usernameKey = @"username";
|
||||
NSString *passwordKey = @"password";
|
||||
NSString *username = @"kishikawakatsumi";
|
||||
NSString *password = @"password1234";
|
||||
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStore];
|
||||
[store removeAllItems];
|
||||
|
||||
[UICKeyChainStore setString:username forKey:usernameKey];
|
||||
[UICKeyChainStore setString:password forKey:passwordKey];
|
||||
|
||||
STAssertEqualObjects([UICKeyChainStore stringForKey:usernameKey], username, @"stored username");
|
||||
STAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey], password, @"stored password");
|
||||
STAssertEqualObjects([store stringForKey:usernameKey], username, @"stored username");
|
||||
STAssertEqualObjects([store stringForKey:passwordKey], password, @"stored password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:usernameKey];
|
||||
STAssertNil([UICKeyChainStore stringForKey:usernameKey], @"removed username");
|
||||
STAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey], password, @"left password");
|
||||
STAssertEqualObjects([store stringForKey:passwordKey], password, @"left password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:passwordKey];
|
||||
STAssertNil([UICKeyChainStore stringForKey:usernameKey], @"removed username");
|
||||
STAssertNil([UICKeyChainStore stringForKey:passwordKey], @"removed password");
|
||||
STAssertNil([store stringForKey:usernameKey], @"removed username");
|
||||
STAssertNil([store stringForKey:passwordKey], @"removed password");
|
||||
}
|
||||
|
||||
- (void)testSetSynchronize
|
||||
{
|
||||
NSString *usernameKey = @"username";
|
||||
NSString *passwordKey = @"password";
|
||||
NSString *username = @"kishikawakatsumi";
|
||||
NSString *password = @"password1234";
|
||||
|
||||
NSString *serviceName = @"com.example.UICKeyChainStore";
|
||||
[UICKeyChainStore removeAllItemsForService:serviceName];
|
||||
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStoreWithService:serviceName];
|
||||
[store removeAllItems];
|
||||
|
||||
[store setString:username forKey:usernameKey];
|
||||
[store setString:password forKey:passwordKey];
|
||||
|
||||
STAssertEqualObjects([store stringForKey:usernameKey], username, @"stored username");
|
||||
STAssertEqualObjects([store stringForKey:passwordKey], password, @"stored password");
|
||||
STAssertNil([UICKeyChainStore stringForKey:usernameKey service:serviceName], @"not synchronized yet");
|
||||
STAssertNil([UICKeyChainStore stringForKey:passwordKey service:serviceName], @"not synchronized yet");
|
||||
|
||||
[store synchronize];
|
||||
STAssertEqualObjects([store stringForKey:usernameKey], username, @"stored username");
|
||||
STAssertEqualObjects([store stringForKey:passwordKey], password, @"stored password");
|
||||
STAssertEqualObjects([UICKeyChainStore stringForKey:usernameKey service:serviceName], username, @"stored username");
|
||||
STAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey service:serviceName], password, @"stored password");
|
||||
|
||||
[store removeItemForKey:usernameKey];
|
||||
STAssertNil([store stringForKey:usernameKey], @"removed username");
|
||||
STAssertEqualObjects([store stringForKey:passwordKey], password, @"left password");
|
||||
STAssertNil([UICKeyChainStore stringForKey:usernameKey service:serviceName], @"removed username");
|
||||
STAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey service:serviceName], password, @"left password");
|
||||
|
||||
[store removeItemForKey:passwordKey];
|
||||
STAssertNil([store stringForKey:passwordKey], @"removed password");
|
||||
STAssertNil([UICKeyChainStore stringForKey:passwordKey service:serviceName], @"removed password");
|
||||
}
|
||||
|
||||
- (void)testClassMethodsSetAndRemoveItem
|
||||
{
|
||||
// write to keychain
|
||||
[UICKeyChainStore setString:kStubString forKey:kStubKey];
|
||||
|
||||
// read from keychain, test keychain contains item
|
||||
NSString *actualString = [UICKeyChainStore stringForKey:kStubKey];
|
||||
NSString *expectedString = kStubString;
|
||||
STAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
|
||||
// remove item from keychain
|
||||
[UICKeyChainStore removeItemForKey:kStubKey];
|
||||
|
||||
// read from keychain, test keychain doesn't contain item
|
||||
actualString = [UICKeyChainStore stringForKey:kStubKey];
|
||||
expectedString = NULL;
|
||||
|
||||
STAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
|
||||
}
|
||||
|
||||
- (void)testInstanceMethodsSetAndRemoveItem
|
||||
{
|
||||
// create an instance
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStoreWithService:kStubService
|
||||
accessGroup:kStubAccessGroup];
|
||||
// write to keychain
|
||||
[store setString:kStubString forKey:kStubKey];
|
||||
[store synchronize];
|
||||
|
||||
// read from keychain, test keychain contains item
|
||||
NSString *actualString = [store stringForKey:kStubKey];
|
||||
NSString *expectedString = kStubString;
|
||||
STAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
|
||||
// remove item from keychain
|
||||
[store removeItemForKey:kStubKey];
|
||||
[store synchronize];
|
||||
|
||||
// read from keychain, test keychain doesn't contain item
|
||||
actualString = [store stringForKey:kStubKey];
|
||||
expectedString = NULL;
|
||||
STAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
|
||||
actualString = [store description];
|
||||
expectedString = @"(\n)";
|
||||
STAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
}
|
||||
|
||||
|
||||
- (void)testObjectSubscripting
|
||||
{
|
||||
// create an instance
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStoreWithService:kStubService
|
||||
accessGroup:kStubAccessGroup];
|
||||
|
||||
NSString *expectedString = kStubString;
|
||||
|
||||
// write to keychain using obj subscripting
|
||||
store[kStubKey] = kStubString;
|
||||
[store synchronize];
|
||||
|
||||
// read from keychain using obj subscripting
|
||||
STAssertEqualObjects(store[kStubKey], kStubString, @"expected %@ but got %@", expectedString, store[kStubKey]);
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
489
iOS/UICKeyChainStore.xcodeproj/project.pbxproj
Normal file
489
iOS/UICKeyChainStore.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,489 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1472569B19570FB600989F75 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1472569A19570FB600989F75 /* Foundation.framework */; };
|
||||
1472569D19570FB600989F75 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1472569C19570FB600989F75 /* CoreGraphics.framework */; };
|
||||
1472569F19570FB600989F75 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1472569E19570FB600989F75 /* UIKit.framework */; };
|
||||
147256A519570FB600989F75 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 147256A319570FB600989F75 /* InfoPlist.strings */; };
|
||||
147256A719570FB600989F75 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 147256A619570FB600989F75 /* main.m */; };
|
||||
147256AB19570FB600989F75 /* UICAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 147256AA19570FB600989F75 /* UICAppDelegate.m */; };
|
||||
147256AD19570FB600989F75 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 147256AC19570FB600989F75 /* Images.xcassets */; };
|
||||
147256B419570FB600989F75 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 147256B319570FB600989F75 /* XCTest.framework */; };
|
||||
147256B519570FB600989F75 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1472569A19570FB600989F75 /* Foundation.framework */; };
|
||||
147256B619570FB600989F75 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1472569E19570FB600989F75 /* UIKit.framework */; };
|
||||
147256BE19570FB600989F75 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 147256BC19570FB600989F75 /* InfoPlist.strings */; };
|
||||
147256C019570FB600989F75 /* UICKeyChainStoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 147256BF19570FB600989F75 /* UICKeyChainStoreTests.m */; };
|
||||
147257091957118800989F75 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 147257081957118800989F75 /* UICKeyChainStore.m */; };
|
||||
1472570A1957118800989F75 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 147257081957118800989F75 /* UICKeyChainStore.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
147256B719570FB600989F75 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1472568F19570FB600989F75 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1472569619570FB600989F75;
|
||||
remoteInfo = UICKeyChainStore;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1472569719570FB600989F75 /* UICKeyChainStore.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UICKeyChainStore.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1472569A19570FB600989F75 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
1472569C19570FB600989F75 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
1472569E19570FB600989F75 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
147256A219570FB600989F75 /* UICKeyChainStore-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UICKeyChainStore-Info.plist"; sourceTree = "<group>"; };
|
||||
147256A419570FB600989F75 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
147256A619570FB600989F75 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
147256A819570FB600989F75 /* UICKeyChainStore-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UICKeyChainStore-Prefix.pch"; sourceTree = "<group>"; };
|
||||
147256A919570FB600989F75 /* UICAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UICAppDelegate.h; sourceTree = "<group>"; };
|
||||
147256AA19570FB600989F75 /* UICAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UICAppDelegate.m; sourceTree = "<group>"; };
|
||||
147256AC19570FB600989F75 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
147256B219570FB600989F75 /* UICKeyChainStoreTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UICKeyChainStoreTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
147256B319570FB600989F75 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
147256BB19570FB600989F75 /* UICKeyChainStoreTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UICKeyChainStoreTests-Info.plist"; sourceTree = "<group>"; };
|
||||
147256BD19570FB600989F75 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
147256BF19570FB600989F75 /* UICKeyChainStoreTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UICKeyChainStoreTests.m; sourceTree = "<group>"; };
|
||||
147257071957118800989F75 /* UICKeyChainStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICKeyChainStore.h; sourceTree = "<group>"; };
|
||||
147257081957118800989F75 /* UICKeyChainStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICKeyChainStore.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
1472569419570FB600989F75 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1472569D19570FB600989F75 /* CoreGraphics.framework in Frameworks */,
|
||||
1472569F19570FB600989F75 /* UIKit.framework in Frameworks */,
|
||||
1472569B19570FB600989F75 /* Foundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
147256AF19570FB600989F75 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
147256B419570FB600989F75 /* XCTest.framework in Frameworks */,
|
||||
147256B619570FB600989F75 /* UIKit.framework in Frameworks */,
|
||||
147256B519570FB600989F75 /* Foundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
1472568E19570FB600989F75 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147257061957118800989F75 /* Lib */,
|
||||
147256A019570FB600989F75 /* UICKeyChainStore */,
|
||||
147256B919570FB600989F75 /* UICKeyChainStoreTests */,
|
||||
1472569919570FB600989F75 /* Frameworks */,
|
||||
1472569819570FB600989F75 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1472569819570FB600989F75 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1472569719570FB600989F75 /* UICKeyChainStore.app */,
|
||||
147256B219570FB600989F75 /* UICKeyChainStoreTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1472569919570FB600989F75 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1472569A19570FB600989F75 /* Foundation.framework */,
|
||||
1472569C19570FB600989F75 /* CoreGraphics.framework */,
|
||||
1472569E19570FB600989F75 /* UIKit.framework */,
|
||||
147256B319570FB600989F75 /* XCTest.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256A019570FB600989F75 /* UICKeyChainStore */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256A919570FB600989F75 /* UICAppDelegate.h */,
|
||||
147256AA19570FB600989F75 /* UICAppDelegate.m */,
|
||||
147256AC19570FB600989F75 /* Images.xcassets */,
|
||||
147256A119570FB600989F75 /* Supporting Files */,
|
||||
);
|
||||
path = UICKeyChainStore;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256A119570FB600989F75 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256A219570FB600989F75 /* UICKeyChainStore-Info.plist */,
|
||||
147256A319570FB600989F75 /* InfoPlist.strings */,
|
||||
147256A619570FB600989F75 /* main.m */,
|
||||
147256A819570FB600989F75 /* UICKeyChainStore-Prefix.pch */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256B919570FB600989F75 /* UICKeyChainStoreTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256BF19570FB600989F75 /* UICKeyChainStoreTests.m */,
|
||||
147256BA19570FB600989F75 /* Supporting Files */,
|
||||
);
|
||||
path = UICKeyChainStoreTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256BA19570FB600989F75 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147256BB19570FB600989F75 /* UICKeyChainStoreTests-Info.plist */,
|
||||
147256BC19570FB600989F75 /* InfoPlist.strings */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147257061957118800989F75 /* Lib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
147257071957118800989F75 /* UICKeyChainStore.h */,
|
||||
147257081957118800989F75 /* UICKeyChainStore.m */,
|
||||
);
|
||||
name = Lib;
|
||||
path = ../Lib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
1472569619570FB600989F75 /* UICKeyChainStore */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 147256C319570FB600989F75 /* Build configuration list for PBXNativeTarget "UICKeyChainStore" */;
|
||||
buildPhases = (
|
||||
1472569319570FB600989F75 /* Sources */,
|
||||
1472569419570FB600989F75 /* Frameworks */,
|
||||
1472569519570FB600989F75 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = UICKeyChainStore;
|
||||
productName = UICKeyChainStore;
|
||||
productReference = 1472569719570FB600989F75 /* UICKeyChainStore.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
147256B119570FB600989F75 /* UICKeyChainStoreTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 147256C619570FB600989F75 /* Build configuration list for PBXNativeTarget "UICKeyChainStoreTests" */;
|
||||
buildPhases = (
|
||||
147256AE19570FB600989F75 /* Sources */,
|
||||
147256AF19570FB600989F75 /* Frameworks */,
|
||||
147256B019570FB600989F75 /* Resources */,
|
||||
147257111957121A00989F75 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
147256B819570FB600989F75 /* PBXTargetDependency */,
|
||||
);
|
||||
name = UICKeyChainStoreTests;
|
||||
productName = UICKeyChainStoreTests;
|
||||
productReference = 147256B219570FB600989F75 /* UICKeyChainStoreTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
1472568F19570FB600989F75 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = UIC;
|
||||
LastUpgradeCheck = 0510;
|
||||
ORGANIZATIONNAME = "kishikawa katsumi";
|
||||
TargetAttributes = {
|
||||
147256B119570FB600989F75 = {
|
||||
TestTargetID = 1472569619570FB600989F75;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 1472569219570FB600989F75 /* Build configuration list for PBXProject "UICKeyChainStore" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 1472568E19570FB600989F75;
|
||||
productRefGroup = 1472569819570FB600989F75 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
1472569619570FB600989F75 /* UICKeyChainStore */,
|
||||
147256B119570FB600989F75 /* UICKeyChainStoreTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
1472569519570FB600989F75 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
147256A519570FB600989F75 /* InfoPlist.strings in Resources */,
|
||||
147256AD19570FB600989F75 /* Images.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
147256B019570FB600989F75 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
147256BE19570FB600989F75 /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
147257111957121A00989F75 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if [ $arch != \"x86_64\" ]; then\n codesign --verify --force --sign \"$CODE_SIGN_IDENTITY\" \"$CODESIGNING_FOLDER_PATH\"\nfi\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
1472569319570FB600989F75 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
147256AB19570FB600989F75 /* UICAppDelegate.m in Sources */,
|
||||
147256A719570FB600989F75 /* main.m in Sources */,
|
||||
147257091957118800989F75 /* UICKeyChainStore.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
147256AE19570FB600989F75 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
147256C019570FB600989F75 /* UICKeyChainStoreTests.m in Sources */,
|
||||
1472570A1957118800989F75 /* UICKeyChainStore.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
147256B819570FB600989F75 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 1472569619570FB600989F75 /* UICKeyChainStore */;
|
||||
targetProxy = 147256B719570FB600989F75 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
147256A319570FB600989F75 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
147256A419570FB600989F75 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
147256BC19570FB600989F75 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
147256BD19570FB600989F75 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
147256C119570FB600989F75 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
147256C219570FB600989F75 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
147256C419570FB600989F75 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
INFOPLIST_FILE = "UICKeyChainStore/UICKeyChainStore-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
147256C519570FB600989F75 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
INFOPLIST_FILE = "UICKeyChainStore/UICKeyChainStore-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
147256C719570FB600989F75 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UICKeyChainStore.app/UICKeyChainStore";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = "UICKeyChainStoreTests/UICKeyChainStoreTests-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
WRAPPER_EXTENSION = xctest;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
147256C819570FB600989F75 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UICKeyChainStore.app/UICKeyChainStore";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "UICKeyChainStore/UICKeyChainStore-Prefix.pch";
|
||||
INFOPLIST_FILE = "UICKeyChainStoreTests/UICKeyChainStoreTests-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
WRAPPER_EXTENSION = xctest;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1472569219570FB600989F75 /* Build configuration list for PBXProject "UICKeyChainStore" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
147256C119570FB600989F75 /* Debug */,
|
||||
147256C219570FB600989F75 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
147256C319570FB600989F75 /* Build configuration list for PBXNativeTarget "UICKeyChainStore" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
147256C419570FB600989F75 /* Debug */,
|
||||
147256C519570FB600989F75 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
147256C619570FB600989F75 /* Build configuration list for PBXNativeTarget "UICKeyChainStoreTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
147256C719570FB600989F75 /* Debug */,
|
||||
147256C819570FB600989F75 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 1472568F19570FB600989F75 /* Project object */;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0460"
|
||||
LastUpgradeVersion = "0510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -14,7 +14,7 @@
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DE20784117AEBDA100B126C9"
|
||||
BlueprintIdentifier = "1472569619570FB600989F75"
|
||||
BuildableName = "UICKeyChainStore.app"
|
||||
BlueprintName = "UICKeyChainStore"
|
||||
ReferencedContainer = "container:UICKeyChainStore.xcodeproj">
|
||||
@@ -32,27 +32,17 @@
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DE20786117AEBDA100B126C9"
|
||||
BuildableName = "UICKeyChainStoreTests.octest"
|
||||
BlueprintIdentifier = "147256B119570FB600989F75"
|
||||
BuildableName = "UICKeyChainStoreTests.xctest"
|
||||
BlueprintName = "UICKeyChainStoreTests"
|
||||
ReferencedContainer = "container:UICKeyChainStore.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "145652E41822C57B00BF1709"
|
||||
BuildableName = "libUICKeyChainStoreTests.xctest"
|
||||
BlueprintName = "libUICKeyChainStoreTests"
|
||||
ReferencedContainer = "container:UICKeyChainStore.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DE20784117AEBDA100B126C9"
|
||||
BlueprintIdentifier = "1472569619570FB600989F75"
|
||||
BuildableName = "UICKeyChainStore.app"
|
||||
BlueprintName = "UICKeyChainStore"
|
||||
ReferencedContainer = "container:UICKeyChainStore.xcodeproj">
|
||||
@@ -71,7 +61,7 @@
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DE20784117AEBDA100B126C9"
|
||||
BlueprintIdentifier = "1472569619570FB600989F75"
|
||||
BuildableName = "UICKeyChainStore.app"
|
||||
BlueprintName = "UICKeyChainStore"
|
||||
ReferencedContainer = "container:UICKeyChainStore.xcodeproj">
|
||||
@@ -89,7 +79,7 @@
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DE20784117AEBDA100B126C9"
|
||||
BlueprintIdentifier = "1472569619570FB600989F75"
|
||||
BuildableName = "UICKeyChainStore.app"
|
||||
BlueprintName = "UICKeyChainStore"
|
||||
ReferencedContainer = "container:UICKeyChainStore.xcodeproj">
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "retina4",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
15
iOS/UICKeyChainStore/UICAppDelegate.h
Normal file
15
iOS/UICKeyChainStore/UICAppDelegate.h
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// UICAppDelegate.h
|
||||
// UICKeyChainStore
|
||||
//
|
||||
// Created by kishikawa katsumi on 2014/06/22.
|
||||
// Copyright (c) 2014 kishikawa katsumi. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface UICAppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
||||
49
iOS/UICKeyChainStore/UICAppDelegate.m
Normal file
49
iOS/UICKeyChainStore/UICAppDelegate.m
Normal file
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// UICAppDelegate.m
|
||||
// UICKeyChainStore
|
||||
//
|
||||
// Created by kishikawa katsumi on 2014/06/22.
|
||||
// Copyright (c) 2014 kishikawa katsumi. All rights reserved.
|
||||
//
|
||||
|
||||
#import "UICAppDelegate.h"
|
||||
|
||||
@implementation UICAppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
// Override point for customization after application launch.
|
||||
self.window.backgroundColor = [UIColor whiteColor];
|
||||
[self.window makeKeyAndVisible];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application
|
||||
{
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application
|
||||
{
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application
|
||||
{
|
||||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application
|
||||
{
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application
|
||||
{
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -24,8 +24,6 @@
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>MainStoryboard</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
@@ -1,5 +1,7 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'UICKeyChainStore' target in the 'UICKeyChainStore' project
|
||||
// Prefix header
|
||||
//
|
||||
// The contents of this file are implicitly included at the beginning of every source file.
|
||||
//
|
||||
|
||||
#import <Availability.h>
|
||||
2
iOS/UICKeyChainStore/en.lproj/InfoPlist.strings
Normal file
2
iOS/UICKeyChainStore/en.lproj/InfoPlist.strings
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
18
iOS/UICKeyChainStore/main.m
Normal file
18
iOS/UICKeyChainStore/main.m
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// main.m
|
||||
// UICKeyChainStore
|
||||
//
|
||||
// Created by kishikawa katsumi on 2014/06/22.
|
||||
// Copyright (c) 2014 kishikawa katsumi. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "UICAppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([UICAppDelegate class]));
|
||||
}
|
||||
}
|
||||
22
iOS/UICKeyChainStoreTests/UICKeyChainStoreTests-Info.plist
Normal file
22
iOS/UICKeyChainStoreTests/UICKeyChainStoreTests-Info.plist
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.kishikawakatsumi.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
217
iOS/UICKeyChainStoreTests/UICKeyChainStoreTests.m
Normal file
217
iOS/UICKeyChainStoreTests/UICKeyChainStoreTests.m
Normal file
@@ -0,0 +1,217 @@
|
||||
//
|
||||
// UICKeyChainStoreTests.m
|
||||
// UICKeyChainStoreTests
|
||||
//
|
||||
// Created by kishikawa katsumi on 2014/06/22.
|
||||
// Copyright (c) 2014 kishikawa katsumi. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "UICKeyChainStore.h"
|
||||
|
||||
@interface UICKeyChainStoreTests : XCTestCase {
|
||||
NSString *kStubKey;
|
||||
NSString *kStubString;
|
||||
NSString *kStubService;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation UICKeyChainStoreTests
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[super setUp];
|
||||
|
||||
kStubKey = @"password";
|
||||
kStubString = @"password1234";
|
||||
kStubService = @"com.kishikawakatsumi";
|
||||
|
||||
[UICKeyChainStore removeAllItems];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
- (void)testSetDefaultService
|
||||
{
|
||||
NSString *serviceName = @"com.kishikawakatsumi.UICKeyChainStore";
|
||||
[UICKeyChainStore setDefaultService:serviceName];
|
||||
XCTAssertEqualObjects(serviceName, [UICKeyChainStore defaultService], @"specitfy default service name");
|
||||
}
|
||||
|
||||
- (void)testInitializers
|
||||
{
|
||||
UICKeyChainStore *store = nil;
|
||||
|
||||
store = [UICKeyChainStore keyChainStore];
|
||||
XCTAssertEqualObjects(store.service, [UICKeyChainStore defaultService], @"instantiate default store");
|
||||
|
||||
store = [[UICKeyChainStore alloc] init];
|
||||
XCTAssertEqualObjects(store.service, [UICKeyChainStore defaultService], @"instantiate default store");
|
||||
|
||||
NSString *serviceName = @"com.kishikawakatsumi.UICKeyChainStore";
|
||||
store = [UICKeyChainStore keyChainStoreWithService:serviceName];
|
||||
XCTAssertEqualObjects(store.service, serviceName, @"instantiate custom service named store");
|
||||
}
|
||||
|
||||
- (void)testSetData
|
||||
{
|
||||
NSString *usernameKey = @"username";
|
||||
NSString *passwordKey = @"password";
|
||||
NSString *username = @"kishikawakatsumi";
|
||||
NSString *password = @"password1234";
|
||||
NSData *usernameData = [username dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
[UICKeyChainStore setData:[username dataUsingEncoding:NSUTF8StringEncoding] forKey:usernameKey];
|
||||
[UICKeyChainStore setData:[password dataUsingEncoding:NSUTF8StringEncoding] forKey:passwordKey];
|
||||
XCTAssertEqualObjects([UICKeyChainStore dataForKey:usernameKey], usernameData, @"stored username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore dataForKey:passwordKey], passwordData, @"stored password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:usernameKey service:[UICKeyChainStore defaultService]];
|
||||
XCTAssertNil([UICKeyChainStore dataForKey:usernameKey], @"removed username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore dataForKey:passwordKey], passwordData, @"left password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:passwordKey service:[UICKeyChainStore defaultService]];
|
||||
XCTAssertNil([UICKeyChainStore dataForKey:usernameKey], @"removed username");
|
||||
XCTAssertNil([UICKeyChainStore dataForKey:passwordKey], @"removed password");
|
||||
}
|
||||
|
||||
- (void)testSetUsernameAndPassword
|
||||
{
|
||||
NSString *usernameKey = @"username";
|
||||
NSString *passwordKey = @"password";
|
||||
NSString *username = @"kishikawakatsumi";
|
||||
NSString *password = @"password1234";
|
||||
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStore];
|
||||
[store removeAllItems];
|
||||
|
||||
[UICKeyChainStore setString:username forKey:usernameKey];
|
||||
[UICKeyChainStore setString:password forKey:passwordKey];
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:usernameKey], username, @"stored username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey], password, @"stored password");
|
||||
XCTAssertEqualObjects([store stringForKey:usernameKey], username, @"stored username");
|
||||
XCTAssertEqualObjects([store stringForKey:passwordKey], password, @"stored password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:usernameKey];
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:usernameKey], @"removed username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey], password, @"left password");
|
||||
XCTAssertEqualObjects([store stringForKey:passwordKey], password, @"left password");
|
||||
|
||||
[UICKeyChainStore removeItemForKey:passwordKey];
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:usernameKey], @"removed username");
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:passwordKey], @"removed password");
|
||||
XCTAssertNil([store stringForKey:usernameKey], @"removed username");
|
||||
XCTAssertNil([store stringForKey:passwordKey], @"removed password");
|
||||
}
|
||||
|
||||
- (void)testSetSynchronize
|
||||
{
|
||||
NSString *usernameKey = @"username";
|
||||
NSString *passwordKey = @"password";
|
||||
NSString *username = @"kishikawakatsumi";
|
||||
NSString *password = @"password1234";
|
||||
|
||||
NSString *serviceName = @"com.example.UICKeyChainStore";
|
||||
[UICKeyChainStore removeAllItemsForService:serviceName];
|
||||
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStoreWithService:serviceName];
|
||||
[store removeAllItems];
|
||||
|
||||
[store setString:username forKey:usernameKey];
|
||||
[store setString:password forKey:passwordKey];
|
||||
XCTAssertEqualObjects([store stringForKey:usernameKey], username, @"stored username");
|
||||
XCTAssertEqualObjects([store stringForKey:passwordKey], password, @"stored password");
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:usernameKey service:serviceName], @"not synchronized yet");
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:passwordKey service:serviceName], @"not synchronized yet");
|
||||
|
||||
[store synchronize];
|
||||
XCTAssertEqualObjects([store stringForKey:usernameKey], username, @"stored username");
|
||||
XCTAssertEqualObjects([store stringForKey:passwordKey], password, @"stored password");
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:usernameKey service:serviceName], username, @"stored username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey service:serviceName], password, @"stored password");
|
||||
|
||||
[store removeItemForKey:usernameKey];
|
||||
XCTAssertNil([store stringForKey:usernameKey], @"removed username");
|
||||
XCTAssertEqualObjects([store stringForKey:passwordKey], password, @"left password");
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:usernameKey service:serviceName], @"removed username");
|
||||
XCTAssertEqualObjects([UICKeyChainStore stringForKey:passwordKey service:serviceName], password, @"left password");
|
||||
|
||||
[store removeItemForKey:passwordKey];
|
||||
XCTAssertNil([store stringForKey:passwordKey], @"removed password");
|
||||
XCTAssertNil([UICKeyChainStore stringForKey:passwordKey service:serviceName], @"removed password");
|
||||
}
|
||||
|
||||
- (void)testClassMethodsSetAndRemoveItem
|
||||
{
|
||||
// write to keychain
|
||||
[UICKeyChainStore setString:kStubString forKey:kStubKey];
|
||||
|
||||
// read from keychain, test keychain contains item
|
||||
NSString *actualString = [UICKeyChainStore stringForKey:kStubKey];
|
||||
NSString *expectedString = kStubString;
|
||||
XCTAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
|
||||
// remove item from keychain
|
||||
[UICKeyChainStore removeItemForKey:kStubKey];
|
||||
|
||||
// read from keychain, test keychain doesn't contain item
|
||||
actualString = [UICKeyChainStore stringForKey:kStubKey];
|
||||
expectedString = NULL;
|
||||
|
||||
XCTAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
}
|
||||
|
||||
- (void)testInstanceMethodsSetAndRemoveItem
|
||||
{
|
||||
// create an instance
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStoreWithService:kStubService];
|
||||
// write to keychain
|
||||
[store setString:kStubString forKey:kStubKey];
|
||||
[store synchronize];
|
||||
|
||||
// read from keychain, test keychain contains item
|
||||
NSString *actualString = [store stringForKey:kStubKey];
|
||||
NSString *expectedString = kStubString;
|
||||
XCTAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
|
||||
// remove item from keychain
|
||||
[store removeItemForKey:kStubKey];
|
||||
[store synchronize];
|
||||
|
||||
// read from keychain, test keychain doesn't contain item
|
||||
actualString = [store stringForKey:kStubKey];
|
||||
expectedString = NULL;
|
||||
XCTAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
|
||||
actualString = [store description];
|
||||
expectedString = @"(\n)";
|
||||
XCTAssertEqualObjects(expectedString, actualString,
|
||||
@"expected %@ but got %@", expectedString, actualString);
|
||||
}
|
||||
|
||||
|
||||
- (void)testObjectSubscripting
|
||||
{
|
||||
// create an instance
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStoreWithService:kStubService];
|
||||
|
||||
NSString *expectedString = kStubString;
|
||||
|
||||
// write to keychain using obj subscripting
|
||||
store[kStubKey] = kStubString;
|
||||
[store synchronize];
|
||||
|
||||
// read from keychain using obj subscripting
|
||||
XCTAssertEqualObjects(store[kStubKey], kStubString, @"expected %@ but got %@", expectedString, store[kStubKey]);
|
||||
}
|
||||
|
||||
@end
|
||||
2
iOS/UICKeyChainStoreTests/en.lproj/InfoPlist.strings
Normal file
2
iOS/UICKeyChainStoreTests/en.lproj/InfoPlist.strings
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// libUICKeyChainStore.h
|
||||
// libUICKeyChainStore
|
||||
//
|
||||
// Created by kishikawa katsumi on 2013/11/01.
|
||||
// Copyright (c) 2013年 Beepscore LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface libUICKeyChainStore : NSObject
|
||||
|
||||
@end
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// libUICKeyChainStore.m
|
||||
// libUICKeyChainStore
|
||||
//
|
||||
// Created by kishikawa katsumi on 2013/11/01.
|
||||
// Copyright (c) 2013年 Beepscore LLC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "libUICKeyChainStore.h"
|
||||
|
||||
@implementation libUICKeyChainStore
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user