Skip to content

Commit

Permalink
chore: merge develop(#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
sozohoy committed May 21, 2024
2 parents 2eae03c + fa6611d commit 07aaab6
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 0 deletions.
14 changes: 14 additions & 0 deletions GsHometown-iOS/GsHometown-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
AFC8ACB92BF26E39005EAE74 /* ServiceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFC8ACB82BF26E39005EAE74 /* ServiceType.swift */; };
AFC8ACBB2BF26E5C005EAE74 /* ConvenienceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFC8ACBA2BF26E5C005EAE74 /* ConvenienceType.swift */; };
AFC8ACBD2BF26EBC005EAE74 /* OrderServiceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFC8ACBC2BF26EBC005EAE74 /* OrderServiceType.swift */; };
AFDEB6B62BFC5E9100B99E81 /* APITarget+All.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFDEB6B52BFC5E9100B99E81 /* APITarget+All.swift */; };
AFDEB6B82BFC606800B99E81 /* APITarget+Products.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFDEB6B72BFC606800B99E81 /* APITarget+Products.swift */; };
AFDEB6BC2BFC645C00B99E81 /* APITarget+Likes.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFDEB6BB2BFC645C00B99E81 /* APITarget+Likes.swift */; };
DC7A4C152BFAEFB00081EB84 /* DetailTabBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC7A4C142BFAEFB00081EB84 /* DetailTabBarView.swift */; };
DC7A4C192BFB3D4F0081EB84 /* ScrollToTopButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC7A4C182BFB3D4F0081EB84 /* ScrollToTopButton.swift */; };
DCCBE2622BF7489800848D98 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCCBE2612BF7489800848D98 /* DetailViewController.swift */; };
Expand Down Expand Up @@ -177,6 +180,9 @@
AFC8ACB82BF26E39005EAE74 /* ServiceType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceType.swift; sourceTree = "<group>"; };
AFC8ACBA2BF26E5C005EAE74 /* ConvenienceType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConvenienceType.swift; sourceTree = "<group>"; };
AFC8ACBC2BF26EBC005EAE74 /* OrderServiceType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderServiceType.swift; sourceTree = "<group>"; };
AFDEB6B52BFC5E9100B99E81 /* APITarget+All.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "APITarget+All.swift"; sourceTree = "<group>"; };
AFDEB6B72BFC606800B99E81 /* APITarget+Products.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "APITarget+Products.swift"; sourceTree = "<group>"; };
AFDEB6BB2BFC645C00B99E81 /* APITarget+Likes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "APITarget+Likes.swift"; sourceTree = "<group>"; };
DC7A4C142BFAEFB00081EB84 /* DetailTabBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailTabBarView.swift; sourceTree = "<group>"; };
DC7A4C182BFB3D4F0081EB84 /* ScrollToTopButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollToTopButton.swift; sourceTree = "<group>"; };
DCCBE2612BF7489800848D98 /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -425,6 +431,9 @@
isa = PBXGroup;
children = (
AFC8AC2F2BF0FD08005EAE74 /* APITarget.swift */,
AFDEB6B52BFC5E9100B99E81 /* APITarget+All.swift */,
AFDEB6B72BFC606800B99E81 /* APITarget+Products.swift */,
AFDEB6BB2BFC645C00B99E81 /* APITarget+Likes.swift */,
);
path = APITarget;
sourceTree = "<group>";
Expand Down Expand Up @@ -665,6 +674,7 @@
AFC8AC462BF0FD67005EAE74 /* dummy1.swift in Sources */,
AFC8AC832BF10542005EAE74 /* NetworkResult.swift in Sources */,
AF16B19A2BFBB0CE00BF27FD /* DTO.swift in Sources */,
AFDEB6B62BFC5E9100B99E81 /* APITarget+All.swift in Sources */,
AFC8ACBD2BF26EBC005EAE74 /* OrderServiceType.swift in Sources */,
AF99AFE22BF7471A004CC4D1 /* GSNavigationBar.swift in Sources */,
AFC8AC852BF1055F005EAE74 /* Config.swift in Sources */,
Expand All @@ -674,6 +684,7 @@
AFC8AC932BF1EEEA005EAE74 /* PageCell.swift in Sources */,
74C5967C2BF7048400E96991 /* MenuCollectionViewCell.swift in Sources */,
74C596722BF6F73200E96991 /* NearStoreView.swift in Sources */,
AFDEB6BC2BFC645C00B99E81 /* APITarget+Likes.swift in Sources */,
DCCBE2622BF7489800848D98 /* DetailViewController.swift in Sources */,
AFC8ACB02BF22ADD005EAE74 /* UICollectionViewLayout+.swift in Sources */,
74C5969D2BF8CF2E00E96991 /* AllProductCollectionViewCell.swift in Sources */,
Expand All @@ -694,6 +705,7 @@
AFC8AC2A2BEF5585005EAE74 /* GSImage.swift in Sources */,
74C5966D2BF68FF200E96991 /* PreOrderViewController.swift in Sources */,
74C596792BF7026600E96991 /* MenuType.swift in Sources */,
AFDEB6B82BFC606800B99E81 /* APITarget+Products.swift in Sources */,
74C596822BF7209800E96991 /* DiscountEventCollectionViewCell.swift in Sources */,
AFB7D1642BF6720400A2DBE9 /* ServiceReusableView.swift in Sources */,
74C596922BF88F3B00E96991 /* SpecialProductCollectionView.swift in Sources */,
Expand Down Expand Up @@ -871,6 +883,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
BASE_URL = "http://52.79.43.194:8080/";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8R3N359429;
Expand Down Expand Up @@ -900,6 +913,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
BASE_URL = "http://52.79.43.194:8080/";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8R3N359429;
Expand Down
7 changes: 7 additions & 0 deletions GsHometown-iOS/GsHometown-iOS/Common/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BASE_URL</key>
<string>$(BASE_URL)</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// APITarget+All.swift
// GsHometown-iOS
//
// Created by 한지석 on 5/21/24.
//

import Foundation

import Moya

extension APITarget {
enum All {
case getHome
}
}

extension APITarget.All: TargetType {
var baseURL: URL {
return URL(string: Config.baseURL)!
}

var path: String {
"/api"
}

var method: Moya.Method {
.get
}

var task: Moya.Task {
.requestPlain
}

var headers: [String : String]? {
return ["Content-Type": "application/json"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// APITarget+Likes.swift
// GsHometown-iOS
//
// Created by 한지석 on 5/21/24.
//

import Foundation

import Moya

extension APITarget {
enum Likes {
case postLike(DTO.PostLikeRequest)
case deleteLike(DTO.DeleteLikeRequest)
}
}

extension APITarget.Likes: TargetType {
var baseURL: URL {
return URL(string: Config.baseURL)!
}

var path: String {
return "/api/likes"
}

var method: Moya.Method {
switch self {
case .postLike(let postLikeRequest):
return .post
case .deleteLike(let deleteLikeRequest):
return .delete
}
}

var task: Moya.Task {
switch self {
case .postLike(let postLikeRequest):
return .requestParameters(
parameters: ["productId": postLikeRequest.productId],
encoding: JSONEncoding.default
)
case .deleteLike(let deleteLikeRequest):
return .requestParameters(
parameters: ["productId": deleteLikeRequest.productId],
encoding: JSONEncoding.default
)
}
}

var headers: [String : String]? {
return [
"Content-Type": "application/json",
"memberId": "1"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// APITarget+Products.swift
// GsHometown-iOS
//
// Created by 한지석 on 5/21/24.
//

import Foundation

import Moya

extension APITarget {
enum Products {
case getPreorderInfo(DTO.GetPreorderInfoRequest)
case getDetailProduct(DTO.GetDetailProductRequest)
}
}

extension APITarget.Products: TargetType {
var baseURL: URL {
return URL(string: Config.baseURL)!
}

var path: String {
return "/api/products"
}

var method: Moya.Method {
return .get
}

var task: Moya.Task {
switch self {
case .getPreorderInfo(let getPreorderInfoRequest):
return .requestParameters(
parameters: ["type": getPreorderInfoRequest.type],
encoding: URLEncoding.default
)
case .getDetailProduct(let getDetailProductRequest):
return .requestParameters(
parameters: ["productId": getDetailProductRequest.productId],
encoding: URLEncoding.default
)
}
}

var headers: [String : String]? {
switch self {
case .getPreorderInfo(let getPreorderInfoRequest):
return ["Content-Type": "application/json"]
case .getDetailProduct:
return [
"Content-Type": "application/json",
"memberId": "1"
]
}
}
}

0 comments on commit 07aaab6

Please sign in to comment.