From d72dd172d7fa6d234247b6085e7d2c72a6b2d656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cxixn2=E2=80=9D?= Date: Sun, 14 Sep 2025 22:39:19 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=91=BD=20::=20[#304]=20BaseURL=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + Projects/App/Support/Info.plist | 9 +++++++++ Projects/App/XCConfig/Release.xcconfig | 15 +++++++++++++++ .../Outing/User/View/OutingViewController.swift | 2 +- Projects/Service/Sources/General/BaseURL.swift | 14 -------------- .../Services/Account/AccountServices.swift | 14 +++++++++----- .../Sources/Services/Auth/AuthServices.swift | 8 ++++++-- .../Sources/Services/Late/LateService.swift | 8 ++++++-- .../Notification/NotificationService.swift | 6 +++++- .../Sources/Services/Outing/OutingServices.swift | 8 ++++++-- .../Services/Profile/ProfileServices.swift | 14 +++++++++----- .../StudentCouncil/StudentCouncilServices.swift | 8 ++++++-- 12 files changed, 73 insertions(+), 34 deletions(-) create mode 100644 Projects/App/XCConfig/Release.xcconfig delete mode 100644 Projects/Service/Sources/General/BaseURL.swift diff --git a/.gitignore b/.gitignore index 6e26e352..25146aef 100644 --- a/.gitignore +++ b/.gitignore @@ -79,6 +79,7 @@ Tuist/Dependencies .DS_Store .AppleDouble .LSOverride +XCConfig/*.xcconfig # Icon must end with two \r Icon diff --git a/Projects/App/Support/Info.plist b/Projects/App/Support/Info.plist index decda402..09b52326 100644 --- a/Projects/App/Support/Info.plist +++ b/Projects/App/Support/Info.plist @@ -20,16 +20,25 @@ 1.5.0 CFBundleVersion 1 + CloudTypeBaseURL + $(CloudTypeBaseURL) FirebaseAppDelegateProxyEnabled LSRequiresIPhoneOS Localization native development region Korea + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSCameraUsageDescription QR 스캔을 위해 카메라를 허용해주세요. SERVER_HOST ${SERVER_HOST} + SchoolBaseURL + $(SchoolBaseURL) UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/Projects/App/XCConfig/Release.xcconfig b/Projects/App/XCConfig/Release.xcconfig new file mode 100644 index 00000000..61870e7f --- /dev/null +++ b/Projects/App/XCConfig/Release.xcconfig @@ -0,0 +1,15 @@ +// +// Release.xcconfig +// GOMS-iOS-V2 +// +// Created by 서지완 on 9/14/25. +// Copyright © 2025 HARIBO. All rights reserved. +// + +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +// 학교서버 BaseURL (GOMS V2 Release) +SchoolBaseURL = http:/$()/gsmsv-1.yujun.kr:23235/api/v2 +// 클라우드타입 BaseURL (GOMS V2 Test) +CloudTypeBaseURL = https:/$()/port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app diff --git a/Projects/Feature/Sources/Scene/Outing/User/View/OutingViewController.swift b/Projects/Feature/Sources/Scene/Outing/User/View/OutingViewController.swift index 39b10ad2..1e5564e1 100644 --- a/Projects/Feature/Sources/Scene/Outing/User/View/OutingViewController.swift +++ b/Projects/Feature/Sources/Scene/Outing/User/View/OutingViewController.swift @@ -125,7 +125,7 @@ public final class OutingViewController: BaseViewController { searchController.searchBar.placeholder = "학생 검색" searchController.searchResultsUpdater = self } - + private func setupCollectionView() { self.outingListCollectionView.dataSource = self self.outingListCollectionView.delegate = self diff --git a/Projects/Service/Sources/General/BaseURL.swift b/Projects/Service/Sources/General/BaseURL.swift deleted file mode 100644 index 1161d7b0..00000000 --- a/Projects/Service/Sources/General/BaseURL.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// BaseURL.swift -// Service -// -// Created by 새미 on 3/30/24. -// Copyright © 2024 HARIBO. All rights reserved. -// - -import Foundation - -public struct BaseURL { - public static let baseURL = Bundle.main.object(forInfoDictionaryKey: "SERVER_HOST") as! String -} - diff --git a/Projects/Service/Sources/Services/Account/AccountServices.swift b/Projects/Service/Sources/Services/Account/AccountServices.swift index b2bc0143..0b069cd3 100644 --- a/Projects/Service/Sources/Services/Account/AccountServices.swift +++ b/Projects/Service/Sources/Services/Account/AccountServices.swift @@ -17,17 +17,21 @@ public enum AccountServices { extension AccountServices: TargetType { public var baseURL: URL { - return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2/account")! + guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String, + let url = URL(string: urlString) else { + fatalError("AccountAPIㅣURL을 불러올 수 없습니다.") + } + return url } - + public var path: String { switch self { case .newPassword: - return "/new-password" + return "/account/new-password" case .changPassword: - return "/change-password" + return "/account/change-password" case .withdraw(let password, _): - return "/withdraw/\(password)" + return "/account/withdraw/\(password)" } } diff --git a/Projects/Service/Sources/Services/Auth/AuthServices.swift b/Projects/Service/Sources/Services/Auth/AuthServices.swift index 81e43c76..c692cca1 100644 --- a/Projects/Service/Sources/Services/Auth/AuthServices.swift +++ b/Projects/Service/Sources/Services/Auth/AuthServices.swift @@ -20,9 +20,13 @@ public enum AuthServices { extension AuthServices: TargetType { public var baseURL: URL { - return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2")! + guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String, + let url = URL(string: urlString) else { + fatalError("AuthAPIㅣURL을 불러올 수 없습니다.") + } + return url } - + public var path: String { switch self { case .signUp: diff --git a/Projects/Service/Sources/Services/Late/LateService.swift b/Projects/Service/Sources/Services/Late/LateService.swift index 4d24d0d0..9f993030 100644 --- a/Projects/Service/Sources/Services/Late/LateService.swift +++ b/Projects/Service/Sources/Services/Late/LateService.swift @@ -15,9 +15,13 @@ public enum LateService { extension LateService: TargetType { public var baseURL: URL { - return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2")! + guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String, + let url = URL(string: urlString) else { + fatalError("LateAPIㅣURL을 불러올 수 없습니다.") + } + return url } - + public var path: String { switch self { case .lateRank: diff --git a/Projects/Service/Sources/Services/Notification/NotificationService.swift b/Projects/Service/Sources/Services/Notification/NotificationService.swift index c36dd76f..fe0ec229 100644 --- a/Projects/Service/Sources/Services/Notification/NotificationService.swift +++ b/Projects/Service/Sources/Services/Notification/NotificationService.swift @@ -15,7 +15,11 @@ public enum NotificationServices { extension NotificationServices: TargetType { public var baseURL: URL { - return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2/notification/token")! + guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String, + let url = URL(string: urlString) else { + fatalError("NotificationAPIㅣURL을 불러올 수 없습니다.") + } + return url } public var path: String { diff --git a/Projects/Service/Sources/Services/Outing/OutingServices.swift b/Projects/Service/Sources/Services/Outing/OutingServices.swift index 57ab3b13..674d246f 100644 --- a/Projects/Service/Sources/Services/Outing/OutingServices.swift +++ b/Projects/Service/Sources/Services/Outing/OutingServices.swift @@ -18,9 +18,13 @@ public enum OutingServices { extension OutingServices: TargetType { public var baseURL: URL { - return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2")! + guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String, + let url = URL(string: urlString) else { + fatalError("OutingAPIㅣURL을 불러올 수 없습니다.") + } + return url } - + public var path: String { switch self { case .outing(let outingUUID, _): diff --git a/Projects/Service/Sources/Services/Profile/ProfileServices.swift b/Projects/Service/Sources/Services/Profile/ProfileServices.swift index 50772655..b6e37bb6 100644 --- a/Projects/Service/Sources/Services/Profile/ProfileServices.swift +++ b/Projects/Service/Sources/Services/Profile/ProfileServices.swift @@ -13,17 +13,21 @@ struct ProfileImageResponse: Codable { extension ProfileServices: TargetType { public var baseURL: URL { - return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2/account")! + guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String, + let url = URL(string: urlString) else { + fatalError("ProfileAPIㅣURL을 불러올 수 없습니다.") + } + return url } - + public var path: String { switch self { case .getProfile: - return "/profile" + return "/account/profile" case .submit: - return "/image" + return "/account/image" case .update: - return "/image" + return "/account/image" case .delete: return "" } diff --git a/Projects/Service/Sources/Services/StudentCouncil/StudentCouncilServices.swift b/Projects/Service/Sources/Services/StudentCouncil/StudentCouncilServices.swift index 7d918960..9a4cf848 100644 --- a/Projects/Service/Sources/Services/StudentCouncil/StudentCouncilServices.swift +++ b/Projects/Service/Sources/Services/StudentCouncil/StudentCouncilServices.swift @@ -15,9 +15,13 @@ public enum StudentCouncilServices { extension StudentCouncilServices: TargetType { public var baseURL: URL { - return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2")! + guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String, + let url = URL(string: urlString) else { + fatalError("StudentCouncilㅣURL을 불러올 수 없습니다.") + } + return url } - + public var path: String { switch self { case .makeQRCode: From 668c2d7938a01b0132c77edf6cea8b9f25367ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cxixn2=E2=80=9D?= Date: Sun, 14 Sep 2025 22:43:07 +0900 Subject: [PATCH 2/4] hotfix --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 25146aef..43cede35 100644 --- a/.gitignore +++ b/.gitignore @@ -79,7 +79,7 @@ Tuist/Dependencies .DS_Store .AppleDouble .LSOverride -XCConfig/*.xcconfig +*.xcconfig # Icon must end with two \r Icon From 40197d46045e50d39c7e7fffa2442a476b47870e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cxixn2=E2=80=9D?= Date: Sun, 14 Sep 2025 22:45:19 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=9A=91=20::=20[#304]=20Cashed=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/App/XCConfig/Release.xcconfig | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 Projects/App/XCConfig/Release.xcconfig diff --git a/Projects/App/XCConfig/Release.xcconfig b/Projects/App/XCConfig/Release.xcconfig deleted file mode 100644 index 61870e7f..00000000 --- a/Projects/App/XCConfig/Release.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -// -// Release.xcconfig -// GOMS-iOS-V2 -// -// Created by 서지완 on 9/14/25. -// Copyright © 2025 HARIBO. All rights reserved. -// - -// Configuration settings file format documentation can be found at: -// https://help.apple.com/xcode/#/dev745c5c974 - -// 학교서버 BaseURL (GOMS V2 Release) -SchoolBaseURL = http:/$()/gsmsv-1.yujun.kr:23235/api/v2 -// 클라우드타입 BaseURL (GOMS V2 Test) -CloudTypeBaseURL = https:/$()/port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app From 86694fd9fee2da8bc457073098d9018e02bd09ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cxixn2=E2=80=9D?= Date: Sun, 14 Sep 2025 22:55:07 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=8E=A8=20::=20[#304]=20Account=20API?= =?UTF-8?q?=20EndPoint=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/App/Support/Info.plist | 2 +- Projects/Service/Sources/Services/Profile/ProfileServices.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects/App/Support/Info.plist b/Projects/App/Support/Info.plist index 09b52326..d5e0df73 100644 --- a/Projects/App/Support/Info.plist +++ b/Projects/App/Support/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.5.0 + 1.5.1 CFBundleVersion 1 CloudTypeBaseURL diff --git a/Projects/Service/Sources/Services/Profile/ProfileServices.swift b/Projects/Service/Sources/Services/Profile/ProfileServices.swift index b6e37bb6..dc63f43d 100644 --- a/Projects/Service/Sources/Services/Profile/ProfileServices.swift +++ b/Projects/Service/Sources/Services/Profile/ProfileServices.swift @@ -29,7 +29,7 @@ extension ProfileServices: TargetType { case .update: return "/account/image" case .delete: - return "" + return "/account" } }