From d272202b478e3263fd27cdad2c6c0147dd665a96 Mon Sep 17 00:00:00 2001 From: HyoWon Choi <81157265+wonniiii@users.noreply.github.com> Date: Fri, 13 Jan 2023 18:24:55 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[Feat]=20#52=20-=20=EC=9C=A0=EC=A0=80?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EA=B1=B0=EC=9D=98=20=EA=B5=AC=ED=98=84=20?= =?UTF-8?q?(#57)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Feat]#52 - 유저 생성 (다날 정보) 구현 * [Chore]#52 - 유저 생성 (다날 정보) 코드 수정 * [Feat]#52 - 유저 생성(성향) 구현 * [Feat]#52 - 유저 생성 (성향, 해시태그) 구현 * [Feat]#52 - 유저 생성(비밀번호) 구현 * [Docs] Update Readme.md * [Docs] Update Readme.md * [Chore]#52 - 유저 생성 코드 수정 Co-authored-by: 박의서 <70744494+kpk0616@users.noreply.github.com> --- Keyneez/Keyneez.xcodeproj/project.pbxproj | 383 ++++++++---------- .../xcshareddata/swiftpm/Package.resolved | 18 - Keyneez/Keyneez/Application/Info.plist | 10 +- .../Keyneez/Application/SceneDelegate.swift | 2 +- .../Danal/DanalUserDataViewController.swift | 40 +- .../HashTag/HashTagCollectionViewCell.swift | 2 +- .../HashTag/HashTagViewController.swift | 57 ++- .../JellyProductViewController.swift | 10 +- .../SignUp/Model/SignUpContentModel.swift | 25 +- .../PropensityTagViewController.swift | 16 +- .../SimplePwdCheckViewController.swift | 103 +++-- .../SimplePwd/SimplePwdViewController.swift | 68 ++-- Keyneez/Keyneez/Global/Auth/UserSession.swift | 2 +- .../SignIn/RequestDto}/LoginRequestDto.swift | 0 .../ResponseDto}/LoginResponseDto.swift | 0 .../RequestDto}/PasswordFetchRequestDto.swift | 0 .../RequestDto}/ProductDanalRequestDto.swift | 0 .../RequestDto}/ProductJellyRequestDto.swift | 4 +- .../ProductPwdRequestDto.swift.swift | 0 .../PasswordFetchResponseDto.swift | 0 .../ProductDanalResponseDto.swift | 6 - .../ProductJellyResponseDto.swift | 8 +- .../ResponseDto}/ProductPwdResponseDto.swift | 6 - .../Keyneez/Global/NetworkLayer/UserAPI.swift | 26 +- .../Global/NetworkLayer/UserAPIProvider.swift | 18 +- README.md | 21 +- 26 files changed, 417 insertions(+), 408 deletions(-) rename Keyneez/Keyneez/Global/NetworkLayer/{UserRequestDto => DTO/SignIn/RequestDto}/LoginRequestDto.swift (100%) rename Keyneez/Keyneez/Global/NetworkLayer/{UserResponseDto => DTO/SignIn/ResponseDto}/LoginResponseDto.swift (100%) rename Keyneez/Keyneez/Global/NetworkLayer/{UserRequestDto => DTO/SignUp/RequestDto}/PasswordFetchRequestDto.swift (100%) rename Keyneez/Keyneez/Global/NetworkLayer/{UserRequestDto => DTO/SignUp/RequestDto}/ProductDanalRequestDto.swift (100%) rename Keyneez/Keyneez/Global/NetworkLayer/{UserRequestDto => DTO/SignUp/RequestDto}/ProductJellyRequestDto.swift (80%) rename Keyneez/Keyneez/Global/NetworkLayer/{UserRequestDto => DTO/SignUp/RequestDto}/ProductPwdRequestDto.swift.swift (100%) rename Keyneez/Keyneez/Global/NetworkLayer/{UserResponseDto => DTO/SignUp/ResponseDto}/PasswordFetchResponseDto.swift (100%) rename Keyneez/Keyneez/Global/NetworkLayer/{UserResponseDto => DTO/SignUp/ResponseDto}/ProductDanalResponseDto.swift (65%) rename Keyneez/Keyneez/Global/NetworkLayer/{UserResponseDto => DTO/SignUp/ResponseDto}/ProductJellyResponseDto.swift (81%) rename Keyneez/Keyneez/Global/NetworkLayer/{UserResponseDto => DTO/SignUp/ResponseDto}/ProductPwdResponseDto.swift (71%) diff --git a/Keyneez/Keyneez.xcodeproj/project.pbxproj b/Keyneez/Keyneez.xcodeproj/project.pbxproj index abfa9b0..c304cd6 100644 --- a/Keyneez/Keyneez.xcodeproj/project.pbxproj +++ b/Keyneez/Keyneez.xcodeproj/project.pbxproj @@ -18,8 +18,6 @@ 0230ADCF296EB5E40079D799 /* ProductPwdResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0230ADCE296EB5E40079D799 /* ProductPwdResponseDto.swift */; }; 0230ADD1296EB7960079D799 /* PasswordFetchRequestDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0230ADD0296EB7960079D799 /* PasswordFetchRequestDto.swift */; }; 0230ADD3296EB7D70079D799 /* PasswordFetchResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0230ADD2296EB7D70079D799 /* PasswordFetchResponseDto.swift */; }; - 0230ADD5296EB8560079D799 /* LoginRequestDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0230ADD4296EB8560079D799 /* LoginRequestDto.swift */; }; - 0230ADD7296EB9420079D799 /* LoginResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0230ADD6296EB9420079D799 /* LoginResponseDto.swift */; }; 0230ADDA296EBBFE0079D799 /* ProductDanalRequestDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0230ADD9296EBBFE0079D799 /* ProductDanalRequestDto.swift */; }; 0230ADDC296EBD140079D799 /* ProductDanalResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0230ADDB296EBD140079D799 /* ProductDanalResponseDto.swift */; }; 0230ADDE296EBDAD0079D799 /* ProductJellyRequestDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0230ADDD296EBDAD0079D799 /* ProductJellyRequestDto.swift */; }; @@ -43,9 +41,17 @@ 0269E2262961DAC900309E8A /* Pretendard-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 0269E2252961DAC900309E8A /* Pretendard-Medium.otf */; }; 0269E2282961DAD400309E8A /* Pretendard-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 0269E2272961DAD400309E8A /* Pretendard-SemiBold.otf */; }; 0269E22A2961DC3700309E8A /* UIFont+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0269E2292961DC3700309E8A /* UIFont+Extension.swift */; }; + 027E251629709331004A84A2 /* Then in Frameworks */ = {isa = PBXBuildFile; productRef = 027E251529709331004A84A2 /* Then */; }; + 027E251929709348004A84A2 /* Moya in Frameworks */ = {isa = PBXBuildFile; productRef = 027E251829709348004A84A2 /* Moya */; }; + 027E251C29709358004A84A2 /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 027E251B29709358004A84A2 /* Kingfisher */; }; + 027E251F29709376004A84A2 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 027E251E29709376004A84A2 /* SnapKit */; }; + 027E2522297093A2004A84A2 /* Toast in Frameworks */ = {isa = PBXBuildFile; productRef = 027E2521297093A2004A84A2 /* Toast */; }; + 027E2525297093E4004A84A2 /* Floaty in Frameworks */ = {isa = PBXBuildFile; productRef = 027E2524297093E4004A84A2 /* Floaty */; }; + 027E25282970941F004A84A2 /* FirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = 027E25272970941F004A84A2 /* FirebaseStorage */; }; 02C066A42961C98600AED030 /* UIColor+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C066A32961C98600AED030 /* UIColor+Extension.swift */; }; 02F262AE2965ABEE005A1CE4 /* LoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02F262AD2965ABEE005A1CE4 /* LoadingView.swift */; }; - 1D6CD1BFF0476985CA56B7A7 /* Pods_Keyneez_KeyneezUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD2690E656AE8959F583967C /* Pods_Keyneez_KeyneezUITests.framework */; }; + 49B87B7BBCC018CE8FBF89FB /* Pods_Keyneez_KeyneezUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B4CDB484FF4CBA78FD6EFEC /* Pods_Keyneez_KeyneezUITests.framework */; }; + 72F0603781696D8B64662348 /* Pods_KeyneezTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AACAB5EBE001E27A5747225 /* Pods_KeyneezTests.framework */; }; B10AAD3C296967C700AB8475 /* SeparatedButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10AAD38296967C600AB8475 /* SeparatedButton.swift */; }; B10AAD3D296967C700AB8475 /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10AAD39296967C700AB8475 /* UIView+Extension.swift */; }; B10AAD3E296967C700AB8475 /* ReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10AAD3A296967C700AB8475 /* ReusableView.swift */; }; @@ -62,7 +68,6 @@ B10AAD6E296967F300AB8475 /* IDContentActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10AAD55296967F100AB8475 /* IDContentActions.swift */; }; B10AAD70296967F300AB8475 /* IDCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10AAD57296967F200AB8475 /* IDCardView.swift */; }; B10AAD71296967F300AB8475 /* IDNotAvailableActionables.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10AAD58296967F200AB8475 /* IDNotAvailableActionables.swift */; }; - B10AAD7929696AEE00AB8475 /* BottomSheet in Frameworks */ = {isa = PBXBuildFile; productRef = B10AACFA29673D4100AB8475 /* BottomSheet */; }; B10AAD7B29696C7700AB8475 /* IDViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10AAD7A29696C7700AB8475 /* IDViewController.swift */; }; B10AAD8229696FCA00AB8475 /* IDDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10AAD56296967F200AB8475 /* IDDetailViewController.swift */; }; B10AAD8329696FCD00AB8475 /* IDDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10AAD4F296967F100AB8475 /* IDDetailView.swift */; }; @@ -80,10 +85,6 @@ B14D109F2959C79A0004946F /* KeyneezUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14D109E2959C79A0004946F /* KeyneezUITests.swift */; }; B14D10A12959C79A0004946F /* KeyneezUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14D10A02959C79A0004946F /* KeyneezUITestsLaunchTests.swift */; }; B14D10AF2959CA080004946F /* KeyneezTabbarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14D10AE2959CA080004946F /* KeyneezTabbarController.swift */; }; - B14D10BE2959D26C0004946F /* Then in Frameworks */ = {isa = PBXBuildFile; productRef = B14D10BD2959D26C0004946F /* Then */; }; - B14D10C12959D2BC0004946F /* Moya in Frameworks */ = {isa = PBXBuildFile; productRef = B14D10C02959D2BC0004946F /* Moya */; }; - B14D10C42959D3070004946F /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = B14D10C32959D3070004946F /* Kingfisher */; }; - B14D10C72959D3720004946F /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = B14D10C62959D3720004946F /* SnapKit */; }; B1812357296B001B0029FEB6 /* UIImage+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1812356296B001B0029FEB6 /* UIImage+Extension.swift */; }; B181235A296B2EF20029FEB6 /* IDCardGuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1812359296B2EF20029FEB6 /* IDCardGuideViewController.swift */; }; B181235C296B30CB0029FEB6 /* IDCardGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B181235B296B30CB0029FEB6 /* IDCardGuideView.swift */; }; @@ -105,8 +106,6 @@ B18B60D7296552DA00AF14F5 /* NavigationViewBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18B60CE296552DA00AF14F5 /* NavigationViewBuilder.swift */; }; B18C2BBA296F267C00A9AA1B /* UIUtilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18C2BB9296F267C00A9AA1B /* UIUtilities.swift */; }; B18C2BBC296FF0B600A9AA1B /* OCR.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18C2BBB296FF0B600A9AA1B /* OCR.swift */; }; - B18C2BC529706DC000A9AA1B /* FirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = B18C2BC429706DC000A9AA1B /* FirebaseStorage */; }; - B18C2BC729706DC000A9AA1B /* FirebaseStorageCombine-Community in Frameworks */ = {isa = PBXBuildFile; productRef = B18C2BC629706DC000A9AA1B /* FirebaseStorageCombine-Community */; }; B1A80358296D95C10007DDD9 /* PhysicalIDViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A80357296D95C10007DDD9 /* PhysicalIDViewController.swift */; }; B1A8035B296D98E70007DDD9 /* PhysicalIDActionables.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A8035A296D98E70007DDD9 /* PhysicalIDActionables.swift */; }; B1A8035D296D99180007DDD9 /* PhysicalIDActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A8035C296D99180007DDD9 /* PhysicalIDActions.swift */; }; @@ -120,9 +119,6 @@ B1A8037E296E9DF20007DDD9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A8037D296E9DF20007DDD9 /* UserAPI.swift */; }; B1A80380296EA54E0007DDD9 /* UserAPIProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A8037F296EA54E0007DDD9 /* UserAPIProvider.swift */; }; B1A80382296EA66F0007DDD9 /* GenericResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A80381296EA66F0007DDD9 /* GenericResponse.swift */; }; - B1B21D0E295C985C0083D9EE /* Toast in Frameworks */ = {isa = PBXBuildFile; productRef = B1B21D0D295C985C0083D9EE /* Toast */; }; - B1B21D11295C99280083D9EE /* FloatingPanel in Frameworks */ = {isa = PBXBuildFile; productRef = B1B21D10295C99280083D9EE /* FloatingPanel */; }; - B1B21D14295C9C4B0083D9EE /* Floaty in Frameworks */ = {isa = PBXBuildFile; productRef = B1B21D13295C9C4B0083D9EE /* Floaty */; }; B1B21D17295DE0660083D9EE /* .swiftlint.yml in Resources */ = {isa = PBXBuildFile; fileRef = B1B21D16295DE0660083D9EE /* .swiftlint.yml */; }; B8C02F022962F4AF005612CE /* KeyneezTabbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C02F012962F4AF005612CE /* KeyneezTabbar.swift */; }; B8C02F052962F5D4005612CE /* SettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C02F042962F5D4005612CE /* SettingViewController.swift */; }; @@ -156,8 +152,7 @@ B8FC663C296F2C5700AEE9C3 /* ContentAPIProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8FC663B296F2C5700AEE9C3 /* ContentAPIProvider.swift */; }; B8FC663E296F2DDA00AEE9C3 /* ContentRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8FC663D296F2DDA00AEE9C3 /* ContentRepository.swift */; }; B8FC6640297057A400AEE9C3 /* UILabel+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8FC663F297057A400AEE9C3 /* UILabel+Extension.swift */; }; - C4E673A65B49C299A564EA37 /* Pods_Keyneez.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0913865316C3A35604014EFF /* Pods_Keyneez.framework */; }; - D751BF704437497F572C630B /* Pods_KeyneezTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 136F9C3DABF1403A41A57E9F /* Pods_KeyneezTests.framework */; }; + C5F04103F38C3EA6BF1A98B9 /* Pods_Keyneez.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246FE3278A9BFC18306D6330 /* Pods_Keyneez.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -189,8 +184,6 @@ 0230ADCE296EB5E40079D799 /* ProductPwdResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductPwdResponseDto.swift; sourceTree = ""; }; 0230ADD0296EB7960079D799 /* PasswordFetchRequestDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasswordFetchRequestDto.swift; sourceTree = ""; }; 0230ADD2296EB7D70079D799 /* PasswordFetchResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasswordFetchResponseDto.swift; sourceTree = ""; }; - 0230ADD4296EB8560079D799 /* LoginRequestDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginRequestDto.swift; sourceTree = ""; }; - 0230ADD6296EB9420079D799 /* LoginResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResponseDto.swift; sourceTree = ""; }; 0230ADD9296EBBFE0079D799 /* ProductDanalRequestDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductDanalRequestDto.swift; sourceTree = ""; }; 0230ADDB296EBD140079D799 /* ProductDanalResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductDanalResponseDto.swift; sourceTree = ""; }; 0230ADDD296EBDAD0079D799 /* ProductJellyRequestDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductJellyRequestDto.swift; sourceTree = ""; }; @@ -216,13 +209,12 @@ 0269E2292961DC3700309E8A /* UIFont+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Extension.swift"; sourceTree = ""; }; 02C066A32961C98600AED030 /* UIColor+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extension.swift"; sourceTree = ""; }; 02F262AD2965ABEE005A1CE4 /* LoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingView.swift; sourceTree = ""; }; - 0913865316C3A35604014EFF /* Pods_Keyneez.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Keyneez.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 136F9C3DABF1403A41A57E9F /* Pods_KeyneezTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_KeyneezTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 53C4AC44C573A1F105AE3493 /* Pods-KeyneezTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KeyneezTests.debug.xcconfig"; path = "Target Support Files/Pods-KeyneezTests/Pods-KeyneezTests.debug.xcconfig"; sourceTree = ""; }; - 7674DF794F82FABE2D9EFE16 /* Pods-Keyneez-KeyneezUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Keyneez-KeyneezUITests.debug.xcconfig"; path = "Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests.debug.xcconfig"; sourceTree = ""; }; - 77D3428FD56E61A83865CEDA /* Pods-KeyneezTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KeyneezTests.release.xcconfig"; path = "Target Support Files/Pods-KeyneezTests/Pods-KeyneezTests.release.xcconfig"; sourceTree = ""; }; - A40410AD213302D4DCE6E471 /* Pods-Keyneez-KeyneezUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Keyneez-KeyneezUITests.release.xcconfig"; path = "Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests.release.xcconfig"; sourceTree = ""; }; - AD2690E656AE8959F583967C /* Pods_Keyneez_KeyneezUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Keyneez_KeyneezUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 246FE3278A9BFC18306D6330 /* Pods_Keyneez.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Keyneez.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2B4CDB484FF4CBA78FD6EFEC /* Pods_Keyneez_KeyneezUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Keyneez_KeyneezUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 33EA4B8DDBEC7F6FC6B6856B /* Pods-KeyneezTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KeyneezTests.debug.xcconfig"; path = "Target Support Files/Pods-KeyneezTests/Pods-KeyneezTests.debug.xcconfig"; sourceTree = ""; }; + 3AACAB5EBE001E27A5747225 /* Pods_KeyneezTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_KeyneezTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 78492C4CCDBBFAEB657740D3 /* Pods-Keyneez-KeyneezUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Keyneez-KeyneezUITests.debug.xcconfig"; path = "Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests.debug.xcconfig"; sourceTree = ""; }; + 844200C19D3D733AD4A5F93B /* Pods-Keyneez.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Keyneez.debug.xcconfig"; path = "Target Support Files/Pods-Keyneez/Pods-Keyneez.debug.xcconfig"; sourceTree = ""; }; B10AAD38296967C600AB8475 /* SeparatedButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SeparatedButton.swift; sourceTree = ""; }; B10AAD39296967C700AB8475 /* UIView+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Extension.swift"; sourceTree = ""; }; B10AAD3A296967C700AB8475 /* ReusableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReusableView.swift; sourceTree = ""; }; @@ -327,8 +319,9 @@ B8FC663B296F2C5700AEE9C3 /* ContentAPIProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentAPIProvider.swift; sourceTree = ""; }; B8FC663D296F2DDA00AEE9C3 /* ContentRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentRepository.swift; sourceTree = ""; }; B8FC663F297057A400AEE9C3 /* UILabel+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UILabel+Extension.swift"; sourceTree = ""; }; - E3818A1590105286D89CFDC2 /* Pods-Keyneez.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Keyneez.release.xcconfig"; path = "Target Support Files/Pods-Keyneez/Pods-Keyneez.release.xcconfig"; sourceTree = ""; }; - FC64DF4CF12A8089751D7DC1 /* Pods-Keyneez.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Keyneez.debug.xcconfig"; path = "Target Support Files/Pods-Keyneez/Pods-Keyneez.debug.xcconfig"; sourceTree = ""; }; + E02C7A585D4D9986EDB6790D /* Pods-Keyneez.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Keyneez.release.xcconfig"; path = "Target Support Files/Pods-Keyneez/Pods-Keyneez.release.xcconfig"; sourceTree = ""; }; + E234CDD854A1579605E88433 /* Pods-KeyneezTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KeyneezTests.release.xcconfig"; path = "Target Support Files/Pods-KeyneezTests/Pods-KeyneezTests.release.xcconfig"; sourceTree = ""; }; + F53BBB2E25E4BB9E4508FBEC /* Pods-Keyneez-KeyneezUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Keyneez-KeyneezUITests.release.xcconfig"; path = "Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -336,17 +329,14 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B18C2BC729706DC000A9AA1B /* FirebaseStorageCombine-Community in Frameworks */, - B10AAD7929696AEE00AB8475 /* BottomSheet in Frameworks */, - B14D10C42959D3070004946F /* Kingfisher in Frameworks */, - B14D10C72959D3720004946F /* SnapKit in Frameworks */, - B18C2BC529706DC000A9AA1B /* FirebaseStorage in Frameworks */, - B14D10C12959D2BC0004946F /* Moya in Frameworks */, - B1B21D14295C9C4B0083D9EE /* Floaty in Frameworks */, - B1B21D11295C99280083D9EE /* FloatingPanel in Frameworks */, - B1B21D0E295C985C0083D9EE /* Toast in Frameworks */, - B14D10BE2959D26C0004946F /* Then in Frameworks */, - C4E673A65B49C299A564EA37 /* Pods_Keyneez.framework in Frameworks */, + 027E2522297093A2004A84A2 /* Toast in Frameworks */, + 027E251C29709358004A84A2 /* Kingfisher in Frameworks */, + C5F04103F38C3EA6BF1A98B9 /* Pods_Keyneez.framework in Frameworks */, + 027E2525297093E4004A84A2 /* Floaty in Frameworks */, + 027E251629709331004A84A2 /* Then in Frameworks */, + 027E25282970941F004A84A2 /* FirebaseStorage in Frameworks */, + 027E251929709348004A84A2 /* Moya in Frameworks */, + 027E251F29709376004A84A2 /* SnapKit in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -354,7 +344,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D751BF704437497F572C630B /* Pods_KeyneezTests.framework in Frameworks */, + 72F0603781696D8B64662348 /* Pods_KeyneezTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -362,7 +352,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1D6CD1BFF0476985CA56B7A7 /* Pods_Keyneez_KeyneezUITests.framework in Frameworks */, + 49B87B7BBCC018CE8FBF89FB /* Pods_Keyneez_KeyneezUITests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -424,30 +414,6 @@ path = JellyDetail; sourceTree = ""; }; - 0230ADC9296EB45D0079D799 /* UserRequestDto */ = { - isa = PBXGroup; - children = ( - 0230ADD0296EB7960079D799 /* PasswordFetchRequestDto.swift */, - 0230ADCB296EB58F0079D799 /* ProductPwdRequestDto.swift.swift */, - 0230ADD4296EB8560079D799 /* LoginRequestDto.swift */, - 0230ADD9296EBBFE0079D799 /* ProductDanalRequestDto.swift */, - 0230ADDD296EBDAD0079D799 /* ProductJellyRequestDto.swift */, - ); - path = UserRequestDto; - sourceTree = ""; - }; - 0230ADCD296EB5CA0079D799 /* UserResponseDto */ = { - isa = PBXGroup; - children = ( - 0230ADCE296EB5E40079D799 /* ProductPwdResponseDto.swift */, - 0230ADD2296EB7D70079D799 /* PasswordFetchResponseDto.swift */, - 0230ADD6296EB9420079D799 /* LoginResponseDto.swift */, - 0230ADDB296EBD140079D799 /* ProductDanalResponseDto.swift */, - 0230ADDF296EBE020079D799 /* ProductJellyResponseDto.swift */, - ); - path = UserResponseDto; - sourceTree = ""; - }; 0233C6FF296CA0BD00A177E9 /* PropensityTag */ = { isa = PBXGroup; children = ( @@ -475,6 +441,28 @@ path = SimplePwd; sourceTree = ""; }; + 02360344296F244B00044BF3 /* ResponseDto */ = { + isa = PBXGroup; + children = ( + 0230ADD2296EB7D70079D799 /* PasswordFetchResponseDto.swift */, + 0230ADCE296EB5E40079D799 /* ProductPwdResponseDto.swift */, + 0230ADDB296EBD140079D799 /* ProductDanalResponseDto.swift */, + 0230ADDF296EBE020079D799 /* ProductJellyResponseDto.swift */, + ); + path = ResponseDto; + sourceTree = ""; + }; + 02360345296F245A00044BF3 /* RequestDto */ = { + isa = PBXGroup; + children = ( + 0230ADD0296EB7960079D799 /* PasswordFetchRequestDto.swift */, + 0230ADCB296EB58F0079D799 /* ProductPwdRequestDto.swift.swift */, + 0230ADD9296EBBFE0079D799 /* ProductDanalRequestDto.swift */, + 0230ADDD296EBDAD0079D799 /* ProductJellyRequestDto.swift */, + ); + path = RequestDto; + sourceTree = ""; + }; 0269E2222961D79200309E8A /* File */ = { isa = PBXGroup; children = ( @@ -496,26 +484,16 @@ 0BF31931D3C2D8F8B817516C /* Pods */ = { isa = PBXGroup; children = ( - FC64DF4CF12A8089751D7DC1 /* Pods-Keyneez.debug.xcconfig */, - E3818A1590105286D89CFDC2 /* Pods-Keyneez.release.xcconfig */, - 7674DF794F82FABE2D9EFE16 /* Pods-Keyneez-KeyneezUITests.debug.xcconfig */, - A40410AD213302D4DCE6E471 /* Pods-Keyneez-KeyneezUITests.release.xcconfig */, - 53C4AC44C573A1F105AE3493 /* Pods-KeyneezTests.debug.xcconfig */, - 77D3428FD56E61A83865CEDA /* Pods-KeyneezTests.release.xcconfig */, + 844200C19D3D733AD4A5F93B /* Pods-Keyneez.debug.xcconfig */, + E02C7A585D4D9986EDB6790D /* Pods-Keyneez.release.xcconfig */, + 78492C4CCDBBFAEB657740D3 /* Pods-Keyneez-KeyneezUITests.debug.xcconfig */, + F53BBB2E25E4BB9E4508FBEC /* Pods-Keyneez-KeyneezUITests.release.xcconfig */, + 33EA4B8DDBEC7F6FC6B6856B /* Pods-KeyneezTests.debug.xcconfig */, + E234CDD854A1579605E88433 /* Pods-KeyneezTests.release.xcconfig */, ); path = Pods; sourceTree = ""; }; - 602536908343F20172C71F32 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 0913865316C3A35604014EFF /* Pods_Keyneez.framework */, - AD2690E656AE8959F583967C /* Pods_Keyneez_KeyneezUITests.framework */, - 136F9C3DABF1403A41A57E9F /* Pods_KeyneezTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; B10AAD4A296967F100AB8475 /* IDCard */ = { isa = PBXGroup; children = ( @@ -592,7 +570,7 @@ B14D109D2959C79A0004946F /* KeyneezUITests */, B14D107B2959C7980004946F /* Products */, 0BF31931D3C2D8F8B817516C /* Pods */, - 602536908343F20172C71F32 /* Frameworks */, + F268814C3856E529F87B081D /* Frameworks */, ); sourceTree = ""; }; @@ -753,7 +731,6 @@ B14D10B92959CC340004946F /* NetworkLayer */ = { isa = PBXGroup; children = ( - B8C844D3296EBD7600E88B86 /* Base */, B1A80379296E9D680007DDD9 /* Encodable.swift */, B1A8037B296E9DB60007DDD9 /* NetworkLoggerPlugin.swift */, B8FC6639296F22EA00AEE9C3 /* ContentAPI.swift */, @@ -762,8 +739,7 @@ B1A8037F296EA54E0007DDD9 /* UserAPIProvider.swift */, B1A80381296EA66F0007DDD9 /* GenericResponse.swift */, B8C844D4296EBD8100E88B86 /* DTO */, - 0230ADCD296EB5CA0079D799 /* UserResponseDto */, - 0230ADC9296EB45D0079D799 /* UserRequestDto */, + B8C844D3296EBD7600E88B86 /* Base */, ); path = NetworkLayer; sourceTree = ""; @@ -988,6 +964,8 @@ B8FC6637296EC65400AEE9C3 /* SignUp */ = { isa = PBXGroup; children = ( + 02360345296F245A00044BF3 /* RequestDto */, + 02360344296F244B00044BF3 /* ResponseDto */, ); path = SignUp; sourceTree = ""; @@ -999,6 +977,16 @@ path = SignIn; sourceTree = ""; }; + F268814C3856E529F87B081D /* Frameworks */ = { + isa = PBXGroup; + children = ( + 246FE3278A9BFC18306D6330 /* Pods_Keyneez.framework */, + 2B4CDB484FF4CBA78FD6EFEC /* Pods_Keyneez_KeyneezUITests.framework */, + 3AACAB5EBE001E27A5747225 /* Pods_KeyneezTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -1006,13 +994,13 @@ isa = PBXNativeTarget; buildConfigurationList = B14D10A42959C79A0004946F /* Build configuration list for PBXNativeTarget "Keyneez" */; buildPhases = ( - AA4D5E7F621AE6EBC973A42A /* [CP] Check Pods Manifest.lock */, + 2F2FD2E8691B9ECA5D314C2C /* [CP] Check Pods Manifest.lock */, B1B21D15295DDE170083D9EE /* SwiftLint Script */, B14D10762959C7980004946F /* Sources */, B14D10772959C7980004946F /* Frameworks */, B14D10782959C7980004946F /* Resources */, - 565039BFF4F5DB9EE46340FC /* [CP] Embed Pods Frameworks */, - BC7733C38E3330379D185693 /* [CP] Copy Pods Resources */, + 98E61F5636C8B73D6B14AA76 /* [CP] Embed Pods Frameworks */, + 6A01CAF302E773EC0FC877BD /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1020,16 +1008,13 @@ ); name = Keyneez; packageProductDependencies = ( - B14D10BD2959D26C0004946F /* Then */, - B14D10C02959D2BC0004946F /* Moya */, - B14D10C32959D3070004946F /* Kingfisher */, - B14D10C62959D3720004946F /* SnapKit */, - B1B21D0D295C985C0083D9EE /* Toast */, - B1B21D10295C99280083D9EE /* FloatingPanel */, - B1B21D13295C9C4B0083D9EE /* Floaty */, - B10AACFA29673D4100AB8475 /* BottomSheet */, - B18C2BC429706DC000A9AA1B /* FirebaseStorage */, - B18C2BC629706DC000A9AA1B /* FirebaseStorageCombine-Community */, + 027E251529709331004A84A2 /* Then */, + 027E251829709348004A84A2 /* Moya */, + 027E251B29709358004A84A2 /* Kingfisher */, + 027E251E29709376004A84A2 /* SnapKit */, + 027E2521297093A2004A84A2 /* Toast */, + 027E2524297093E4004A84A2 /* Floaty */, + 027E25272970941F004A84A2 /* FirebaseStorage */, ); productName = Keyneez; productReference = B14D107A2959C7980004946F /* Keyneez.app */; @@ -1039,7 +1024,7 @@ isa = PBXNativeTarget; buildConfigurationList = B14D10A72959C79A0004946F /* Build configuration list for PBXNativeTarget "KeyneezTests" */; buildPhases = ( - 2A87E28258FC274AC09F6E99 /* [CP] Check Pods Manifest.lock */, + C027FB4ABD48490C02A981F1 /* [CP] Check Pods Manifest.lock */, B14D108C2959C79A0004946F /* Sources */, B14D108D2959C79A0004946F /* Frameworks */, B14D108E2959C79A0004946F /* Resources */, @@ -1058,12 +1043,12 @@ isa = PBXNativeTarget; buildConfigurationList = B14D10AA2959C79A0004946F /* Build configuration list for PBXNativeTarget "KeyneezUITests" */; buildPhases = ( - 18070B175DD83C25997D881A /* [CP] Check Pods Manifest.lock */, + 299E19FD355BA1A19B1EC0AA /* [CP] Check Pods Manifest.lock */, B14D10962959C79A0004946F /* Sources */, B14D10972959C79A0004946F /* Frameworks */, B14D10982959C79A0004946F /* Resources */, - 28B2F6826D4B593B544601E8 /* [CP] Embed Pods Frameworks */, - 7BC9E1C0E61EE0B6556A2E73 /* [CP] Copy Pods Resources */, + 2CD4E9AC67004D062A5D4744 /* [CP] Embed Pods Frameworks */, + CD79BB276BEE913A58CA0A2E /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1108,15 +1093,13 @@ ); mainGroup = B14D10712959C7980004946F; packageReferences = ( - B14D10BC2959D26C0004946F /* XCRemoteSwiftPackageReference "Then" */, - B14D10BF2959D2BC0004946F /* XCRemoteSwiftPackageReference "Moya" */, - B14D10C22959D3070004946F /* XCRemoteSwiftPackageReference "Kingfisher" */, - B14D10C52959D3710004946F /* XCRemoteSwiftPackageReference "SnapKit" */, - B1B21D0C295C985C0083D9EE /* XCRemoteSwiftPackageReference "Toast-Swift" */, - B1B21D0F295C99270083D9EE /* XCRemoteSwiftPackageReference "FloatingPanel" */, - B1B21D12295C9C4B0083D9EE /* XCRemoteSwiftPackageReference "Floaty" */, - B10AACF929673D4100AB8475 /* XCRemoteSwiftPackageReference "BottomSheet" */, - B18C2BC329706DC000A9AA1B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, + 027E251429709331004A84A2 /* XCRemoteSwiftPackageReference "Then" */, + 027E251729709348004A84A2 /* XCRemoteSwiftPackageReference "Moya" */, + 027E251A29709358004A84A2 /* XCRemoteSwiftPackageReference "Kingfisher" */, + 027E251D29709376004A84A2 /* XCRemoteSwiftPackageReference "SnapKit" */, + 027E2520297093A2004A84A2 /* XCRemoteSwiftPackageReference "Toast-Swift" */, + 027E2523297093E4004A84A2 /* XCRemoteSwiftPackageReference "Floaty" */, + 027E25262970941F004A84A2 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, ); productRefGroup = B14D107B2959C7980004946F /* Products */; projectDirPath = ""; @@ -1160,7 +1143,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 18070B175DD83C25997D881A /* [CP] Check Pods Manifest.lock */ = { + 299E19FD355BA1A19B1EC0AA /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -1182,7 +1165,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 28B2F6826D4B593B544601E8 /* [CP] Embed Pods Frameworks */ = { + 2CD4E9AC67004D062A5D4744 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -1199,7 +1182,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 2A87E28258FC274AC09F6E99 /* [CP] Check Pods Manifest.lock */ = { + 2F2FD2E8691B9ECA5D314C2C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -1214,103 +1197,103 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-KeyneezTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Keyneez-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 565039BFF4F5DB9EE46340FC /* [CP] Embed Pods Frameworks */ = { + 6A01CAF302E773EC0FC877BD /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 7BC9E1C0E61EE0B6556A2E73 /* [CP] Copy Pods Resources */ = { + 98E61F5636C8B73D6B14AA76 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests-resources-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Copy Pods Resources"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests-resources-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - AA4D5E7F621AE6EBC973A42A /* [CP] Check Pods Manifest.lock */ = { + B1B21D15295DDE170083D9EE /* SwiftLint Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "SwiftLint Script"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Keyneez-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; - B1B21D15295DDE170083D9EE /* SwiftLint Script */ = { + C027FB4ABD48490C02A981F1 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = "SwiftLint Script"; + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-KeyneezTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - BC7733C38E3330379D185693 /* [CP] Copy Pods Resources */ = { + CD79BB276BEE913A58CA0A2E /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-resources-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests-resources-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-resources-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Keyneez/Pods-Keyneez-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Keyneez-KeyneezUITests/Pods-Keyneez-KeyneezUITests-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -1332,9 +1315,7 @@ 0233C6F8296C07A300A177E9 /* JellyProductCollectionViewCell.swift in Sources */, B18B60D2296552DA00AF14F5 /* NiblessViewController.swift in Sources */, B10AAD64296967F300AB8475 /* BenefitCollectionViewCell.swift in Sources */, - 0230ADD7296EB9420079D799 /* LoginResponseDto.swift in Sources */, B10AAD8E2969CA4700AB8475 /* PhotoCaptureDelegate.swift in Sources */, - 0230ADD5296EB8560079D799 /* LoginRequestDto.swift in Sources */, B1A80358296D95C10007DDD9 /* PhysicalIDViewController.swift in Sources */, 0269E22A2961DC3700309E8A /* UIFont+Extension.swift in Sources */, B181235C296B30CB0029FEB6 /* IDCardGuideView.swift in Sources */, @@ -1612,16 +1593,19 @@ }; B14D10A52959C79A0004946F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FC64DF4CF12A8089751D7DC1 /* Pods-Keyneez.debug.xcconfig */; + baseConfigurationReference = 844200C19D3D733AD4A5F93B /* Pods-Keyneez.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; BASE_URL = "http://15.165.186.200:3000/"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 693WY75AQY; + DEVELOPMENT_TEAM = 2QWMDJG53V; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Keyneez/Application/Info.plist; + INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES; + INFOPLIST_KEY_NSCameraUsageDescription = "키니즈 ID서비스를 사용하려면 '카메라' 접근권한을 허용해야 해요."; + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "키니즈 ID서비스를 사용하려면 '카메라' 접근권한을 허용해야 해요."; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UIStatusBarStyle = ""; @@ -1633,7 +1617,8 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.baconbeacon.Keyneez; + ONLY_ACTIVE_ARCH = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.baconbeaconn.Keyneez; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; @@ -1646,16 +1631,21 @@ }; B14D10A62959C79A0004946F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E3818A1590105286D89CFDC2 /* Pods-Keyneez.release.xcconfig */; + baseConfigurationReference = E02C7A585D4D9986EDB6790D /* Pods-Keyneez.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; BASE_URL = "http://15.165.186.200:3000/"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 693WY75AQY; + DEVELOPMENT_TEAM = 2QWMDJG53V; + EXCLUDED_ARCHS = ""; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Keyneez/Application/Info.plist; + INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES; + INFOPLIST_KEY_NSCameraUsageDescription = "키니즈 ID서비스를 사용하려면 '카메라' 접근권한을 허용해야 해요."; + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "키니즈 ID서비스를 사용하려면 '카메라' 접근권한을 허용해야 해요."; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UIStatusBarStyle = ""; @@ -1667,7 +1657,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.baconbeacon.Keyneez; + PRODUCT_BUNDLE_IDENTIFIER = com.baconbeaconn.Keyneez; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; @@ -1680,7 +1670,7 @@ }; B14D10A82959C79A0004946F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 53C4AC44C573A1F105AE3493 /* Pods-KeyneezTests.debug.xcconfig */; + baseConfigurationReference = 33EA4B8DDBEC7F6FC6B6856B /* Pods-KeyneezTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -1701,7 +1691,7 @@ }; B14D10A92959C79A0004946F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 77D3428FD56E61A83865CEDA /* Pods-KeyneezTests.release.xcconfig */; + baseConfigurationReference = E234CDD854A1579605E88433 /* Pods-KeyneezTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -1722,7 +1712,7 @@ }; B14D10AB2959C79A0004946F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7674DF794F82FABE2D9EFE16 /* Pods-Keyneez-KeyneezUITests.debug.xcconfig */; + baseConfigurationReference = 78492C4CCDBBFAEB657740D3 /* Pods-Keyneez-KeyneezUITests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; @@ -1741,7 +1731,7 @@ }; B14D10AC2959C79A0004946F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A40410AD213302D4DCE6E471 /* Pods-Keyneez-KeyneezUITests.release.xcconfig */; + baseConfigurationReference = F53BBB2E25E4BB9E4508FBEC /* Pods-Keyneez-KeyneezUITests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; @@ -1800,15 +1790,7 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - B10AACF929673D4100AB8475 /* XCRemoteSwiftPackageReference "BottomSheet" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/joomcode/BottomSheet.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.0.0; - }; - }; - B14D10BC2959D26C0004946F /* XCRemoteSwiftPackageReference "Then" */ = { + 027E251429709331004A84A2 /* XCRemoteSwiftPackageReference "Then" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/devxoul/Then"; requirement = { @@ -1816,23 +1798,23 @@ minimumVersion = 2.0.0; }; }; - B14D10BF2959D2BC0004946F /* XCRemoteSwiftPackageReference "Moya" */ = { + 027E251729709348004A84A2 /* XCRemoteSwiftPackageReference "Moya" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/Moya/Moya.git"; + repositoryURL = "https://github.com/Moya/Moya"; requirement = { kind = upToNextMajorVersion; minimumVersion = 15.0.0; }; }; - B14D10C22959D3070004946F /* XCRemoteSwiftPackageReference "Kingfisher" */ = { + 027E251A29709358004A84A2 /* XCRemoteSwiftPackageReference "Kingfisher" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/onevcat/Kingfisher.git"; + repositoryURL = "https://github.com/onevcat/Kingfisher"; requirement = { kind = upToNextMajorVersion; minimumVersion = 7.0.0; }; }; - B14D10C52959D3710004946F /* XCRemoteSwiftPackageReference "SnapKit" */ = { + 027E251D29709376004A84A2 /* XCRemoteSwiftPackageReference "SnapKit" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/SnapKit/SnapKit"; requirement = { @@ -1840,15 +1822,7 @@ minimumVersion = 5.0.0; }; }; - B18C2BC329706DC000A9AA1B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 10.0.0; - }; - }; - B1B21D0C295C985C0083D9EE /* XCRemoteSwiftPackageReference "Toast-Swift" */ = { + 027E2520297093A2004A84A2 /* XCRemoteSwiftPackageReference "Toast-Swift" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/scalessec/Toast-Swift.git"; requirement = { @@ -1856,74 +1830,59 @@ minimumVersion = 5.0.1; }; }; - B1B21D0F295C99270083D9EE /* XCRemoteSwiftPackageReference "FloatingPanel" */ = { + 027E2523297093E4004A84A2 /* XCRemoteSwiftPackageReference "Floaty" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/scenee/FloatingPanel.git"; + repositoryURL = "https://github.com/kciter/Floaty.git"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.0.0; + branch = master; + kind = branch; }; }; - B1B21D12295C9C4B0083D9EE /* XCRemoteSwiftPackageReference "Floaty" */ = { + 027E25262970941F004A84A2 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/kciter/Floaty.git"; + repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git"; requirement = { - branch = master; - kind = branch; + kind = upToNextMajorVersion; + minimumVersion = 10.0.0; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - B10AACFA29673D4100AB8475 /* BottomSheet */ = { - isa = XCSwiftPackageProductDependency; - package = B10AACF929673D4100AB8475 /* XCRemoteSwiftPackageReference "BottomSheet" */; - productName = BottomSheet; - }; - B14D10BD2959D26C0004946F /* Then */ = { + 027E251529709331004A84A2 /* Then */ = { isa = XCSwiftPackageProductDependency; - package = B14D10BC2959D26C0004946F /* XCRemoteSwiftPackageReference "Then" */; + package = 027E251429709331004A84A2 /* XCRemoteSwiftPackageReference "Then" */; productName = Then; }; - B14D10C02959D2BC0004946F /* Moya */ = { + 027E251829709348004A84A2 /* Moya */ = { isa = XCSwiftPackageProductDependency; - package = B14D10BF2959D2BC0004946F /* XCRemoteSwiftPackageReference "Moya" */; + package = 027E251729709348004A84A2 /* XCRemoteSwiftPackageReference "Moya" */; productName = Moya; }; - B14D10C32959D3070004946F /* Kingfisher */ = { + 027E251B29709358004A84A2 /* Kingfisher */ = { isa = XCSwiftPackageProductDependency; - package = B14D10C22959D3070004946F /* XCRemoteSwiftPackageReference "Kingfisher" */; + package = 027E251A29709358004A84A2 /* XCRemoteSwiftPackageReference "Kingfisher" */; productName = Kingfisher; }; - B14D10C62959D3720004946F /* SnapKit */ = { + 027E251E29709376004A84A2 /* SnapKit */ = { isa = XCSwiftPackageProductDependency; - package = B14D10C52959D3710004946F /* XCRemoteSwiftPackageReference "SnapKit" */; + package = 027E251D29709376004A84A2 /* XCRemoteSwiftPackageReference "SnapKit" */; productName = SnapKit; }; - B18C2BC429706DC000A9AA1B /* FirebaseStorage */ = { + 027E2521297093A2004A84A2 /* Toast */ = { isa = XCSwiftPackageProductDependency; - package = B18C2BC329706DC000A9AA1B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; - productName = FirebaseStorage; - }; - B18C2BC629706DC000A9AA1B /* FirebaseStorageCombine-Community */ = { - isa = XCSwiftPackageProductDependency; - package = B18C2BC329706DC000A9AA1B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; - productName = "FirebaseStorageCombine-Community"; - }; - B1B21D0D295C985C0083D9EE /* Toast */ = { - isa = XCSwiftPackageProductDependency; - package = B1B21D0C295C985C0083D9EE /* XCRemoteSwiftPackageReference "Toast-Swift" */; + package = 027E2520297093A2004A84A2 /* XCRemoteSwiftPackageReference "Toast-Swift" */; productName = Toast; }; - B1B21D10295C99280083D9EE /* FloatingPanel */ = { + 027E2524297093E4004A84A2 /* Floaty */ = { isa = XCSwiftPackageProductDependency; - package = B1B21D0F295C99270083D9EE /* XCRemoteSwiftPackageReference "FloatingPanel" */; - productName = FloatingPanel; + package = 027E2523297093E4004A84A2 /* XCRemoteSwiftPackageReference "Floaty" */; + productName = Floaty; }; - B1B21D13295C9C4B0083D9EE /* Floaty */ = { + 027E25272970941F004A84A2 /* FirebaseStorage */ = { isa = XCSwiftPackageProductDependency; - package = B1B21D12295C9C4B0083D9EE /* XCRemoteSwiftPackageReference "Floaty" */; - productName = Floaty; + package = 027E25262970941F004A84A2 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseStorage; }; /* End XCSwiftPackageProductDependency section */ }; diff --git a/Keyneez/Keyneez.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Keyneez/Keyneez.xcworkspace/xcshareddata/swiftpm/Package.resolved index 602ae03..feda384 100644 --- a/Keyneez/Keyneez.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Keyneez/Keyneez.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -27,15 +27,6 @@ "version" : "0.9.1" } }, - { - "identity" : "bottomsheet", - "kind" : "remoteSourceControl", - "location" : "https://github.com/joomcode/BottomSheet.git", - "state" : { - "revision" : "2397f22fa1828169dbb233a9ad9d83ed72b6a236", - "version" : "2.0.1" - } - }, { "identity" : "firebase-ios-sdk", "kind" : "remoteSourceControl", @@ -45,15 +36,6 @@ "version" : "10.3.0" } }, - { - "identity" : "floatingpanel", - "kind" : "remoteSourceControl", - "location" : "https://github.com/scenee/FloatingPanel.git", - "state" : { - "revision" : "4ab7d260301ddf1cab5376ea14e285a128f5ba39", - "version" : "2.5.5" - } - }, { "identity" : "floaty", "kind" : "remoteSourceControl", diff --git a/Keyneez/Keyneez/Application/Info.plist b/Keyneez/Keyneez/Application/Info.plist index c6197f3..0550281 100644 --- a/Keyneez/Keyneez/Application/Info.plist +++ b/Keyneez/Keyneez/Application/Info.plist @@ -2,10 +2,6 @@ - LSSupportsOpeningDocumentsInPlace - - UIFileSharingEnabled - BASE_URL $(BASE_URL) NSAppTransportSecurity @@ -13,10 +9,6 @@ NSAllowsArbitraryLoads - NSPhotoLibraryUsageDescription - 키니즈 ID서비스를 사용하려면 '카메라' 접근권한을 허용해야 해요. - NSCameraUsageDescription - 키니즈 ID서비스를 사용하려면 '카메라' 접근권한을 허용해야 해요. UIAppFonts Pretendard-Bold.otf @@ -40,5 +32,7 @@ + UIFileSharingEnabled + diff --git a/Keyneez/Keyneez/Application/SceneDelegate.swift b/Keyneez/Keyneez/Application/SceneDelegate.swift index c3b891f..5a3610f 100644 --- a/Keyneez/Keyneez/Application/SceneDelegate.swift +++ b/Keyneez/Keyneez/Application/SceneDelegate.swift @@ -18,7 +18,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { let window = UIWindow(windowScene: windowScene) window.overrideUserInterfaceStyle = UIUserInterfaceStyle.light - let rootVC = KeyneezTabbarController() + let rootVC = LandingPageViewController() let navigationController = UINavigationController(rootViewController: rootVC) navigationController.navigationBar.isHidden = true diff --git a/Keyneez/Keyneez/Global/Auth/SignUp/Danal/DanalUserDataViewController.swift b/Keyneez/Keyneez/Global/Auth/SignUp/Danal/DanalUserDataViewController.swift index 66f920c..9d8b7fe 100644 --- a/Keyneez/Keyneez/Global/Auth/SignUp/Danal/DanalUserDataViewController.swift +++ b/Keyneez/Keyneez/Global/Auth/SignUp/Danal/DanalUserDataViewController.swift @@ -6,6 +6,7 @@ // import UIKit +import Toast private struct Constant { static let firstTextFieldTop: CGFloat = 91 @@ -39,7 +40,7 @@ class DanalUserDataViewController: NiblessViewController, NavigationBarProtocol, private lazy var birthTextField: UITextField = KeyneezTextFieldFactory.formStyleTextfield(placeholder: "생년월일(6자)", borderStyle: .underline(padding: 1)).build() - private let nextButton = UIButton().then { + private lazy var nextButton = UIButton().then { $0.keyneezButtonStyle(style: .blackUnact, title: "다음으로") $0.addTarget(self, action: #selector(touchUpNextVC), for: .touchUpInside) } @@ -47,9 +48,44 @@ class DanalUserDataViewController: NiblessViewController, NavigationBarProtocol, var phoneTextCount: Int = 0 var birthTextCount: Int = 0 + private func signUp(with dto: ProductDanalRequestDto, + completion: @escaping((ProductDanalResponseDto) -> Void)) { + + UserAPIProvider.shared.postUserInfo(param: dto) { [weak self] result in + guard self != nil else { return } + switch result { + case .success(let data): + // 같은 유저가 있을 때 + guard let userdata = data else { + // UI change + DispatchQueue.main.async { + self!.view.makeToast("이미 존재하는 휴대폰 입니다.", duration: 0.7, position: .center) + } + return + } + // new one + DispatchQueue.main.async { + completion(userdata) + self?.pushToNextVC(VC: JellyMakeViewController()) + } + + case .failure(let error): + print(error) + } + } + } + @objc private func touchUpNextVC() { - pushToNextVC(VC: JellyMakeViewController()) + if let name = nameTextField.text, + let phone = phoneTextField.text, + let birthday = birthTextField.text { + var danalRequestDTO = ProductDanalRequestDto(userName: name, userBirth: birthday, + userGender: " ", userPhone: phone) + signUp(with: danalRequestDTO) { userdata in + UserSession.shared.accessToken = userdata.accessToken + } + } } private func setKeyboard() { diff --git a/Keyneez/Keyneez/Global/Auth/SignUp/HashTag/HashTagCollectionViewCell.swift b/Keyneez/Keyneez/Global/Auth/SignUp/HashTag/HashTagCollectionViewCell.swift index edf448f..ee1930e 100644 --- a/Keyneez/Keyneez/Global/Auth/SignUp/HashTag/HashTagCollectionViewCell.swift +++ b/Keyneez/Keyneez/Global/Auth/SignUp/HashTag/HashTagCollectionViewCell.swift @@ -86,6 +86,6 @@ extension HashTagCollectionViewCell { } func dataBind(model: HashTagContentModel) { hashTagImageView.image = UIImage(named: model.image) - hashTagLabel.text = model.text + hashTagLabel.text = "#" + model.text } } diff --git a/Keyneez/Keyneez/Global/Auth/SignUp/HashTag/HashTagViewController.swift b/Keyneez/Keyneez/Global/Auth/SignUp/HashTag/HashTagViewController.swift index bb9c59d..87d5547 100644 --- a/Keyneez/Keyneez/Global/Auth/SignUp/HashTag/HashTagViewController.swift +++ b/Keyneez/Keyneez/Global/Auth/SignUp/HashTag/HashTagViewController.swift @@ -30,7 +30,7 @@ final class HashTagViewController: NiblessViewController, NavigationBarProtocol }) // MARK: - UI Components - lazy var selectedIndex = [Int]() + lazy var selectedHashTag = [Int]() private lazy var titleLabel: UILabel = .init().then { $0.text = "관심있는 해시태그에\n체크해주세요" @@ -56,9 +56,42 @@ final class HashTagViewController: NiblessViewController, NavigationBarProtocol $0.addTarget(self, action: #selector(touchUpNextVC), for: .touchUpInside) } + var propensityNumber: Int = 0 + func dataBind(propensity: Int) { + propensityNumber = propensity + } + + private func jellyInfo(token: String, with dto: ProductJellyRequstDto, completion: @escaping(ProductJellyResponseDto) -> Void) { + + UserAPIProvider.shared.patchUserInfo(token: token, param: dto) { [weak self] result in + guard self != nil else { return } + switch result { + case .success(let data): + DispatchQueue.main.async { +// let dataArray: [Any] = [data?.userKey, data?.userName, data?.userAge, data?.userGender, data?.userPhone, data?.userBirth, data?.userSchool, data?.userCharacter, data?.userPassword, data?.userOcr, data?.ocrDir, data?.userBenefit, data?.characters] + let nextVC = JellyProductViewController() + guard let data = data else {return} + nextVC.dataBind(data: data) + self!.pushToNextVC(VC: nextVC) + } + case .failure(let error): + print(error) + } + } + } + @objc private func touchUpNextVC() { - pushToNextVC(VC: JellyProductViewController()) + var selectedHashTagText: [String] = [] + for index in selectedHashTag { + selectedHashTagText.append(hashTagData[index].text) + + } + var jellyInfoRequestDto = ProductJellyRequstDto(disposition: propensityTagUnclickData[propensityNumber].text, interest: selectedHashTagText) + guard let token = UserSession.shared.accessToken else {return} + jellyInfo(token: token, with: jellyInfoRequestDto) { userdata in + + } } private let clickCountLabel: UILabel = .init().then { @@ -163,26 +196,26 @@ extension HashTagViewController: UICollectionViewDataSource { if cell?.indexView.isHidden == true { - if selectedIndex.count < 3 { - selectedIndex.append(indexPath.row) - guard let index = selectedIndex.firstIndex(of: indexPath.row) else { return } + if selectedHashTag.count < 3 { + selectedHashTag.append(indexPath.row) + guard let index = selectedHashTag.firstIndex(of: indexPath.row) else { return } cell?.selectView(index: index) - clickCountLabel.text = String(selectedIndex.count) + clickCountLabel.text = String(selectedHashTag.count) } } else { - guard let index = selectedIndex.firstIndex(of: indexPath.item) else { return } - selectedIndex.remove(at: index) + guard let index = selectedHashTag.firstIndex(of: indexPath.item) else { return } + selectedHashTag.remove(at: index) cell?.unSelectiView() - selectedIndex.forEach { + selectedHashTag.forEach { let cell = collectionView.cellForItem(at: [0, $0]) as? HashTagCollectionViewCell - guard let newIndex = selectedIndex.firstIndex(of: $0) else { + guard let newIndex = selectedHashTag.firstIndex(of: $0) else { return } cell?.changeIndexLabel(index: newIndex) } - clickCountLabel.text = String(selectedIndex.count) + clickCountLabel.text = String(selectedHashTag.count) } - if selectedIndex.count == 3 { + if selectedHashTag.count == 3 { nextButton.keyneezButtonStyle(style: .blackAct, title: "다음으로") allCountLabel.textColor = .mint500 clickCountLabel.textColor = .mint500 diff --git a/Keyneez/Keyneez/Global/Auth/SignUp/Jelly/JellyProduct/JellyProductViewController.swift b/Keyneez/Keyneez/Global/Auth/SignUp/Jelly/JellyProduct/JellyProductViewController.swift index ffb5d60..db17ac2 100644 --- a/Keyneez/Keyneez/Global/Auth/SignUp/Jelly/JellyProduct/JellyProductViewController.swift +++ b/Keyneez/Keyneez/Global/Auth/SignUp/Jelly/JellyProduct/JellyProductViewController.swift @@ -81,9 +81,17 @@ class JellyProductViewController: NiblessViewController { $0.addTarget(self, action: #selector(touchUpNextVC), for: .touchUpInside) } + var userData: ProductJellyResponseDto? + func dataBind(data: ProductJellyResponseDto) { + userData = data + } + @objc private func touchUpNextVC() { - pushToNextVC(VC: SimplePwdViewController()) + let nextVC = SimplePwdViewController() + guard let userData = userData else {return} + nextVC.dataBind(data: userData) + pushToNextVC(VC: nextVC) } override func viewDidLoad() { diff --git a/Keyneez/Keyneez/Global/Auth/SignUp/Model/SignUpContentModel.swift b/Keyneez/Keyneez/Global/Auth/SignUp/Model/SignUpContentModel.swift index 98db40b..dde6225 100644 --- a/Keyneez/Keyneez/Global/Auth/SignUp/Model/SignUpContentModel.swift +++ b/Keyneez/Keyneez/Global/Auth/SignUp/Model/SignUpContentModel.swift @@ -30,18 +30,18 @@ struct HashTagContentModel { } var hashTagData: [HashTagContentModel] = [ - HashTagContentModel(image: "amusementPark", text: "#놀이공원"), - HashTagContentModel(image: "active", text: "#대외활동"), - HashTagContentModel(image: "traffic", text: "#대중교통"), - HashTagContentModel(image: "movie", text: "#영화관"), - HashTagContentModel(image: "add", text: "#혜택"), - HashTagContentModel(image: "travel", text: "#여행"), - HashTagContentModel(image: "scholaship", text: "#장학"), - HashTagContentModel(image: "art", text: "#미술관"), - HashTagContentModel(image: "checkCard", text: "#체크카드"), - HashTagContentModel(image: "volunteer", text: "#봉사"), - HashTagContentModel(image: "museum", text: "#박물관"), - HashTagContentModel(image: "career", text: "#진로") + HashTagContentModel(image: "amusementPark", text: "놀이공원"), + HashTagContentModel(image: "active", text: "대외활동"), + HashTagContentModel(image: "traffic", text: "대중교통"), + HashTagContentModel(image: "movie", text: "영화관"), + HashTagContentModel(image: "add", text: "혜택"), + HashTagContentModel(image: "travel", text: "여행"), + HashTagContentModel(image: "scholaship", text: "장학"), + HashTagContentModel(image: "art", text: "미술관"), + HashTagContentModel(image: "checkCard", text: "체크카드"), + HashTagContentModel(image: "volunteer", text: "봉사"), + HashTagContentModel(image: "museum", text: "박물관"), + HashTagContentModel(image: "career", text: "진로") ] struct JellyContentModel { @@ -65,6 +65,7 @@ var jellyIconData: [JellyContentModel] = [ struct SimplePwdContentModel { let text: String } + var pwdNumberData: [SimplePwdContentModel] = [ SimplePwdContentModel(text: "8"), SimplePwdContentModel(text: "9"), diff --git a/Keyneez/Keyneez/Global/Auth/SignUp/PropensityTag/PropensityTagViewController.swift b/Keyneez/Keyneez/Global/Auth/SignUp/PropensityTag/PropensityTagViewController.swift index ac2cefc..b5ff715 100644 --- a/Keyneez/Keyneez/Global/Auth/SignUp/PropensityTag/PropensityTagViewController.swift +++ b/Keyneez/Keyneez/Global/Auth/SignUp/PropensityTag/PropensityTagViewController.swift @@ -43,7 +43,6 @@ final class PropensityTagViewController: NiblessViewController, NavigationBarPro } private let curiousButton = UIButton().then { $0.tag = 1 - $0.isSelected = false $0.propensityTagButtonStyle(style: .propensityTagUnact, title: propensityTagUnclickData[$0.tag].text) $0.isUserInteractionEnabled = true $0.addTarget(self, action: #selector(selectOptionBtnAction), for: .touchUpInside) @@ -63,7 +62,13 @@ final class PropensityTagViewController: NiblessViewController, NavigationBarPro @objc private func touchUpNextVC() { - pushToNextVC(VC: HashTagViewController()) + let hashTagVC = HashTagViewController() + for button in btnArray { + if button.isSelected == true { + hashTagVC.dataBind(propensity: button.tag) + pushToNextVC(VC: hashTagVC) + } + } } private var btnArray = [UIButton]() @@ -98,14 +103,7 @@ final class PropensityTagViewController: NiblessViewController, NavigationBarPro let width = ((button.titleLabel?.frame.width)!) + Constant.btnMargin * 2 return width } -<<<<<<< HEAD -// override func viewDidLayoutSubviews() { -// <#code#> -// } -======= - ->>>>>>> upstream/develop } extension PropensityTagViewController { diff --git a/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdCheckViewController.swift b/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdCheckViewController.swift index b735427..cb6d71f 100644 --- a/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdCheckViewController.swift +++ b/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdCheckViewController.swift @@ -47,27 +47,6 @@ class SimplePwdCheckViewController: NiblessViewController, NavigationBarProtocol $0.image = UIImage(named: Constant.imageArray[0]) $0.contentMode = .scaleAspectFit } - private let faceIDStackVIew: UIStackView = .init().then { - $0.axis = .horizontal - $0.isUserInteractionEnabled = true - $0.distribution = .equalSpacing - $0.spacing = 8 - } - - @objc - func touchUpStackView() { - let tap = UITapGestureRecognizer(target: self, action: #selector(stackViewTapped)) - faceIDStackVIew.addGestureRecognizer(tap) - } - - @objc - private func stackViewTapped() { - if checkImageView.image == UIImage(named: "unselect") { - checkImageView.image = UIImage(named: "select") - } else { - checkImageView.image = UIImage(named: "unselect") - } - } private let checkImageView: UIImageView = .init().then { $0.image = UIImage(named: "unselect") @@ -97,19 +76,41 @@ class SimplePwdCheckViewController: NiblessViewController, NavigationBarProtocol setConfig() register() setLayout() - touchUpStackView() + } + + var password: String = "" + var userData: ProductJellyResponseDto? + func dataBind(pwd: String, userData: ProductJellyResponseDto) { + password = pwd + self.userData = userData + } + + private var selectedNumber:[Int] = [] + + private func passwordInfo(token: String, with dto: ProductPwdRequestDto, completion: @escaping(ProductPwdResponseDto) -> Void) { + UserAPIProvider.shared.patchPwdInfo(token: token, param: dto) { [weak self] result in + guard let self else {return} + switch result { + case .success(let data): + guard let userData = self.userData else {return} + UserSession.shared.profile = Profile(name: userData.userName, birthday: userData.userBirth, userCharacter: userData.characters?.character, userPhoneNumber: userData.userPhone) + DispatchQueue.main.async { + self.view.window?.rootViewController = KeyneezTabbarController() + } + case .failure(let error): + print(error) + } + } } } extension SimplePwdCheckViewController { private func setConfig() { view.backgroundColor = .gray050 - [titleLabel, progressImageView, faceIDStackVIew, collectionView].forEach { + [titleLabel, progressImageView, collectionView].forEach { contentView.addSubview($0) } - [checkImageView, checkLabel].forEach { - faceIDStackVIew.addArrangedSubview($0) - } + } private func setLayout() { titleLabel.snp.makeConstraints { @@ -121,14 +122,8 @@ extension SimplePwdCheckViewController { $0.leading.trailing.equalToSuperview().inset(Constant.imageLeading) $0.height.equalTo(Constant.imageHeight) } - faceIDStackVIew.snp.makeConstraints { - $0.top.equalTo(progressImageView.snp.bottom).offset(Constant.stackViewTop) - $0.centerX.equalToSuperview() - $0.width.equalTo(Constant.stackViewWidth) - $0.height.equalTo(Constant.stackViewHeight) - } collectionView.snp.makeConstraints { - $0.top.equalTo(faceIDStackVIew.snp.bottom).offset(100) + $0.top.equalTo(progressImageView.snp.bottom).offset(100) $0.leading.trailing.equalTo(self.view.safeAreaLayoutGuide).inset(16) $0.height.equalTo(calculateCellHeight()) $0.bottom.equalToSuperview().inset(48) @@ -169,6 +164,7 @@ extension SimplePwdCheckViewController: UICollectionViewDataSource { guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: SimplePwdCollectionViewCell.identifier, for: indexPath) as? SimplePwdCollectionViewCell else {return UICollectionViewCell() } cell.dataBind(model: pwdNumberData[indexPath.item]) + if indexPath.item == 9 { cell.number.font = .font(.pretendardBold, ofSize: 16) cell.number.textColor = .gray500 @@ -181,7 +177,8 @@ extension SimplePwdCheckViewController: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { // 간편 비밀번호 로직 - if indexPath.item != 11 { + if indexPath.item != 11 && indexPath.item != 9 { + selectedNumber.append(Int(pwdNumberData[indexPath.row].text)!) Constant.index += 1 switch Constant.index { case 1: @@ -197,34 +194,34 @@ extension SimplePwdCheckViewController: UICollectionViewDataSource { case 6: progressImageView.image = UIImage(named: Constant.imageArray[6]) Constant.index = 6 - collectionView.deselectItem(at: indexPath, animated: true) - if checkImageView.image == UIImage(named: "select") { - setAuthAlert() - } else { - pushToNextVC(VC: KeyneezTabbarController()) - } + + var pwdInfoRequsetDto = ProductPwdRequestDto(userPassword: password) + guard let token = UserSession.shared.accessToken else {return} + passwordInfo(token: token, with: pwdInfoRequsetDto) { _ in } default: return - } + } else { + if Constant.index > 0 && Constant.index < 7 { Constant.index -= 1 progressImageView.image = UIImage(named: Constant.imageArray[Constant.index]) + + switch indexPath.item { + case 11: + selectedNumber.removeLast() + case 9: + // TODO: - 재배열 코드 넣어주기 + return + default: + return + } + } else if Constant.index < 0 {Constant.index = 0} else if Constant.index > 6 {Constant.index = 6} } + + print(selectedNumber) } } - -private func setAuthAlert() { - let message = "'Keyneez'앱이 Face ID 접근 허용되어 있지않습니다." - let alert = UIAlertController(title: "'Keyneez'앱이 Face ID를\n 사용하도록 허용하겠습니까?", message: message, preferredStyle: .alert) - alert.addAction(UIAlertAction(title: "허용 안 함", style: .cancel, handler: nil)) - alert.addAction(UIAlertAction(title: "승인", style: .default, handler: {(_ action: UIAlertAction) -> Void in - SimplePwdCheckViewController().pushToNextVC(VC: KeyneezTabbarController()) - })) -} - - - diff --git a/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdViewController.swift b/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdViewController.swift index 50f8685..3b7df70 100644 --- a/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdViewController.swift +++ b/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdViewController.swift @@ -26,6 +26,7 @@ private struct Constant { } class SimplePwdViewController: NiblessViewController, NavigationBarProtocol { + private var selectedNumber: [Int] = [] lazy var navigationView: UIView = NavigationViewBuilder(barViews: [.iconButton(with: backButton), .flexibleBox]).build() private lazy var backButton: UIButton = .init(primaryAction: touchUpBackButton).then { @@ -47,27 +48,6 @@ class SimplePwdViewController: NiblessViewController, NavigationBarProtocol { $0.image = UIImage(named: Constant.imageArray[0]) $0.contentMode = .scaleAspectFit } - private let faceIDStackVIew: UIStackView = .init().then { - $0.axis = .horizontal - $0.isUserInteractionEnabled = true - $0.distribution = .equalSpacing - $0.spacing = 8 - } - - @objc - func touchUpStackView() { - let tap = UITapGestureRecognizer(target: self, action: #selector(stackViewTapped)) - faceIDStackVIew.addGestureRecognizer(tap) - } - - @objc - private func stackViewTapped() { - if checkImageView.image == UIImage(named: "unselect") { - checkImageView.image = UIImage(named: "select") - } else { - checkImageView.image = UIImage(named: "unselect") - } - } private let checkImageView: UIImageView = .init().then { $0.image = UIImage(named: "unselect") @@ -91,6 +71,11 @@ class SimplePwdViewController: NiblessViewController, NavigationBarProtocol { return collectionView }() + var userData: ProductJellyResponseDto? + func dataBind(data: ProductJellyResponseDto) { + userData = data + } + override func viewDidLoad() { super.viewDidLoad() addNavigationViewToSubview() @@ -98,7 +83,6 @@ class SimplePwdViewController: NiblessViewController, NavigationBarProtocol { setConfig() register() setLayout() - touchUpStackView() } } @@ -110,12 +94,9 @@ extension SimplePwdViewController { private func setConfig() { view.backgroundColor = .gray050 - [titleLabel, progressImageView, faceIDStackVIew, collectionView].forEach { + [titleLabel, progressImageView, collectionView].forEach { contentView.addSubview($0) } - [checkImageView, checkLabel].forEach { - faceIDStackVIew.addArrangedSubview($0) - } } private func setLayout() { titleLabel.snp.makeConstraints { @@ -127,14 +108,9 @@ extension SimplePwdViewController { $0.leading.trailing.equalToSuperview().inset(Constant.imageLeading) $0.height.equalTo(Constant.imageHeight) } - faceIDStackVIew.snp.makeConstraints { - $0.top.equalTo(progressImageView.snp.bottom).offset(Constant.stackViewTop) - $0.centerX.equalToSuperview() - $0.width.equalTo(Constant.stackViewWidth) - $0.height.equalTo(Constant.stackViewHeight) - } + collectionView.snp.makeConstraints { - $0.top.equalTo(faceIDStackVIew.snp.bottom).offset(100) + $0.top.equalTo(progressImageView.snp.bottom).offset(100) $0.leading.trailing.equalTo(self.view.safeAreaLayoutGuide).inset(16) $0.height.equalTo(calculateCellHeight()) $0.bottom.equalToSuperview().inset(48) @@ -188,8 +164,8 @@ extension SimplePwdViewController: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { // 간편 비밀번호 로직 - if indexPath.item != 11 && indexPath.item != 9 { + selectedNumber.append(Int(pwdNumberData[indexPath.row].text)!) Constant.index += 1 switch Constant.index { case 1: @@ -204,18 +180,36 @@ extension SimplePwdViewController: UICollectionViewDataSource { progressImageView.image = UIImage(named: Constant.imageArray[5]) case 6: progressImageView.image = UIImage(named: Constant.imageArray[6]) - pushToNextVC(VC: SimplePwdCheckViewController()) - collectionView.deselectItem(at: indexPath, animated: true) + guard let userData = userData else {return} + let password = selectedNumber.map { String($0) } + let nextVC = SimplePwdCheckViewController() + nextVC.dataBind(pwd: password.joined(), userData: userData) + pushToNextVC(VC: nextVC) default: return } + } else { + if Constant.index > 0 && Constant.index < 7 { Constant.index -= 1 progressImageView.image = UIImage(named: Constant.imageArray[Constant.index]) - } else if Constant.index < 0 {Constant.index = 0 } + + switch indexPath.item { + case 11: + selectedNumber.removeLast() + case 9: + // TODO: - 재배열 코드 넣어주기 + return + default: + return + } + + } else if Constant.index < 0 {Constant.index = 0} else if Constant.index > 6 {Constant.index = 6} } + + print(selectedNumber) } } diff --git a/Keyneez/Keyneez/Global/Auth/UserSession.swift b/Keyneez/Keyneez/Global/Auth/UserSession.swift index 0d65b4f..fd2489a 100644 --- a/Keyneez/Keyneez/Global/Auth/UserSession.swift +++ b/Keyneez/Keyneez/Global/Auth/UserSession.swift @@ -11,7 +11,7 @@ struct Profile { var name: String var birthday: String var userOCRLink: String? - var userCharacter: String + var userCharacter: String? var userPhoneNumber: String } diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/LoginRequestDto.swift b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignIn/RequestDto/LoginRequestDto.swift similarity index 100% rename from Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/LoginRequestDto.swift rename to Keyneez/Keyneez/Global/NetworkLayer/DTO/SignIn/RequestDto/LoginRequestDto.swift diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/LoginResponseDto.swift b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignIn/ResponseDto/LoginResponseDto.swift similarity index 100% rename from Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/LoginResponseDto.swift rename to Keyneez/Keyneez/Global/NetworkLayer/DTO/SignIn/ResponseDto/LoginResponseDto.swift diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/PasswordFetchRequestDto.swift b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/RequestDto/PasswordFetchRequestDto.swift similarity index 100% rename from Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/PasswordFetchRequestDto.swift rename to Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/RequestDto/PasswordFetchRequestDto.swift diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/ProductDanalRequestDto.swift b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/RequestDto/ProductDanalRequestDto.swift similarity index 100% rename from Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/ProductDanalRequestDto.swift rename to Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/RequestDto/ProductDanalRequestDto.swift diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/ProductJellyRequestDto.swift b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/RequestDto/ProductJellyRequestDto.swift similarity index 80% rename from Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/ProductJellyRequestDto.swift rename to Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/RequestDto/ProductJellyRequestDto.swift index c93bcd5..2afce54 100644 --- a/Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/ProductJellyRequestDto.swift +++ b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/RequestDto/ProductJellyRequestDto.swift @@ -10,6 +10,6 @@ import Foundation //MARK: - 유저 생성(성향, 관심사) RequestDto struct ProductJellyRequstDto: Codable { - let dispositon: String - let interst: [String] + let disposition: String + let interest: [String] } diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/ProductPwdRequestDto.swift.swift b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/RequestDto/ProductPwdRequestDto.swift.swift similarity index 100% rename from Keyneez/Keyneez/Global/NetworkLayer/UserRequestDto/ProductPwdRequestDto.swift.swift rename to Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/RequestDto/ProductPwdRequestDto.swift.swift diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/PasswordFetchResponseDto.swift b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/PasswordFetchResponseDto.swift similarity index 100% rename from Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/PasswordFetchResponseDto.swift rename to Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/PasswordFetchResponseDto.swift diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/ProductDanalResponseDto.swift b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/ProductDanalResponseDto.swift similarity index 65% rename from Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/ProductDanalResponseDto.swift rename to Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/ProductDanalResponseDto.swift index fa45d20..084d3c2 100644 --- a/Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/ProductDanalResponseDto.swift +++ b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/ProductDanalResponseDto.swift @@ -8,12 +8,6 @@ import Foundation struct ProductDanalResponseDto: Codable { - let status: String - let message: String - let productDanalData: ProductDanalData? -} - -struct ProductDanalData: Codable { let userName: String let userPhone: String let accessToken: String diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/ProductJellyResponseDto.swift b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/ProductJellyResponseDto.swift similarity index 81% rename from Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/ProductJellyResponseDto.swift rename to Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/ProductJellyResponseDto.swift index 39e0b4e..d752342 100644 --- a/Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/ProductJellyResponseDto.swift +++ b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/ProductJellyResponseDto.swift @@ -10,12 +10,6 @@ import Foundation // MARK: - 유저 생성 (성향, 관심사) ResponseDto struct ProductJellyResponseDto: Codable { - let status: Int - let message: String - let data: ProductJellyData? -} - -struct ProductJellyData: Codable { let userKey: Int let userName: String let userAge: Int? @@ -25,7 +19,7 @@ struct ProductJellyData: Codable { let userSchool: String? let userCharacter: Int let userPassword: String? - let userOcr: String + let userOcr: String? let ocrDir: Bool let userBenefit: Bool let characters: Characters? diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/ProductPwdResponseDto.swift b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/ProductPwdResponseDto.swift similarity index 71% rename from Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/ProductPwdResponseDto.swift rename to Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/ProductPwdResponseDto.swift index 6bd6aad..d48224a 100644 --- a/Keyneez/Keyneez/Global/NetworkLayer/UserResponseDto/ProductPwdResponseDto.swift +++ b/Keyneez/Keyneez/Global/NetworkLayer/DTO/SignUp/ResponseDto/ProductPwdResponseDto.swift @@ -10,12 +10,6 @@ import Foundation // MARK: - 유저 생성(비밀번호) ResponseDto struct ProductPwdResponseDto: Codable { - let status: Int - let message: String - let productPwdData: ProductPwdData? -} - -struct ProductPwdData: Codable { let userName: String let userPhone: String let userPassword: String diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserAPI.swift b/Keyneez/Keyneez/Global/NetworkLayer/UserAPI.swift index 971f612..26bb595 100644 --- a/Keyneez/Keyneez/Global/NetworkLayer/UserAPI.swift +++ b/Keyneez/Keyneez/Global/NetworkLayer/UserAPI.swift @@ -13,7 +13,11 @@ enum UserAPIError: LocalizedError { } enum UserAPI { - case postUserInfo(param: UserCheckResponseDto) + case postUserInfo(param: ProductDanalRequestDto) + case patchUserPickInfo(token: String, param: ProductJellyRequstDto) + case patchUserPwdInfo(token: String, param: ProductPwdRequestDto) + case postPwdFetch(token: String, param: PasswordFetchRequestDto) +// case postUserLoginInfo(token: String, param: LoginRequestDto) } extension UserAPI: TargetType { @@ -24,8 +28,10 @@ extension UserAPI: TargetType { var path: String { switch self { - case .postUserInfo: + case .postUserInfo, .patchUserPickInfo: return "/user/signup" + case .patchUserPwdInfo, .postPwdFetch: + return "/user/signup/pw" default: return "" } @@ -35,6 +41,12 @@ extension UserAPI: TargetType { switch self { case .postUserInfo: return .post + case .patchUserPickInfo: + return .patch + case .patchUserPwdInfo: + return .patch + case .postPwdFetch: + return .post } } @@ -42,13 +54,21 @@ extension UserAPI: TargetType { switch self { case .postUserInfo(let param): return .requestParameters(parameters: try! param.asParameter(), encoding: JSONEncoding.default) + case .patchUserPickInfo(_, let param): + return .requestParameters(parameters: try! param.asParameter(), encoding: JSONEncoding.default) + case .patchUserPwdInfo(_, let param): + return .requestParameters(parameters: try! param.asParameter(), encoding: JSONEncoding.default) + case .postPwdFetch(_, param: let param): + return .requestParameters(parameters: try! param.asParameter(), encoding: JSONEncoding.default) } } - var headers: [String : String]? { + var headers: [String: String]? { switch self { case .postUserInfo: return ["Content-Type": "application/json"] + case .patchUserPickInfo(let token, _), .patchUserPwdInfo(let token, _), .postPwdFetch(let token, _): + return ["Content-Type": "application/json", "Authorization": token] default: return nil } diff --git a/Keyneez/Keyneez/Global/NetworkLayer/UserAPIProvider.swift b/Keyneez/Keyneez/Global/NetworkLayer/UserAPIProvider.swift index 73dcd89..cc5cb4b 100644 --- a/Keyneez/Keyneez/Global/NetworkLayer/UserAPIProvider.swift +++ b/Keyneez/Keyneez/Global/NetworkLayer/UserAPIProvider.swift @@ -25,9 +25,19 @@ final class UserAPIProvider { private init() { } - func postUserInfo(param: UserCheckResponseDto, completion: @escaping (Result) -> Void) { + func postUserInfo(param: ProductDanalRequestDto, completion: @escaping (Result) -> Void) { let target = UserAPI.postUserInfo(param: param) - responseFrom(target, modelType: UserInfo.self, completion: completion) + responseFrom(target, modelType: ProductDanalResponseDto.self, completion: completion) + } + + func patchUserInfo(token: String, param: ProductJellyRequstDto, completion: @escaping (Result) -> Void) { + let target = UserAPI.patchUserPickInfo(token: token, param: param) + responseFrom(target, modelType: ProductJellyResponseDto.self, completion: completion) + } + + func patchPwdInfo(token: String, param: ProductPwdRequestDto, completion: @escaping (Result) -> Void) { + let target = UserAPI.patchUserPwdInfo(token: token, param: param) + responseFrom(target, modelType: ProductPwdResponseDto.self, completion: completion) } } @@ -47,7 +57,9 @@ extension UserAPIProvider { ) { switch result { case .success(let response): - if let data = try? JSONDecoder().decode(GenericResponse.self, from: response.data) { + let decoder = JSONDecoder() + decoder.keyDecodingStrategy = .convertFromSnakeCase + if let data = try? decoder.decode(GenericResponse.self, from: response.data) { let body = data.data completion(.success(body as? T)) } else { diff --git a/README.md b/README.md index 0ec0a73..38903d8 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,18 @@ # Keyneez-iOS +## 💙 키니즈(Keyneez) 소개 +청소년의 일상을 다채롭고 풍부하게, +**청소년 통합 인증 서비스**와 **다양한 활동&혜택 정보를 제공**하는 서비스입니다. -**도원결의.(정도현의 도. 최효원의 원. 박의서의 의.)** - -
- -## 🍀 서비스 이름과 소개 - -| 서비스명 | 서비스 소개 -| -------- | :-----: | -| 키니즈(Keyneez) | 청소년증 인증을 통해 청소년만이 누릴 수 있는 혜택과 문화생활을 제공하는 서비스 | +![A2 판넬 1@2x](https://user-images.githubusercontent.com/70744494/212153469-efeab9d1-927c-4937-8778-e27bf262510b.png)

## 👩‍💻🧑‍💻 참여 구성원 -| 담당자 | 구현 기능 | -| :-----: | -------------- | -| `박의서` | TabBar, 인포 기능 | -| `최효원` | Design System, 로그인, 회원가입 기능 | -| `정도현` | BaseVC, ID, OCR | +| 담당자 | `박의서` | `최효원` | `정도현` | +| :-----: | -------------- | -------------- | -------------- | +| 구현 기능 | 탭바, 홈, 저장, 검색 | 디자인 시스템, 로그인, 회원가입 | BaseVC, ID, OCR |

From abd896d05e96a0853863e1721a8922b8ce6b83a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=9D=98=EC=84=9C?= <70744494+kpk0616@users.noreply.github.com> Date: Fri, 13 Jan 2023 23:21:13 +0900 Subject: [PATCH 2/3] [Docs] Update README.md --- README.md | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 38903d8..5fca274 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,105 @@
## 👩‍💻🧑‍💻 참여 구성원 + +
+ -| 담당자 | `박의서` | `최효원` | `정도현` | +| 담당자 |

`박의서` |

`최효원` |

`정도현` | | :-----: | -------------- | -------------- | -------------- | -| 구현 기능 | 탭바, 홈, 저장, 검색 | 디자인 시스템, 로그인, 회원가입 | BaseVC, ID, OCR | +| github | [@kpk0616](https://github.com/kpk0616) | [@wonniiii](https://github.com/wonniiii) | [@pastapeter](https://github.com/pastapeter) |

+## ✨ 담당 뷰 및 기능 +
+의서 +
+ +- 공통 커스텀 탭바 : UITabBar 이용, BazierPath 로 커스텀 +- Home : Segmented Control 과 CollectionView 이용 +- 상세 인포 : 스크롤 뷰 +- 저장 뷰 : 콜렉션 뷰 +- 검색 뷰 : PerformBatchUpdate, CollectionView 이용 +- 각 뷰 이미지 : 킹피셔 이용해 이미지 캐싱 + +
+
+ +
+효원 +
+ +- 랜딩페이지 + +⇒ PageControl로 Indicator를 만들었고 Scroll View를 이용해서 이미지만 슬라이드 되도록 구현하였습니다. 회원가입과 로그인 스타일은 프로젝트에서 많이 쓰이는 스타일이라서 따로 extension을 만들어서 재사용해주었습니다. + +- 회원가입(다날 휴대폰 인증 뷰 + 성향 태그 뷰 + 정보 확인 및 관심사 태그 뷰) + + ⇒ 앱잼 단위에서는 다날 API를 이용하지 않고 더미데이터로 돌아가게 하였고, 성향 태그는 UIImage로 넣어서 클릭되면 이미지가 변경되게 구현했습니다. 정보 확인 및 관심사 태그는 CollectionView를 이용하여 제작해주었고, 세미나 카카오 심화 과제처럼 Index 알고리즘을 따로 만들어서 클릭한 순서에 따라 Index가 변경되게 하였습니다. + +- 젤리 생성 뷰 + + ⇒ 유저가 선택한 성향과 관심사를 바탕으로 젤리가 생성이 되고, 서버에서 받아온 정보를 바탕으로 캐릭터 타입과, 젤리 이미지, 아이템을 변경되게 해주었습니다. 나의 아이템 부분은 CollectionView로 구현하였고, 캐릭터 타입을 클릭하면 커스텀한 View인 BottomSheet이 나오도록 구현했습니다.\ + +- 간편 비밀번호 설정 뷰 + + ⇒ 마지막 단계 토스트 메시지는 Toast-Swift 라이브러리를 사용하였고, 밑에 번호판은 CollectionView로 만들었습니다. Cell이 클릭될 때마다 진행 이미지가 바뀌도록 짜주었고, 첫번째로 입력한 비밀번호를 dataBind하여 다음화면에서 입력한 비밀번호와 같을 때 홈 뷰로 넘어가도록 만들어주었습니다. + +
+
+ +
+도현 +
+ +OCR 카메라 기능을 구현하였습니다. AVFoundation을 사용해서 카메라, preview view를 커스텀하였습니다. + +BottomSheetViewController를 구현하였으며, PresentationStyle을 커스텀하여서 만들어습니다. + +IDViewController를 구현하면서, User에 맞게 변화하는 플로우를 사용하기 위해서, View와 VC를 나눠서 구현하였습니다. + +
+
+ +

+ +## 🔥 어려웠던 부분 및 극복 과정 + +
+의서 +
+ +서버에서 다른 통신은 다 되는데 전체조회 통신이 안 되는 문제가 발생했다. 포스트맨을 이용해 토큰값을 넣고 헤더에 Content-Type 까지 잘 넣어서 리퀘스트를 보냈음에도 전체조회에서 계속해서 타임아웃 에러가 발생했다. +서버측과 포스트맨을 똑같이 대조해서 보내봐도 안 되고, 차이점을 찾지 못했다. 근데 서버측 컴퓨터에서는 동작하고, 클라측 컴퓨터에서는 동작하지 않았다. 코드에서도 서버와 통신은 잘 되는데 전체조회 부분에서만 타임 아웃 에러가 계속해서 발생했다. +알고보니 서버 측에서 회원가입이 이루어진 후 성향 체크 로직을 거쳐야지만 전체 조회가 이루어지도록 처리를 해 주었기 때문에 에러가 발생하는 것이었다. 포스트맨을 이용해 발급받은 토큰을 이용해 성향 체크 API 에 리퀘스트를 날린 후, 해당 토큰을 적용시키니 문제가 해결되었다. + +
+
+ +
+효원 +
+ +랜딩페이지를 그냥 ViewController를 4개 만들어서 PageViewController로 ViewController자체를 바뀌게 만들려고 했는데 뭔가 비효율적인 것 같아서 조금 더 효율적으로 만들 수 있는 방법을 찾는데 어려움이 있었습니다. 그래서 많은 블로그를 찾아봐서 PageControl과 ScollView를 이용하여 ViewController를 1개만 만들어서 그 안에서 다 처리해주었습니다. + +
+
+ +
+효원 +
+ +iOS기기 Camera I/O가 될떄, Camera buffer 에 존재하는 프레임을 기반으로 자동OCR 기능 구현, 프레임 기반으로 들어오는 camerabuffer의 값을 원하는 사진 크기로 자르는 것, 수동OCR 기능 구현이 어려웠습니다. 카메라 버퍼에서 들어오는 프레임의 크기와 현재 휴대폰화면의 크기를 비교하고, 비례대로 잘랐습니다. 자른 것은 OCR을 활용해서 필요한 정보를 추출합니다. + +또한 카메라는 백그라운드 스레드에서 동작하는데, 해당 카메라 i/o동작과 사진 프로세싱하는 것을 스레드를 나눠야합니다. 따라서 사진 프로세싱하는 동작과 카메라 I/O를 나누면서 프로세싱할때, 카메라 I/O을 block했습니다. 사진 프로세싱하는 버퍼가 다 차면 카메라 블럭시키는 과정을 DispatchSemaphore을 사용해서 블럭시켰습니다. + +
+
+ +

+ ## 📖 라이브러리 라이브러리 | 사용 목적 | Version | From a8a34d5d47e44e173be8c1d89ad40d6cd5150b01 Mon Sep 17 00:00:00 2001 From: DOHYUN CHUNG <69891604+pastapeter@users.noreply.github.com> Date: Sat, 14 Jan 2023 06:40:03 +0900 Subject: [PATCH 3/3] Feature/#55 (#59) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Feat] OCR Regex제외하고 구현 완료 & 수동모드일때 Video Frame 날리기 * [Add] proj file * [Feat] 자동 OCR * [Chore] Pod으로 변경 --- Keyneez/Keyneez.xcodeproj/project.pbxproj | 128 +---------- .../xcschemes/xcschememanagement.plist | 2 +- .../Keyneez/Application/SceneDelegate.swift | 11 +- .../SignIn/SimpleLoginViewController.swift | 2 +- .../SimplePwdCheckViewController.swift | 2 +- .../SimplePwd/SimplePwdViewController.swift | 2 +- .../LandingPageViewController.swift | 2 +- Keyneez/Keyneez/OCR/Camera/Camera.swift | 14 +- .../OCR/Camera/CameraViewActions.swift | 13 +- .../OCR/Camera/CameraViewController.swift | 44 ++-- Keyneez/Keyneez/OCR/Camera/OCR.swift | 47 ---- Keyneez/Keyneez/OCR/Camera/OCRService.swift | 201 ++++++++++++++++++ .../OCR/Camera/PhotoCaptureDelegate.swift | 92 +------- .../OCR/IDInfoEdit/IDInfoEditableView.swift | 59 ++--- .../IDInfoEditableViewController.swift | 33 ++- Keyneez/Podfile | 11 +- Keyneez/Podfile.lock | 75 ++++++- 17 files changed, 406 insertions(+), 332 deletions(-) delete mode 100644 Keyneez/Keyneez/OCR/Camera/OCR.swift create mode 100644 Keyneez/Keyneez/OCR/Camera/OCRService.swift diff --git a/Keyneez/Keyneez.xcodeproj/project.pbxproj b/Keyneez/Keyneez.xcodeproj/project.pbxproj index c304cd6..8bb2a98 100644 --- a/Keyneez/Keyneez.xcodeproj/project.pbxproj +++ b/Keyneez/Keyneez.xcodeproj/project.pbxproj @@ -105,7 +105,7 @@ B18B60D6296552DA00AF14F5 /* NavigationViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18B60CD296552DA00AF14F5 /* NavigationViewItem.swift */; }; B18B60D7296552DA00AF14F5 /* NavigationViewBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18B60CE296552DA00AF14F5 /* NavigationViewBuilder.swift */; }; B18C2BBA296F267C00A9AA1B /* UIUtilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18C2BB9296F267C00A9AA1B /* UIUtilities.swift */; }; - B18C2BBC296FF0B600A9AA1B /* OCR.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18C2BBB296FF0B600A9AA1B /* OCR.swift */; }; + B18C2BBC296FF0B600A9AA1B /* OCRService.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18C2BBB296FF0B600A9AA1B /* OCRService.swift */; }; B1A80358296D95C10007DDD9 /* PhysicalIDViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A80357296D95C10007DDD9 /* PhysicalIDViewController.swift */; }; B1A8035B296D98E70007DDD9 /* PhysicalIDActionables.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A8035A296D98E70007DDD9 /* PhysicalIDActionables.swift */; }; B1A8035D296D99180007DDD9 /* PhysicalIDActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A8035C296D99180007DDD9 /* PhysicalIDActions.swift */; }; @@ -272,7 +272,7 @@ B18B60CD296552DA00AF14F5 /* NavigationViewItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationViewItem.swift; sourceTree = ""; }; B18B60CE296552DA00AF14F5 /* NavigationViewBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationViewBuilder.swift; sourceTree = ""; }; B18C2BB9296F267C00A9AA1B /* UIUtilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIUtilities.swift; sourceTree = ""; }; - B18C2BBB296FF0B600A9AA1B /* OCR.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OCR.swift; sourceTree = ""; }; + B18C2BBB296FF0B600A9AA1B /* OCRService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OCRService.swift; sourceTree = ""; }; B1A80357296D95C10007DDD9 /* PhysicalIDViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhysicalIDViewController.swift; sourceTree = ""; }; B1A8035A296D98E70007DDD9 /* PhysicalIDActionables.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhysicalIDActionables.swift; sourceTree = ""; }; B1A8035C296D99180007DDD9 /* PhysicalIDActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhysicalIDActions.swift; sourceTree = ""; }; @@ -329,14 +329,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 027E2522297093A2004A84A2 /* Toast in Frameworks */, - 027E251C29709358004A84A2 /* Kingfisher in Frameworks */, - C5F04103F38C3EA6BF1A98B9 /* Pods_Keyneez.framework in Frameworks */, - 027E2525297093E4004A84A2 /* Floaty in Frameworks */, - 027E251629709331004A84A2 /* Then in Frameworks */, - 027E25282970941F004A84A2 /* FirebaseStorage in Frameworks */, - 027E251929709348004A84A2 /* Moya in Frameworks */, - 027E251F29709376004A84A2 /* SnapKit in Frameworks */, + C4E673A65B49C299A564EA37 /* Pods_Keyneez.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -556,7 +549,7 @@ B187CA80296C8378006B0AE1 /* Camera.swift */, B1A80364296DD6430007DDD9 /* CameraViewActions.swift */, B18C2BB9296F267C00A9AA1B /* UIUtilities.swift */, - B18C2BBB296FF0B600A9AA1B /* OCR.swift */, + B18C2BBB296FF0B600A9AA1B /* OCRService.swift */, ); path = Camera; sourceTree = ""; @@ -1008,13 +1001,6 @@ ); name = Keyneez; packageProductDependencies = ( - 027E251529709331004A84A2 /* Then */, - 027E251829709348004A84A2 /* Moya */, - 027E251B29709358004A84A2 /* Kingfisher */, - 027E251E29709376004A84A2 /* SnapKit */, - 027E2521297093A2004A84A2 /* Toast */, - 027E2524297093E4004A84A2 /* Floaty */, - 027E25272970941F004A84A2 /* FirebaseStorage */, ); productName = Keyneez; productReference = B14D107A2959C7980004946F /* Keyneez.app */; @@ -1093,13 +1079,6 @@ ); mainGroup = B14D10712959C7980004946F; packageReferences = ( - 027E251429709331004A84A2 /* XCRemoteSwiftPackageReference "Then" */, - 027E251729709348004A84A2 /* XCRemoteSwiftPackageReference "Moya" */, - 027E251A29709358004A84A2 /* XCRemoteSwiftPackageReference "Kingfisher" */, - 027E251D29709376004A84A2 /* XCRemoteSwiftPackageReference "SnapKit" */, - 027E2520297093A2004A84A2 /* XCRemoteSwiftPackageReference "Toast-Swift" */, - 027E2523297093E4004A84A2 /* XCRemoteSwiftPackageReference "Floaty" */, - 027E25262970941F004A84A2 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, ); productRefGroup = B14D107B2959C7980004946F /* Products */; projectDirPath = ""; @@ -1326,7 +1305,7 @@ B10AAD8329696FCD00AB8475 /* IDDetailView.swift in Sources */, B1A8037A296E9D680007DDD9 /* Encodable.swift in Sources */, 0230EA6F296AD8C90006940C /* PropensityTagViewController.swift in Sources */, - B18C2BBC296FF0B600A9AA1B /* OCR.swift in Sources */, + B18C2BBC296FF0B600A9AA1B /* OCRService.swift in Sources */, B10AAD8229696FCA00AB8475 /* IDDetailViewController.swift in Sources */, B18B60D3296552DA00AF14F5 /* UIButton+Extension.swift in Sources */, 023B559429655CD200FB2462 /* CGFloat+Extension.swift in Sources */, @@ -1788,103 +1767,6 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ - -/* Begin XCRemoteSwiftPackageReference section */ - 027E251429709331004A84A2 /* XCRemoteSwiftPackageReference "Then" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/devxoul/Then"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.0.0; - }; - }; - 027E251729709348004A84A2 /* XCRemoteSwiftPackageReference "Moya" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/Moya/Moya"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 15.0.0; - }; - }; - 027E251A29709358004A84A2 /* XCRemoteSwiftPackageReference "Kingfisher" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/onevcat/Kingfisher"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 7.0.0; - }; - }; - 027E251D29709376004A84A2 /* XCRemoteSwiftPackageReference "SnapKit" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/SnapKit/SnapKit"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 5.0.0; - }; - }; - 027E2520297093A2004A84A2 /* XCRemoteSwiftPackageReference "Toast-Swift" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/scalessec/Toast-Swift.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 5.0.1; - }; - }; - 027E2523297093E4004A84A2 /* XCRemoteSwiftPackageReference "Floaty" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/kciter/Floaty.git"; - requirement = { - branch = master; - kind = branch; - }; - }; - 027E25262970941F004A84A2 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 10.0.0; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 027E251529709331004A84A2 /* Then */ = { - isa = XCSwiftPackageProductDependency; - package = 027E251429709331004A84A2 /* XCRemoteSwiftPackageReference "Then" */; - productName = Then; - }; - 027E251829709348004A84A2 /* Moya */ = { - isa = XCSwiftPackageProductDependency; - package = 027E251729709348004A84A2 /* XCRemoteSwiftPackageReference "Moya" */; - productName = Moya; - }; - 027E251B29709358004A84A2 /* Kingfisher */ = { - isa = XCSwiftPackageProductDependency; - package = 027E251A29709358004A84A2 /* XCRemoteSwiftPackageReference "Kingfisher" */; - productName = Kingfisher; - }; - 027E251E29709376004A84A2 /* SnapKit */ = { - isa = XCSwiftPackageProductDependency; - package = 027E251D29709376004A84A2 /* XCRemoteSwiftPackageReference "SnapKit" */; - productName = SnapKit; - }; - 027E2521297093A2004A84A2 /* Toast */ = { - isa = XCSwiftPackageProductDependency; - package = 027E2520297093A2004A84A2 /* XCRemoteSwiftPackageReference "Toast-Swift" */; - productName = Toast; - }; - 027E2524297093E4004A84A2 /* Floaty */ = { - isa = XCSwiftPackageProductDependency; - package = 027E2523297093E4004A84A2 /* XCRemoteSwiftPackageReference "Floaty" */; - productName = Floaty; - }; - 027E25272970941F004A84A2 /* FirebaseStorage */ = { - isa = XCSwiftPackageProductDependency; - package = 027E25262970941F004A84A2 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; - productName = FirebaseStorage; - }; -/* End XCSwiftPackageProductDependency section */ }; rootObject = B14D10722959C7980004946F /* Project object */; } diff --git a/Keyneez/Keyneez.xcodeproj/xcuserdata/jungpeter.xcuserdatad/xcschemes/xcschememanagement.plist b/Keyneez/Keyneez.xcodeproj/xcuserdata/jungpeter.xcuserdatad/xcschemes/xcschememanagement.plist index fca2498..4d14280 100644 --- a/Keyneez/Keyneez.xcodeproj/xcuserdata/jungpeter.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Keyneez/Keyneez.xcodeproj/xcuserdata/jungpeter.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ Keyneez.xcscheme_^#shared#^_ orderHint - 20 + 35 ReactiveSwift (Playground) 1.xcscheme diff --git a/Keyneez/Keyneez/Application/SceneDelegate.swift b/Keyneez/Keyneez/Application/SceneDelegate.swift index 5a3610f..d40718d 100644 --- a/Keyneez/Keyneez/Application/SceneDelegate.swift +++ b/Keyneez/Keyneez/Application/SceneDelegate.swift @@ -19,14 +19,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { window.overrideUserInterfaceStyle = UIUserInterfaceStyle.light let rootVC = LandingPageViewController() - let navigationController = UINavigationController(rootViewController: rootVC) - navigationController.navigationBar.isHidden = true - - window.rootViewController = navigationController - window.makeKeyAndVisible() -// let tabbarVC = LandingPageViewController() -// window.rootViewController = tabbarVC +// let tabbarVC = UINavigationController(rootViewController: rootVC) +// tabbarVC.isNavigationBarHidden = true + let tabbarVC = KeyneezTabbarController() + window.rootViewController = tabbarVC window.makeKeyAndVisible() self.window = window } diff --git a/Keyneez/Keyneez/Global/Auth/SignIn/SimpleLoginViewController.swift b/Keyneez/Keyneez/Global/Auth/SignIn/SimpleLoginViewController.swift index 61eeac5..c01921f 100644 --- a/Keyneez/Keyneez/Global/Auth/SignIn/SimpleLoginViewController.swift +++ b/Keyneez/Keyneez/Global/Auth/SignIn/SimpleLoginViewController.swift @@ -7,7 +7,7 @@ import UIKit import SnapKit -import Toast +import Toast_Swift import Then private struct Constant { diff --git a/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdCheckViewController.swift b/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdCheckViewController.swift index cb6d71f..07edc86 100644 --- a/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdCheckViewController.swift +++ b/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdCheckViewController.swift @@ -7,7 +7,7 @@ import UIKit import SnapKit -import Toast +import Toast_Swift import Then private struct Constant { diff --git a/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdViewController.swift b/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdViewController.swift index 3b7df70..39d5b32 100644 --- a/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdViewController.swift +++ b/Keyneez/Keyneez/Global/Auth/SignUp/SimplePwd/SimplePwdViewController.swift @@ -7,7 +7,7 @@ import UIKit import SnapKit -import Toast +import Toast_Swift import Then private struct Constant { diff --git a/Keyneez/Keyneez/Global/Views/LandingPageView/LandingPageViewController.swift b/Keyneez/Keyneez/Global/Views/LandingPageView/LandingPageViewController.swift index 4b2bf3b..a5437f8 100644 --- a/Keyneez/Keyneez/Global/Views/LandingPageView/LandingPageViewController.swift +++ b/Keyneez/Keyneez/Global/Views/LandingPageView/LandingPageViewController.swift @@ -29,7 +29,7 @@ private struct Constant { static let pageControlHeight: CGFloat = 12 } -class LandingPageViewController: UIViewController { +class LandingPageViewController: NiblessViewController { static var landingImages = ["Landing1", "Landing2", "Landing3", "Landing4"] diff --git a/Keyneez/Keyneez/OCR/Camera/Camera.swift b/Keyneez/Keyneez/OCR/Camera/Camera.swift index 2b77d22..c46860f 100644 --- a/Keyneez/Keyneez/OCR/Camera/Camera.swift +++ b/Keyneez/Keyneez/OCR/Camera/Camera.swift @@ -247,7 +247,7 @@ extension Camera { extension Camera { - func capturePhoto(videoPreviewLayerOrientation: AVCaptureVideoOrientation?) { + func capturePhoto(videoPreviewLayerOrientation: AVCaptureVideoOrientation?, photoCompletion: @escaping( [String], UIImage) -> Void) { sessionQueue.async { if let photoOutputConnection = self.photoOutput.connection(with: .video) { @@ -303,15 +303,13 @@ extension Camera { } }, photoProcessingHandler: { _ in // Animates a spinner while photo is processing - DispatchQueue.main.async { - // TODO: 여기에 이미지 처리할때 어떻게 처리할지 정의 - } + + + }, OCRCompletionHandler: { text, image in + photoCompletion(text, image) }) - // 사진이 어디에 저장되는지 정하기 - // photoCaptureProcessor.location = self.locationManager.location - - // The photo output holds a weak reference to the photo capture delegate and stores it in an array to maintain a strong reference. + self.inProgressPhotoCaptureDelegates[photoCaptureProcessor.requestedPhotoSettings.uniqueID] = photoCaptureProcessor self.photoOutput.capturePhoto(with: photoSettings, delegate: photoCaptureProcessor) diff --git a/Keyneez/Keyneez/OCR/Camera/CameraViewActions.swift b/Keyneez/Keyneez/OCR/Camera/CameraViewActions.swift index 04a61f1..cf37fca 100644 --- a/Keyneez/Keyneez/OCR/Camera/CameraViewActions.swift +++ b/Keyneez/Keyneez/OCR/Camera/CameraViewActions.swift @@ -9,7 +9,7 @@ import UIKit protocol CameraViewActionables { func didTouchBackButton() -> UIAction - func OCRConfirmed(with navigationDelegate: CustomNavigationManager, height: CGFloat, heightIncludeKeyboard: CGFloat) -> UIAction + func OCRConfirmed(with navigationDelegate: CustomNavigationManager, height: CGFloat, heightIncludeKeyboard: CGFloat,text: [String], image: UIImage) } final class CameraViewActions: CameraViewActionables { @@ -28,17 +28,20 @@ final class CameraViewActions: CameraViewActionables { func OCRConfirmed(with navigationDelegate: CustomNavigationManager, height: CGFloat, - heightIncludeKeyboard: CGFloat) -> UIAction { - return UIAction(handler: { [unowned self] _ in + heightIncludeKeyboard: CGFloat, + text: [String], + image: UIImage + ) { + DispatchQueue.main.async { navigationDelegate.direction = .bottom navigationDelegate.height = height navigationDelegate.heightIncludeKeyboard = heightIncludeKeyboard navigationDelegate.dimmed = false - let idInfoEditVC = IDInfoEditableViewController() + let idInfoEditVC = IDInfoEditableViewController(ocrTexts: text) idInfoEditVC.transitioningDelegate = navigationDelegate idInfoEditVC.modalPresentationStyle = .custom self.viewcontroller?.present(idInfoEditVC, animated: true) - }) + } } deinit { diff --git a/Keyneez/Keyneez/OCR/Camera/CameraViewController.swift b/Keyneez/Keyneez/OCR/Camera/CameraViewController.swift index 7352a64..74feb15 100644 --- a/Keyneez/Keyneez/OCR/Camera/CameraViewController.swift +++ b/Keyneez/Keyneez/OCR/Camera/CameraViewController.swift @@ -76,7 +76,9 @@ final class CameraViewController: NiblessViewController { private func didTouchCaptureButton() -> UIAction { return UIAction { [weak self] _ in guard let self else { return } - self.camera.capturePhoto(videoPreviewLayerOrientation: self.previewView.videoPreviewLayer.connection?.videoOrientation) + self.camera.capturePhoto(videoPreviewLayerOrientation: self.previewView.videoPreviewLayer.connection?.videoOrientation) { text, image in + self.actions.OCRConfirmed(with: self.customNavigationDelegate, height: 520, heightIncludeKeyboard: 690, text: text, image: image) + } } } @@ -108,13 +110,6 @@ final class CameraViewController: NiblessViewController { } private lazy var actions: CameraViewActionables = CameraViewActions(viewcontroller: self) - private var semaphoreValue = 5 - private let semaphore = DispatchSemaphore(value: 5) - private var textBuffer: [[String]] = [] { - didSet { - print(textBuffer) - } - } override func viewDidLoad() { super.viewDidLoad() @@ -134,10 +129,6 @@ final class CameraViewController: NiblessViewController { super.viewWillAppear(animated) camera.checkSetupResult() } - - deinit { - print(self, #function) - } } // MARK: - Private @@ -264,15 +255,12 @@ extension CameraViewController: AVCaptureVideoDataOutputSampleBufferDelegate { from connection: AVCaptureConnection ) { - //버퍼처리를 할 Semaphore - semaphore.wait() - - defer { - for _ in 0..<5 { - semaphore .signal() - } - } + // 수동모드일때 OFF + if captureMode == .manual { return } + //버퍼처리를 할 Semaphore + ocrService.semaphore.wait() + guard let imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { print("Failed to get image buffer from sample buffer.") return @@ -307,14 +295,17 @@ extension CameraViewController: AVCaptureVideoDataOutputSampleBufferDelegate { let imageWidth = CGFloat(CVPixelBufferGetWidth(imageBuffer)) let imageHeight = CGFloat(CVPixelBufferGetHeight(imageBuffer)) - self.saveImage(image: newCropped, name: self.semaphoreValue) - ocrService.recognizeText(in: visionImage, width: imageWidth, height: imageHeight) { [weak self] in - print($0) + ocrService.recognizeText(in: visionImage, with: newCropped, width: imageWidth, height: imageHeight) { [weak self] text, image in guard let self else {return} - let textele = $0.split(separator: "\n").map {String($0)} - self.textBuffer.append(textele) + self.processWhenSuccessOCRAuto(image: image, text: text, name: 4) } - if self.semaphoreValue == 1 { + } + + func processWhenSuccessOCRAuto(image: UIImage, text: [String], name: Int) { + // Text Process + DispatchQueue.main.async { + self.actions.OCRConfirmed(with: self.customNavigationDelegate, height: 520, heightIncludeKeyboard: 690, text: text, image: image) + self.saveImage(image: image, name: 4) self.camera.session.stopRunning() } } @@ -333,7 +324,6 @@ extension CameraViewController { } do { try data.write(to: directory.appendingPathComponent("profile\(name).png")!) - self.semaphoreValue -= 1 return true } catch { print(error.localizedDescription) diff --git a/Keyneez/Keyneez/OCR/Camera/OCR.swift b/Keyneez/Keyneez/OCR/Camera/OCR.swift deleted file mode 100644 index 8fb88e3..0000000 --- a/Keyneez/Keyneez/OCR/Camera/OCR.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// File.swift -// Keyneez -// -// Created by Jung peter on 1/12/23. -// - -import UIKit - -import MLKitTextRecognitionKorean -import MLKitTextRecognition -import MLKit -import MLImage - - -protocol TextRecognizable { - func recognizeText(in image: VisionImage, width: CGFloat, height: CGFloat, completion: @escaping (String) -> Void) -} - -final class OCRService: TextRecognizable { - - private var koreanOptions = KoreanTextRecognizerOptions() - -// private var IdcontentBuffer: [] = [] - - init() { } - - func recognizeText(in image: VisionImage, width: CGFloat, height: CGFloat, completion: @escaping (String) -> Void) { - var recognizedText: Text - do { - recognizedText = try TextRecognizer.textRecognizer(options: koreanOptions) - .results(in: image) - completion(recognizedText.text) - } catch let error { - print("이미지 인식에 실패 \(error.localizedDescription).") - } - } - - private func regexStudentIDCard(with: String) { - - } - - private func regexTeenIDCard(with: String) { - - } - -} diff --git a/Keyneez/Keyneez/OCR/Camera/OCRService.swift b/Keyneez/Keyneez/OCR/Camera/OCRService.swift new file mode 100644 index 0000000..ab066d0 --- /dev/null +++ b/Keyneez/Keyneez/OCR/Camera/OCRService.swift @@ -0,0 +1,201 @@ +// +// File.swift +// Keyneez +// +// Created by Jung peter on 1/12/23. +// + +import UIKit + +import MLKitTextRecognitionKorean +import MLKitTextRecognition +import MLKit +import MLImage +import UIKit + +fileprivate let success = false + +protocol TextRecognizable { + func recognizeText(in image: VisionImage, with uiimage: UIImage, width: CGFloat, height: CGFloat, completion: @escaping ([String], UIImage) -> Void) +} + +final class OCRService: TextRecognizable { + + private var koreanOptions = KoreanTextRecognizerOptions() + var bufferLength = 10 + var semaphore: DispatchSemaphore + var textBuffer: [[String]] = [] + var imageBuffer: [UIImage] = [] + + init() { + self.semaphore = DispatchSemaphore(value: bufferLength) + } + + func recognizeTextWithManual(in image: VisionImage, with uiimage: UIImage, width: CGFloat, height: CGFloat, completion: @escaping ([String], UIImage) -> Void) { + var recognizedText: Text + do { + recognizedText = try TextRecognizer.textRecognizer(options: koreanOptions) + .results(in: image) + let splited = recognizedText.text.components(separatedBy: ["\n", ":", "."]).map { String($0)} + let regexed = regexIDCard(with: splited) + + completion(regexed, uiimage) + } catch let error { + print("이미지 인식에 실패 \(error.localizedDescription).") + } + + } + + func recognizeText(in image: VisionImage, with uiimage: UIImage, width: CGFloat, height: CGFloat, completion: @escaping ([String], UIImage) -> Void) { + var recognizedText: Text + do { + recognizedText = try TextRecognizer.textRecognizer(options: koreanOptions) + .results(in: image) + if bufferHasSurplusSpace() { + let splited = recognizedText.text.components(separatedBy: ["\n", ":", "."]).map { String($0)} + let regexed = regexIDCard(with: splited) + + append(text: regexed, image: uiimage) + } else { + checkOCRSuccess(completion: completion) { [weak self] in + self?.flush() + } + } + } catch let error { + print("이미지 인식에 실패 \(error.localizedDescription).") + } + } + + private func bufferHasSurplusSpace() -> Bool { + return textBuffer.count < bufferLength - 1 && imageBuffer.count < bufferLength - 1 + } + + private func append(text: [String], image: UIImage) { + appendTextsInTextBuffer(with: text) + appendImageInImageBuffer(with: image) + } + + func flush() { + imageBuffer.removeAll() + textBuffer.removeAll() + for _ in 0.. Void, failure: @escaping () -> Void) { + + + var textDict: [String:Int] = [:] + for textElement in textBuffer { + for text in textElement { + textDict.updateValue((textDict[text] ?? 0) + 1, forKey: text) + } + } + var sortedArr = textDict.sorted(by: { $0.value > $1.value }) + // 2개 미만일 경우 Flush + var newArr = sortedArr.map { $0.key } + if newArr.count < 2 { + failure() + return + } + // 2개일 경우, + if newArr.count < 3 { + newArr.append("") + } + + newArr = Array(newArr[0..<3]) + if checkTeenID(in: newArr) || checkSchool(in: newArr) { + completion(newArr, imageBuffer[5]) + return + } + } + + private func checkTeenID(in arr: [String]) -> Bool { + for str in arr { + if str.contains("청소년증") { + return true + } + } + return false + } + + private func checkSchool(in arr: [String]) -> Bool { + for str in arr { + if str.contains("학교") { + return true + } + } + return false + } + + private func regexIDCard(with strings: [String]) -> [String] { + let numberPattern = "[0-9]*" + var result: [String] = [] + var strList = strings + .filter { $0.count >= 3} + .map { String($0).trimmingCharacters(in: .whitespaces) } + var flag = "" + if strList.count < 7 { + for index in 0.. = [] + for index in 0.. 5 { + for index in 0...5 { + if strList[index].contains("청소년") { + result.append("청소년증") + continue + } else { + if let range = strList[index].range(of: numberPattern, options: .regularExpression) { + if !strList[index][range].isEmpty { + guard let str = strList[index].split(separator: "-").first else { continue } + result.append(String(str)) + continue + } + } + + if strList[index].count <= 4 { + result.append(strList[index]) + } + } + } + } + + return Array(Set(result)) + } + + func regexStudentID(with strList: [String]) { + + } + +} diff --git a/Keyneez/Keyneez/OCR/Camera/PhotoCaptureDelegate.swift b/Keyneez/Keyneez/OCR/Camera/PhotoCaptureDelegate.swift index 3442350..b631d82 100644 --- a/Keyneez/Keyneez/OCR/Camera/PhotoCaptureDelegate.swift +++ b/Keyneez/Keyneez/OCR/Camera/PhotoCaptureDelegate.swift @@ -26,6 +26,8 @@ class PhotoCaptureProcessor: NSObject { private let photoProcessingHandler: (Bool) -> Void + private let OCRCompletionHandler: ([String], UIImage) -> Void + private var photoData: Data? private var livePhotoCompanionMovieURL: URL? @@ -45,12 +47,15 @@ class PhotoCaptureProcessor: NSObject { willCapturePhotoAnimation: @escaping () -> Void, livePhotoCaptureHandler: @escaping (Bool) -> Void, completionHandler: @escaping (PhotoCaptureProcessor) -> Void, - photoProcessingHandler: @escaping (Bool) -> Void) { + photoProcessingHandler: @escaping (Bool) -> Void, + OCRCompletionHandler: @escaping ([String], UIImage) -> Void + ) { self.requestedPhotoSettings = requestedPhotoSettings self.willCapturePhotoAnimation = willCapturePhotoAnimation self.livePhotoCaptureHandler = livePhotoCaptureHandler self.completionHandler = completionHandler self.photoProcessingHandler = photoProcessingHandler + self.OCRCompletionHandler = OCRCompletionHandler } private func didFinish() { @@ -68,21 +73,6 @@ class PhotoCaptureProcessor: NSObject { } } -extension PhotoCaptureProcessor { - private func recognizeText(in image: VisionImage, width: CGFloat, height: CGFloat) { - var recognizedText: Text - do { - recognizedText = try TextRecognizer.textRecognizer(options: koreanOptions) - .results(in: image) - print(recognizedText.text) - } catch { - print("Failed to recognize text with error: \(error.localizedDescription).") - // self.updatePreviewOverlayViewWithLastFrame() - return - } - } -} - extension PhotoCaptureProcessor: AVCapturePhotoCaptureDelegate { /* This extension adopts all of the AVCapturePhotoCaptureDelegate protocol methods. @@ -111,7 +101,6 @@ extension PhotoCaptureProcessor: AVCapturePhotoCaptureDelegate { } } - /// - Tag: DidFinishProcessingPhoto func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) { photoProcessingHandler(false) @@ -133,12 +122,14 @@ extension PhotoCaptureProcessor: AVCapturePhotoCaptureDelegate { var cropped = newImage.cgImage?.cropping(to: CGRect(x: tempImage.size.width / 2 - newWidth / 2, y: newy, width: newHeight * regionOfInterestSize.width / regionOfInterestSize.height, height: newHeight)) var newCropped = UIImage(cgImage: cropped!, scale: newImage.scale, orientation: newImage.imageOrientation) + photoData = newCropped.pngData() + DispatchQueue.global().async { [weak self] in guard let self = self else {return} let visionImage = VisionImage(image: newCropped) - OCRService().recognizeText(in: visionImage, width: newCropped.size.width, height: newCropped.size.height) { str in - print(str) + OCRService().recognizeTextWithManual(in: visionImage, with: newCropped, width: newCropped.size.width, height: newCropped.size.height) { text, image in + self.OCRCompletionHandler(text, image) } } @@ -146,22 +137,6 @@ extension PhotoCaptureProcessor: AVCapturePhotoCaptureDelegate { } - private func cropImage( image:UIImage , cropRect: CGRect) -> UIImage - { - UIGraphicsBeginImageContextWithOptions(cropRect.size, false, 0) - let context = UIGraphicsGetCurrentContext() - - context?.translateBy(x: 0.0, y: image.size.height) - context?.scaleBy(x: 1.0, y: -1.0) - print("변경된", image.size) - context?.draw(image.cgImage!, in: CGRect(x:0, y:0, width:image.size.width, height:image.size.height), byTiling: false) - context?.clip(to: [cropRect]) - - let croppedImage = UIGraphicsGetImageFromCurrentImageContext() - UIGraphicsEndImageContext() - return croppedImage! - } - /// - Tag: DidFinishRecordingLive func photoOutput(_ output: AVCapturePhotoOutput, didFinishRecordingLivePhotoMovieForEventualFileAt outputFileURL: URL, resolvedSettings: AVCaptureResolvedPhotoSettings) { livePhotoCaptureHandler(false) @@ -189,53 +164,6 @@ extension PhotoCaptureProcessor: AVCapturePhotoCaptureDelegate { didFinish() return } - - PHPhotoLibrary.requestAuthorization { status in - if status == .authorized { - PHPhotoLibrary.shared().performChanges({ - let options = PHAssetResourceCreationOptions() - let creationRequest = PHAssetCreationRequest.forAsset() - options.uniformTypeIdentifier = self.requestedPhotoSettings.processedFileType.map { $0.rawValue } - creationRequest.addResource(with: .photo, data: photoData, options: options) - - // Specify the location the photo was taken - creationRequest.location = self.location - - if let livePhotoCompanionMovieURL = self.livePhotoCompanionMovieURL { - let livePhotoCompanionMovieFileOptions = PHAssetResourceCreationOptions() - livePhotoCompanionMovieFileOptions.shouldMoveFile = true - creationRequest.addResource(with: .pairedVideo, - fileURL: livePhotoCompanionMovieURL, - options: livePhotoCompanionMovieFileOptions) - } - - // Save Portrait Effects Matte to Photos Library only if it was generated - if let portraitEffectsMatteData = self.portraitEffectsMatteData { - let creationRequest = PHAssetCreationRequest.forAsset() - creationRequest.addResource(with: .photo, - data: portraitEffectsMatteData, - options: nil) - } - // Save Portrait Effects Matte to Photos Library only if it was generated - for semanticSegmentationMatteData in self.semanticSegmentationMatteDataArray { - let creationRequest = PHAssetCreationRequest.forAsset() - creationRequest.addResource(with: .photo, - data: semanticSegmentationMatteData, - options: nil) - } - - }, completionHandler: { _, error in - if let error = error { - print("Error occurred while saving photo to photo library: \(error)") - } - - self.didFinish() - } - ) - } else { - self.didFinish() - } - } } func resizeImage(image: UIImage, size: CGSize) -> CGImage { diff --git a/Keyneez/Keyneez/OCR/IDInfoEdit/IDInfoEditableView.swift b/Keyneez/Keyneez/OCR/IDInfoEdit/IDInfoEditableView.swift index e9db141..fac7f8b 100644 --- a/Keyneez/Keyneez/OCR/IDInfoEdit/IDInfoEditableView.swift +++ b/Keyneez/Keyneez/OCR/IDInfoEdit/IDInfoEditableView.swift @@ -7,29 +7,6 @@ import UIKit -enum IDType: String { - case schoolID = "학교" - case teenID = "생년월일" - - var title: String { - switch self { - case .schoolID: - return "학교" - case .teenID: - return "청소년증" - } - } - - var placeholder: String { - switch self { - case .teenID: - return "YYMMDD" - case .schoolID: - return "OO학교" - } - } -} - struct IDInfo { var name: String var idType: IDType @@ -91,15 +68,49 @@ final class IDInfoEditableView: NiblessView, IDIssuedFactory { } private let actions: IDInfoEditableActionables + private var idType: IDType + private var ocrText: [String] - init(frame: CGRect, actions: IDInfoEditableActionables) { + init(frame: CGRect, actions: IDInfoEditableActionables, ocrTexts: [String], type: IDType ) { self.actions = actions + self.ocrText = ocrTexts + self.idType = type super.init(frame: frame) addsubview() setConstraint() setSegmentedControl() nameTextField.delegate = self infoTextField.delegate = self + while ocrText.count < 3 { + ocrText.append("") + } + if ocrText.contains("청소년증") { + segmentedControl.selectedSegmentIndex = 1 + ocrText.removeAll { + $0 == "청소년증" + } + for text in ocrText { + if text.allSatisfy { $0.isNumber } { + idSegmentedValue[1].info = text + infoTextField.text = text + } else { + idSegmentedValue[1].name = text + nameTextField.text = text + } + } + } else { + segmentedControl.selectedSegmentIndex = 0 + for text in ocrText { + if text.contains("학생증") { continue } + else if text.contains("학교") { + idSegmentedValue[0].info = text + infoTextField.text = text + } else { + idSegmentedValue[0].name = text + nameTextField.text = text + } + } + } } func makeIDIssuedViewController() -> IDIssuedViewController { diff --git a/Keyneez/Keyneez/OCR/IDInfoEdit/IDInfoEditableViewController.swift b/Keyneez/Keyneez/OCR/IDInfoEdit/IDInfoEditableViewController.swift index 10c0114..a03cfef 100644 --- a/Keyneez/Keyneez/OCR/IDInfoEdit/IDInfoEditableViewController.swift +++ b/Keyneez/Keyneez/OCR/IDInfoEdit/IDInfoEditableViewController.swift @@ -24,6 +24,29 @@ */ +enum IDType: String { + case schoolID = "학교" + case teenID = "생년월일" + + var title: String { + switch self { + case .schoolID: + return "학생증" + case .teenID: + return "청소년증" + } + } + + var placeholder: String { + switch self { + case .teenID: + return "YYMMDD" + case .schoolID: + return "OO학교" + } + } +} + import UIKit final class IDInfoEditableViewController: BottomSheetViewController { @@ -38,9 +61,17 @@ final class IDInfoEditableViewController: BottomSheetViewController { } private lazy var actions: IDInfoEditableActionables = IDInfoEditableActions(viewController: self) + private var ocrTexts: [String] + private var type: IDType + + init(ocrTexts: [String]) { + self.ocrTexts = ocrTexts + self.type = ocrTexts.contains("청소년증") == true ? IDType.teenID : IDType.schoolID + super.init() + } private func addSubview() { - let idDetailView = IDInfoEditableView(frame: .zero, actions: actions) + let idDetailView = IDInfoEditableView(frame: .zero, actions: actions, ocrTexts: ocrTexts, type: type) contentView.addSubview(idDetailView) idDetailView.snp.makeConstraints { $0.left.right.top.bottom.equalToSuperview() diff --git a/Keyneez/Podfile b/Keyneez/Podfile index 0a91425..03b30b9 100644 --- a/Keyneez/Podfile +++ b/Keyneez/Podfile @@ -1,5 +1,5 @@ # Uncomment the next line to define a global platform for your project -# platform :ios, '14.0' +platform :ios, '14.0' target 'Keyneez' do # Comment the next line if you don't want to use dynamic frameworks @@ -8,6 +8,13 @@ target 'Keyneez' do # Pods for Keynee pod 'GoogleMLKit/TextRecognition','3.2.0' pod 'GoogleMLKit/TextRecognitionKorean', '3.2.0' + pod 'SnapKit', '~> 5.6.0' + pod 'Then' + pod 'Kingfisher', '~> 7.0' + pod 'Toast-Swift', '~> 5.0.1' + pod 'Floaty', '~> 4.2.0' + pod 'Moya', '~> 15.0' + pod 'FirebaseStorage' target 'KeyneezTests' do inherit! :search_paths @@ -18,4 +25,4 @@ target 'Keyneez' do # Pods for testing end -end +end \ No newline at end of file diff --git a/Keyneez/Podfile.lock b/Keyneez/Podfile.lock index 7a589a9..1c4eef5 100644 --- a/Keyneez/Podfile.lock +++ b/Keyneez/Podfile.lock @@ -1,4 +1,31 @@ PODS: + - Alamofire (5.6.4) + - FirebaseAppCheckInterop (9.6.0) + - FirebaseAuthInterop (9.6.0) + - FirebaseCore (9.6.0): + - FirebaseCoreDiagnostics (~> 9.0) + - FirebaseCoreInternal (~> 9.0) + - GoogleUtilities/Environment (~> 7.7) + - GoogleUtilities/Logger (~> 7.7) + - FirebaseCoreDiagnostics (9.6.0): + - GoogleDataTransport (< 10.0.0, >= 9.1.4) + - GoogleUtilities/Environment (~> 7.7) + - GoogleUtilities/Logger (~> 7.7) + - nanopb (< 2.30910.0, >= 2.30908.0) + - FirebaseCoreExtension (9.6.0): + - FirebaseCore (~> 9.0) + - FirebaseCoreInternal (9.6.0): + - "GoogleUtilities/NSData+zlib (~> 7.7)" + - FirebaseStorage (9.6.0): + - FirebaseAppCheckInterop (~> 9.0) + - FirebaseAuthInterop (~> 9.0) + - FirebaseCore (~> 9.0) + - FirebaseCoreExtension (~> 9.0) + - FirebaseStorageInternal (~> 9.0) + - FirebaseStorageInternal (9.6.0): + - FirebaseCore (~> 9.0) + - GTMSessionFetcher/Core (< 3.0, >= 1.7) + - Floaty (4.2.0) - GoogleDataTransport (9.2.0): - GoogleUtilities/Environment (~> 7.7) - nanopb (< 2.30910.0, >= 2.30908.0) @@ -27,11 +54,13 @@ PODS: - PromisesObjC (< 3.0, >= 1.2) - GoogleUtilities/Logger (7.11.0): - GoogleUtilities/Environment + - "GoogleUtilities/NSData+zlib (7.11.0)" - GoogleUtilities/UserDefaults (7.11.0): - GoogleUtilities/Logger - GoogleUtilitiesComponents (1.1.0): - GoogleUtilities/Logger - GTMSessionFetcher/Core (1.7.2) + - Kingfisher (7.5.0) - MLImage (1.0.0-beta3) - MLKitCommon (8.0.0): - GoogleDataTransport (~> 9.0) @@ -60,6 +89,10 @@ PODS: - MLImage (= 1.0.0-beta3) - MLKitCommon (~> 8.0) - Protobuf (~> 3.12) + - Moya (15.0.0): + - Moya/Core (= 15.0.0) + - Moya/Core (15.0.0): + - Alamofire (~> 5.0) - nanopb (2.30909.0): - nanopb/decode (= 2.30909.0) - nanopb/encode (= 2.30909.0) @@ -67,46 +100,86 @@ PODS: - nanopb/encode (2.30909.0) - PromisesObjC (2.1.1) - Protobuf (3.21.12) + - SnapKit (5.6.0) + - Then (3.0.0) + - Toast-Swift (5.0.1) DEPENDENCIES: + - FirebaseStorage + - Floaty (~> 4.2.0) - GoogleMLKit/TextRecognition (= 3.2.0) - GoogleMLKit/TextRecognitionKorean (= 3.2.0) + - Kingfisher (~> 7.0) + - Moya (~> 15.0) + - SnapKit (~> 5.6.0) + - Then + - Toast-Swift (~> 5.0.0) SPEC REPOS: trunk: + - Alamofire + - FirebaseAppCheckInterop + - FirebaseAuthInterop + - FirebaseCore + - FirebaseCoreDiagnostics + - FirebaseCoreExtension + - FirebaseCoreInternal + - FirebaseStorage + - FirebaseStorageInternal + - Floaty - GoogleDataTransport - GoogleMLKit - GoogleToolboxForMac - GoogleUtilities - GoogleUtilitiesComponents - GTMSessionFetcher + - Kingfisher - MLImage - MLKitCommon - MLKitTextRecognition - MLKitTextRecognitionCommon - MLKitTextRecognitionKorean - MLKitVision + - Moya - nanopb - PromisesObjC - Protobuf + - SnapKit + - Then + - Toast-Swift SPEC CHECKSUMS: + Alamofire: 4e95d97098eacb88856099c4fc79b526a299e48c + FirebaseAppCheckInterop: d5ecda0c09f8069406643d6e0fa12c09d1b736e3 + FirebaseAuthInterop: b6cf02117f13a8400c8c8b4421e12c6e850bcaf3 + FirebaseCore: 2082fffcd855f95f883c0a1641133eb9bbe76d40 + FirebaseCoreDiagnostics: 99a495094b10a57eeb3ae8efa1665700ad0bdaa6 + FirebaseCoreExtension: e83465d1236b166d1d445bbf0e82b65acb30b73b + FirebaseCoreInternal: bca76517fe1ed381e989f5e7d8abb0da8d85bed3 + FirebaseStorage: 1fead543a1f441c3b434c1c9f12560dd82f8b568 + FirebaseStorageInternal: 81d8a597324ccd06c41a43c5700bc1185a2fc328 + Floaty: e2bd5a0f6f7f70899e26ff2da31081c8bee8d1b0 GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f GoogleMLKit: 0017a6a8372e1a182139b9def4d89be5d87ca5a7 GoogleToolboxForMac: 8bef7c7c5cf7291c687cf5354f39f9db6399ad34 GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f GoogleUtilitiesComponents: 679b2c881db3b615a2777504623df6122dd20afe GTMSessionFetcher: 5595ec75acf5be50814f81e9189490412bad82ba + Kingfisher: b9c2a4a4af2990a768445c277359b27bde287d71 MLImage: 489dfec109f21da8621b28d476401aaf7a0d4ff4 MLKitCommon: f6da6c5659618c070b50a80db01248ebe2964175 MLKitTextRecognition: f6fda8923564f6cebe2bb952a1adb0414e1d731b MLKitTextRecognitionCommon: 0c720ee45ffedb3a34f0e8b95764d2f57a108e71 MLKitTextRecognitionKorean: dfc0fa67510d971f49c1c56641953c32d65d7b10 MLKitVision: 96c96571190b7f63eddf4a12068ce8a8689e0d2c + Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb Protobuf: 120350fc38646e2dedc26f49ecba778184ea1de2 + SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25 + Then: 844265ae87834bbe1147d91d5d41a404da2ec27d + Toast-Swift: 9b6a70f28b3bf0b96c40d46c0c4b9d6639846711 -PODFILE CHECKSUM: 5d2a6f1459d3992bd61273df6984f634a1e119d8 +PODFILE CHECKSUM: ed779153478e6987e53b94daac55ee8edd53671d COCOAPODS: 1.11.3