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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
299 changes: 299 additions & 0 deletions contactManager.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,299 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objects = {

/* Begin PBXBuildFile section */
8733744F295C3295000EAC23 /* CheckErrorFunction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8733744E295C3295000EAC23 /* CheckErrorFunction.swift */; };
87C3EE1D295D5ABF00A76712 /* FindContactFuction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87C3EE1C295D5ABF00A76712 /* FindContactFuction.swift */; };
D9D3AEFD29597A7B0031A2F2 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9D3AEFC29597A7B0031A2F2 /* main.swift */; };
D9E15C03295C312C003FB06D /* AddContactFunction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9E15C02295C312C003FB06D /* AddContactFunction.swift */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
D9D3AEF729597A7B0031A2F2 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
8733744E295C3295000EAC23 /* CheckErrorFunction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckErrorFunction.swift; sourceTree = "<group>"; };
87C3EE1C295D5ABF00A76712 /* FindContactFuction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FindContactFuction.swift; sourceTree = "<group>"; };
D9D3AEF929597A7B0031A2F2 /* contactManager */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = contactManager; sourceTree = BUILT_PRODUCTS_DIR; };
D9D3AEFC29597A7B0031A2F2 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
D9E15C02295C312C003FB06D /* AddContactFunction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddContactFunction.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
D9D3AEF629597A7B0031A2F2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
D9D3AEF029597A7B0031A2F2 = {
isa = PBXGroup;
children = (
D9D3AEFB29597A7B0031A2F2 /* contactManager */,
D9D3AEFA29597A7B0031A2F2 /* Products */,
);
sourceTree = "<group>";
};
D9D3AEFA29597A7B0031A2F2 /* Products */ = {
isa = PBXGroup;
children = (
D9D3AEF929597A7B0031A2F2 /* contactManager */,
);
name = Products;
sourceTree = "<group>";
};
D9D3AEFB29597A7B0031A2F2 /* contactManager */ = {
isa = PBXGroup;
children = (
D9D3AEFC29597A7B0031A2F2 /* main.swift */,
D9E15C02295C312C003FB06D /* AddContactFunction.swift */,
8733744E295C3295000EAC23 /* CheckErrorFunction.swift */,
87C3EE1C295D5ABF00A76712 /* FindContactFuction.swift */,
);
path = contactManager;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
D9D3AEF829597A7B0031A2F2 /* contactManager */ = {
isa = PBXNativeTarget;
buildConfigurationList = D9D3AF0029597A7B0031A2F2 /* Build configuration list for PBXNativeTarget "contactManager" */;
buildPhases = (
D9D3AEF529597A7B0031A2F2 /* Sources */,
D9D3AEF629597A7B0031A2F2 /* Frameworks */,
D9D3AEF729597A7B0031A2F2 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = contactManager;
productName = contactManager;
productReference = D9D3AEF929597A7B0031A2F2 /* contactManager */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
D9D3AEF129597A7B0031A2F2 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1420;
LastUpgradeCheck = 1420;
TargetAttributes = {
D9D3AEF829597A7B0031A2F2 = {
CreatedOnToolsVersion = 14.2;
};
};
};
buildConfigurationList = D9D3AEF429597A7B0031A2F2 /* Build configuration list for PBXProject "contactManager" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = D9D3AEF029597A7B0031A2F2;
productRefGroup = D9D3AEFA29597A7B0031A2F2 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D9D3AEF829597A7B0031A2F2 /* contactManager */,
);
};
/* End PBXProject section */

/* Begin PBXSourcesBuildPhase section */
D9D3AEF529597A7B0031A2F2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D9E15C03295C312C003FB06D /* AddContactFunction.swift in Sources */,
D9D3AEFD29597A7B0031A2F2 /* main.swift in Sources */,
8733744F295C3295000EAC23 /* CheckErrorFunction.swift in Sources */,
87C3EE1D295D5ABF00A76712 /* FindContactFuction.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
D9D3AEFE29597A7B0031A2F2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
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_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 13.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
D9D3AEFF29597A7B0031A2F2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = 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 = 13.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
D9D3AF0129597A7B0031A2F2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
MACOSX_DEPLOYMENT_TARGET = 13.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
D9D3AF0229597A7B0031A2F2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
MACOSX_DEPLOYMENT_TARGET = 13.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
D9D3AEF429597A7B0031A2F2 /* Build configuration list for PBXProject "contactManager" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D9D3AEFE29597A7B0031A2F2 /* Debug */,
D9D3AEFF29597A7B0031A2F2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D9D3AF0029597A7B0031A2F2 /* Build configuration list for PBXNativeTarget "contactManager" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D9D3AF0129597A7B0031A2F2 /* Debug */,
D9D3AF0229597A7B0031A2F2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = D9D3AEF129597A7B0031A2F2 /* Project object */;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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>SchemeUserState</key>
<dict>
<key>contactManager.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
44 changes: 44 additions & 0 deletions contactManager/AddContactFunction.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
func addContact(){
var isAddContactError: Bool = false

while !isAddContactError {
print("")
print("연락처 정보를 입력해주세요: ", terminator: "")

guard let input = readLine(), input != "" else {
print("아무것도 입력되지 않았습니다. 입력 형식을 확인해주세요.")
continue
}

guard Validation.validateInputBySlash(input: input) else {
print("입력된 정보가 [이름]/[나이]/[전화번호] 형식인지 확인해주세요")
continue
}

let seperatedInput = input.components(separatedBy:"/")

let trimSet = seperatedInput.map {
$0.trimmingCharacters(in: [" "])
}

let trimName = trimSet[0]
let trimAge = trimSet[1]
let trimNum = trimSet[2]

let zeroBlankName = trimName.components(separatedBy: [" "]).joined()

guard errorCheck(trimName: trimName, trimAge: trimAge, trimNum: trimNum) else {
continue
}

isAddContactError = true
print("입력한 정보는 \(trimAge)세 \(zeroBlankName)(\(trimNum))입니다.\n")

let contact = Contact(name: zeroBlankName, age: trimAge, phoneNumber: trimNum)

contacts.insert(contact)
}

}


Loading