diff --git a/MeetKey/MEETKEYTests/MEETKEYTests.swift b/MeetKey/MEETKEYTests/MEETKEYTests.swift new file mode 100644 index 0000000..c168469 --- /dev/null +++ b/MeetKey/MEETKEYTests/MEETKEYTests.swift @@ -0,0 +1,17 @@ +// +// MEETKEYTests.swift +// MEETKEYTests +// +// Created by 은재 on 1/15/26. +// + +import Testing +@testable import MEETKEY + +struct MEETKEYTests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/MeetKey/MEETKEYUITests/MEETKEYUITests.swift b/MeetKey/MEETKEYUITests/MEETKEYUITests.swift new file mode 100644 index 0000000..5a0cfdc --- /dev/null +++ b/MeetKey/MEETKEYUITests/MEETKEYUITests.swift @@ -0,0 +1,41 @@ +// +// MEETKEYUITests.swift +// MEETKEYUITests +// +// Created by 은재 on 1/15/26. +// + +import XCTest + +final class MEETKEYUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + @MainActor + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + @MainActor + func testLaunchPerformance() throws { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } +} diff --git a/MeetKey/MEETKEYUITests/MEETKEYUITestsLaunchTests.swift b/MeetKey/MEETKEYUITests/MEETKEYUITestsLaunchTests.swift new file mode 100644 index 0000000..73c4e02 --- /dev/null +++ b/MeetKey/MEETKEYUITests/MEETKEYUITestsLaunchTests.swift @@ -0,0 +1,33 @@ +// +// MEETKEYUITestsLaunchTests.swift +// MEETKEYUITests +// +// Created by 은재 on 1/15/26. +// + +import XCTest + +final class MEETKEYUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + @MainActor + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +} diff --git a/MeetKey/MeetKey.xcodeproj/project.pbxproj b/MeetKey/MeetKey.xcodeproj/project.pbxproj index 4608b98..b659f6c 100644 --- a/MeetKey/MeetKey.xcodeproj/project.pbxproj +++ b/MeetKey/MeetKey.xcodeproj/project.pbxproj @@ -6,20 +6,63 @@ objectVersion = 77; objects = { +/* Begin PBXContainerItemProxy section */ + A94A57E92F18DC3900DE9F0C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A94A57D32F18DC3800DE9F0C /* Project object */; + proxyType = 1; + remoteGlobalIDString = A94A57DA2F18DC3800DE9F0C; + remoteInfo = MEETKEY; + }; + A94A57F32F18DC3900DE9F0C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A94A57D32F18DC3800DE9F0C /* Project object */; + proxyType = 1; + remoteGlobalIDString = A94A57DA2F18DC3800DE9F0C; + remoteInfo = MEETKEY; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ - 215F25832F18AF08000BEB64 /* MeetKey.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MeetKey.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A94A57DB2F18DC3800DE9F0C /* MEETKEY.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MEETKEY.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A94A57E82F18DC3900DE9F0C /* MEETKEYTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MEETKEYTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + A94A57F22F18DC3900DE9F0C /* MEETKEYUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MEETKEYUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ - 215F25852F18AF08000BEB64 /* MeetKey */ = { + A94A57DD2F18DC3800DE9F0C /* MEETKEY */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = MEETKEY; + sourceTree = ""; + }; + A94A57EB2F18DC3900DE9F0C /* MEETKEYTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = MEETKEYTests; + sourceTree = ""; + }; + A94A57F52F18DC3900DE9F0C /* MEETKEYUITests */ = { isa = PBXFileSystemSynchronizedRootGroup; - path = MeetKey; + path = MEETKEYUITests; sourceTree = ""; }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ - 215F25802F18AF08000BEB64 /* Frameworks */ = { + A94A57D82F18DC3800DE9F0C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A94A57E52F18DC3900DE9F0C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A94A57EF2F18DC3900DE9F0C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -29,18 +72,22 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 215F257A2F18AF08000BEB64 = { + A94A57D22F18DC3800DE9F0C = { isa = PBXGroup; children = ( - 215F25852F18AF08000BEB64 /* MeetKey */, - 215F25842F18AF08000BEB64 /* Products */, + A94A57DD2F18DC3800DE9F0C /* MEETKEY */, + A94A57EB2F18DC3900DE9F0C /* MEETKEYTests */, + A94A57F52F18DC3900DE9F0C /* MEETKEYUITests */, + A94A57DC2F18DC3800DE9F0C /* Products */, ); sourceTree = ""; }; - 215F25842F18AF08000BEB64 /* Products */ = { + A94A57DC2F18DC3800DE9F0C /* Products */ = { isa = PBXGroup; children = ( - 215F25832F18AF08000BEB64 /* MeetKey.app */, + A94A57DB2F18DC3800DE9F0C /* MEETKEY.app */, + A94A57E82F18DC3900DE9F0C /* MEETKEYTests.xctest */, + A94A57F22F18DC3900DE9F0C /* MEETKEYUITests.xctest */, ); name = Products; sourceTree = ""; @@ -48,64 +95,134 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 215F25822F18AF08000BEB64 /* MeetKey */ = { + A94A57DA2F18DC3800DE9F0C /* MEETKEY */ = { isa = PBXNativeTarget; - buildConfigurationList = 215F258E2F18AF09000BEB64 /* Build configuration list for PBXNativeTarget "MeetKey" */; + buildConfigurationList = A94A57FC2F18DC3900DE9F0C /* Build configuration list for PBXNativeTarget "MEETKEY" */; buildPhases = ( - 215F257F2F18AF08000BEB64 /* Sources */, - 215F25802F18AF08000BEB64 /* Frameworks */, - 215F25812F18AF08000BEB64 /* Resources */, + A94A57D72F18DC3800DE9F0C /* Sources */, + A94A57D82F18DC3800DE9F0C /* Frameworks */, + A94A57D92F18DC3800DE9F0C /* Resources */, ); buildRules = ( ); dependencies = ( ); fileSystemSynchronizedGroups = ( - 215F25852F18AF08000BEB64 /* MeetKey */, + A94A57DD2F18DC3800DE9F0C /* MEETKEY */, ); - name = MeetKey; + name = MEETKEY; packageProductDependencies = ( ); - productName = MeetKey; - productReference = 215F25832F18AF08000BEB64 /* MeetKey.app */; + productName = MEETKEY; + productReference = A94A57DB2F18DC3800DE9F0C /* MEETKEY.app */; productType = "com.apple.product-type.application"; }; + A94A57E72F18DC3900DE9F0C /* MEETKEYTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = A94A57FF2F18DC3900DE9F0C /* Build configuration list for PBXNativeTarget "MEETKEYTests" */; + buildPhases = ( + A94A57E42F18DC3900DE9F0C /* Sources */, + A94A57E52F18DC3900DE9F0C /* Frameworks */, + A94A57E62F18DC3900DE9F0C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + A94A57EA2F18DC3900DE9F0C /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + A94A57EB2F18DC3900DE9F0C /* MEETKEYTests */, + ); + name = MEETKEYTests; + packageProductDependencies = ( + ); + productName = MEETKEYTests; + productReference = A94A57E82F18DC3900DE9F0C /* MEETKEYTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + A94A57F12F18DC3900DE9F0C /* MEETKEYUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = A94A58022F18DC3900DE9F0C /* Build configuration list for PBXNativeTarget "MEETKEYUITests" */; + buildPhases = ( + A94A57EE2F18DC3900DE9F0C /* Sources */, + A94A57EF2F18DC3900DE9F0C /* Frameworks */, + A94A57F02F18DC3900DE9F0C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + A94A57F42F18DC3900DE9F0C /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + A94A57F52F18DC3900DE9F0C /* MEETKEYUITests */, + ); + name = MEETKEYUITests; + packageProductDependencies = ( + ); + productName = MEETKEYUITests; + productReference = A94A57F22F18DC3900DE9F0C /* MEETKEYUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 215F257B2F18AF08000BEB64 /* Project object */ = { + A94A57D32F18DC3800DE9F0C /* Project object */ = { isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 2600; - LastUpgradeCheck = 2600; + LastSwiftUpdateCheck = 1640; + LastUpgradeCheck = 1640; TargetAttributes = { - 215F25822F18AF08000BEB64 = { - CreatedOnToolsVersion = 26.0; + A94A57DA2F18DC3800DE9F0C = { + CreatedOnToolsVersion = 16.4; + }; + A94A57E72F18DC3900DE9F0C = { + CreatedOnToolsVersion = 16.4; + TestTargetID = A94A57DA2F18DC3800DE9F0C; + }; + A94A57F12F18DC3900DE9F0C = { + CreatedOnToolsVersion = 16.4; + TestTargetID = A94A57DA2F18DC3800DE9F0C; }; }; }; - buildConfigurationList = 215F257E2F18AF08000BEB64 /* Build configuration list for PBXProject "MeetKey" */; + buildConfigurationList = A94A57D62F18DC3800DE9F0C /* Build configuration list for PBXProject "MEETKEY" */; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); - mainGroup = 215F257A2F18AF08000BEB64; + mainGroup = A94A57D22F18DC3800DE9F0C; minimizedProjectReferenceProxies = 1; preferredProjectObjectVersion = 77; - productRefGroup = 215F25842F18AF08000BEB64 /* Products */; + productRefGroup = A94A57DC2F18DC3800DE9F0C /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 215F25822F18AF08000BEB64 /* MeetKey */, + A94A57DA2F18DC3800DE9F0C /* MEETKEY */, + A94A57E72F18DC3900DE9F0C /* MEETKEYTests */, + A94A57F12F18DC3900DE9F0C /* MEETKEYUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 215F25812F18AF08000BEB64 /* Resources */ = { + A94A57D92F18DC3800DE9F0C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A94A57E62F18DC3900DE9F0C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A94A57F02F18DC3900DE9F0C /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -115,7 +232,21 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 215F257F2F18AF08000BEB64 /* Sources */ = { + A94A57D72F18DC3800DE9F0C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A94A57E42F18DC3900DE9F0C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A94A57EE2F18DC3900DE9F0C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -124,8 +255,21 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + A94A57EA2F18DC3900DE9F0C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A94A57DA2F18DC3800DE9F0C /* MEETKEY */; + targetProxy = A94A57E92F18DC3900DE9F0C /* PBXContainerItemProxy */; + }; + A94A57F42F18DC3900DE9F0C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A94A57DA2F18DC3800DE9F0C /* MEETKEY */; + targetProxy = A94A57F32F18DC3900DE9F0C /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ - 215F258C2F18AF09000BEB64 /* Debug */ = { + A94A57FA2F18DC3900DE9F0C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -160,7 +304,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = CJX79LBA76; + DEVELOPMENT_TEAM = GCD88HGNYX; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -178,7 +322,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 26.0; + IPHONEOS_DEPLOYMENT_TARGET = 18.5; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -189,7 +333,7 @@ }; name = Debug; }; - 215F258D2F18AF09000BEB64 /* Release */ = { + A94A57FB2F18DC3900DE9F0C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -224,7 +368,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = CJX79LBA76; + DEVELOPMENT_TEAM = GCD88HGNYX; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -236,7 +380,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 26.0; + IPHONEOS_DEPLOYMENT_TARGET = 18.5; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -246,14 +390,14 @@ }; name = Release; }; - 215F258F2F18AF09000BEB64 /* Debug */ = { + A94A57FD2F18DC3900DE9F0C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = CJX79LBA76; + DEVELOPMENT_TEAM = GCD88HGNYX; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; @@ -266,26 +410,22 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.kangjooyoung.MeetKey; + PRODUCT_BUNDLE_IDENTIFIER = com.bluesummerskin.MEETKEY; PRODUCT_NAME = "$(TARGET_NAME)"; - STRING_CATALOG_GENERATE_SYMBOLS = YES; - SWIFT_APPROACHABLE_CONCURRENCY = YES; - SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 215F25902F18AF09000BEB64 /* Release */ = { + A94A57FE2F18DC3900DE9F0C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = CJX79LBA76; + DEVELOPMENT_TEAM = GCD88HGNYX; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; @@ -298,40 +438,126 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.kangjooyoung.MeetKey; + PRODUCT_BUNDLE_IDENTIFIER = com.bluesummerskin.MEETKEY; PRODUCT_NAME = "$(TARGET_NAME)"; - STRING_CATALOG_GENERATE_SYMBOLS = YES; - SWIFT_APPROACHABLE_CONCURRENCY = YES; - SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; + A94A58002F18DC3900DE9F0C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = GCD88HGNYX; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.5; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.bluesummerskin.MEETKEYTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MEETKEY.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MEETKEY"; + }; + name = Debug; + }; + A94A58012F18DC3900DE9F0C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = GCD88HGNYX; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.5; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.bluesummerskin.MEETKEYTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MEETKEY.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MEETKEY"; + }; + name = Release; + }; + A94A58032F18DC3900DE9F0C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = GCD88HGNYX; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.bluesummerskin.MEETKEYUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MEETKEY; + }; + name = Debug; + }; + A94A58042F18DC3900DE9F0C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = GCD88HGNYX; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.bluesummerskin.MEETKEYUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MEETKEY; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 215F257E2F18AF08000BEB64 /* Build configuration list for PBXProject "MeetKey" */ = { + A94A57D62F18DC3800DE9F0C /* Build configuration list for PBXProject "MEETKEY" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A94A57FA2F18DC3900DE9F0C /* Debug */, + A94A57FB2F18DC3900DE9F0C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A94A57FC2F18DC3900DE9F0C /* Build configuration list for PBXNativeTarget "MEETKEY" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A94A57FD2F18DC3900DE9F0C /* Debug */, + A94A57FE2F18DC3900DE9F0C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A94A57FF2F18DC3900DE9F0C /* Build configuration list for PBXNativeTarget "MEETKEYTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 215F258C2F18AF09000BEB64 /* Debug */, - 215F258D2F18AF09000BEB64 /* Release */, + A94A58002F18DC3900DE9F0C /* Debug */, + A94A58012F18DC3900DE9F0C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 215F258E2F18AF09000BEB64 /* Build configuration list for PBXNativeTarget "MeetKey" */ = { + A94A58022F18DC3900DE9F0C /* Build configuration list for PBXNativeTarget "MEETKEYUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 215F258F2F18AF09000BEB64 /* Debug */, - 215F25902F18AF09000BEB64 /* Release */, + A94A58032F18DC3900DE9F0C /* Debug */, + A94A58042F18DC3900DE9F0C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 215F257B2F18AF08000BEB64 /* Project object */; + rootObject = A94A57D32F18DC3800DE9F0C /* Project object */; } diff --git a/MeetKey/MeetKey/Assets.xcassets/Icon-51.imageset/Contents.json b/MeetKey/MeetKey/Assets.xcassets/Icon-51.imageset/Contents.json new file mode 100644 index 0000000..0ef7cdc --- /dev/null +++ b/MeetKey/MeetKey/Assets.xcassets/Icon-51.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon-51.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MeetKey/MeetKey/Assets.xcassets/Icon-51.imageset/Icon-51.svg b/MeetKey/MeetKey/Assets.xcassets/Icon-51.imageset/Icon-51.svg new file mode 100644 index 0000000..dcda47f --- /dev/null +++ b/MeetKey/MeetKey/Assets.xcassets/Icon-51.imageset/Icon-51.svg @@ -0,0 +1,3 @@ + + + diff --git a/MeetKey/MeetKey/Assets.xcassets/Orange.colorset/Contents.json b/MeetKey/MeetKey/Assets.xcassets/Orange.colorset/Contents.json new file mode 100644 index 0000000..6293297 --- /dev/null +++ b/MeetKey/MeetKey/Assets.xcassets/Orange.colorset/Contents.json @@ -0,0 +1,23 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.086", + "green" : "0.451", + "red" : "0.976" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "localizable" : true + } +} diff --git a/MeetKey/MeetKey/ChatListView.swift b/MeetKey/MeetKey/ChatListView.swift new file mode 100644 index 0000000..f44a469 --- /dev/null +++ b/MeetKey/MeetKey/ChatListView.swift @@ -0,0 +1,257 @@ +import SwiftUI + +struct ChatPreview: Identifiable, Equatable { + let id: UUID + let name: String + let subtitle: String + let time: String + var unreadCount: Int + let avatarSystemImage: String + let hasAvatar: Bool + + init( + id: UUID = UUID(), + name: String, + subtitle: String, + time: String, + unreadCount: Int, + avatarSystemImage: String, + hasAvatar: Bool + ) { + self.id = id + self.name = name + self.subtitle = subtitle + self.time = time + self.unreadCount = unreadCount + self.avatarSystemImage = avatarSystemImage + self.hasAvatar = hasAvatar + } +} + +struct ChatListView: View { + @State private var selectedTab: BottomTab = .chat + @State private var chats: [ChatPreview] = [ + .init(name: "July", subtitle: "Ciao! Let me know when you are fr...", time: "3h", unreadCount: 2, avatarSystemImage: "person.crop.circle.fill", hasAvatar: true), + .init(name: "Marco", subtitle: "hi!", time: "3h", unreadCount: 0, avatarSystemImage: "person.crop.circle.fill", hasAvatar: true), + .init(name: "John", subtitle: "Let me know", time: "3h", unreadCount: 1, avatarSystemImage: "person.crop.circle.fill", hasAvatar: true), + .init(name: "Jessy", subtitle: "when you are free?", time: "3h", unreadCount: 0, avatarSystemImage: "person.crop.circle.fill", hasAvatar: true), + .init(name: "Anna", subtitle: "Ciao! Let me know when you are fr...", time: "3h", unreadCount: 0, avatarSystemImage: "person.crop.circle.fill", hasAvatar: true) + ] + + var body: some View { + NavigationStack { + ZStack(alignment: .bottom) { + Color.white.ignoresSafeArea() + + VStack(spacing: 0) { + header + + ScrollView { + LazyVStack(spacing: 0) { + ForEach(chats.indices, id: \.self) { index in + NavigationLink { + ChatRoomView(userName: chats[index].name) + } label: { + VStack(spacing: 0) { + ChatRow(chat: chats[index]) + Divider() + } + } + .buttonStyle(.plain) + .simultaneousGesture(TapGesture().onEnded { + chats[index].unreadCount = 0 + }) + } + } + } + + BottomNavBar(selected: $selectedTab) + } + } + .toolbar(.hidden, for: .navigationBar) + } + } + + private var header: some View { + VStack(spacing: 0) { + HStack { + Text("채팅") + .font(.system(size: 26, weight: .bold)) + .foregroundColor(.black) + Spacer() + } + .padding(.horizontal, 20) + .padding(.top, 14) + .padding(.bottom, 10) + + Divider() + } + .background(Color.white) + } +} + +struct ChatRow: View { + let chat: ChatPreview + + var body: some View { + HStack(spacing: 14) { + avatar + + VStack(alignment: .leading, spacing: 6) { + Text(chat.name) + .font(.system(size: 17, weight: .semibold)) + .foregroundColor(.black) + + Text(chat.subtitle) + .font(.system(size: 14)) + .foregroundColor(.gray) + .lineLimit(1) + } + + Spacer() + + VStack(alignment: .trailing, spacing: 8) { + Text(chat.time) + .font(.system(size: 12)) + .foregroundColor(.gray) + + if chat.unreadCount > 0 { + UnreadBadge(count: chat.unreadCount) + } else { + Color.clear.frame(width: 22, height: 18) + } + } + } + .padding(.horizontal, 24) + .padding(.vertical, 12) + .background(Color.white) + } + + private var avatar: some View { + ZStack(alignment: .bottomTrailing) { + if chat.hasAvatar { + Image(systemName: chat.avatarSystemImage) + .resizable() + .scaledToFill() + .foregroundColor(Color(white: 0.85)) + .frame(width: 64, height: 64) + .clipShape(Circle()) + } else { + Circle() + .fill(Color(white: 0.92)) + .frame(width: 64, height: 64) + } + + StatusBadge(iconName: "Icon-51") + .offset(x: 4, y: 4) + } + } +} + +struct StatusBadge: View { + let iconName: String + + private let badgeSize: CGFloat = 22 + private let ringSize: CGFloat = 26 + private let iconSize: CGFloat = 12 + + var body: some View { + ZStack { + Circle() + .fill(Color.white) + .frame(width: ringSize, height: ringSize) + + Circle() + .fill(Color("Orange")) + .frame(width: badgeSize, height: badgeSize) + + Image(iconName) + .resizable() + .renderingMode(.template) + .scaledToFit() + .frame(width: iconSize, height: iconSize) + .foregroundColor(.white) + } + } +} + +struct UnreadBadge: View { + let count: Int + + var body: some View { + Text("\(count)") + .font(.system(size: 12, weight: .semibold)) + .foregroundColor(.white) + .padding(.horizontal, 7) + .padding(.vertical, 3) + .background(Capsule().fill(Color("Orange"))) + .frame(minWidth: 22) + } +} + +enum BottomTab: String, CaseIterable { + case chat = "채팅" + case content = "콘텐츠" + case home = "홈" + case meet = "만남" + case profile = "프로필" +} + +struct BottomNavBar: View { + @Binding var selected: BottomTab + + var body: some View { + VStack(spacing: 0) { + Divider() + HStack { + ForEach(BottomTab.allCases, id: \.self) { tab in + Spacer() + BottomNavItem(title: tab.rawValue, isSelected: selected == tab) + .onTapGesture { selected = tab } + Spacer() + } + } + .padding(.top, 12) + .padding(.bottom, 22) + .background(Color.white) + } + } +} + +struct BottomNavItem: View { + let title: String + let isSelected: Bool + + var body: some View { + Text(title) + .font(.system(size: 13, weight: .semibold)) + .foregroundColor(isSelected ? .black : Color(white: 0.45)) + .frame(width: 56, height: 56) + .background( + Circle() + .fill(isSelected ? Color(white: 0.92) : Color.clear) + ) + } +} + +struct ChatRoomView: View { + let userName: String + + var body: some View { + VStack(spacing: 12) { + Text("\(userName) 채팅방") + .font(.title2.bold()) + Text("아직 채팅 화면 구현 전") + .foregroundColor(.gray) + } + .frame(maxWidth: .infinity, maxHeight: .infinity) + .background(Color.white) + .navigationTitle(userName) + .navigationBarTitleDisplayMode(.inline) + } +} + +#Preview { + ChatListView() +} + diff --git a/MeetKey/MeetKey/ContentView.swift b/MeetKey/MeetKey/ContentView.swift deleted file mode 100644 index d20f4df..0000000 --- a/MeetKey/MeetKey/ContentView.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// ContentView.swift -// MeetKey -// -// Created by qwnm7 on 1/15/26. -// - -import SwiftUI - -struct ContentView: View { - var body: some View { - VStack { - Image(systemName: "globe") - .imageScale(.large) - .foregroundStyle(.tint) - Text("Hello, world!") - } - .padding() - } -} - -#Preview { - ContentView() -} diff --git a/MeetKey/MeetKey/MeetKeyApp.swift b/MeetKey/MeetKey/MeetKeyApp.swift index 859c0da..8449bf1 100644 --- a/MeetKey/MeetKey/MeetKeyApp.swift +++ b/MeetKey/MeetKey/MeetKeyApp.swift @@ -1,17 +1,17 @@ // -// MeetKeyApp.swift -// MeetKey +// MEETKEYApp.swift +// MEETKEY // -// Created by qwnm7 on 1/15/26. +// Created by 은재 on 1/15/26. // import SwiftUI @main -struct MeetKeyApp: App { +struct MEETKEYApp: App { var body: some Scene { WindowGroup { - ContentView() + ChatListView() } } }