Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
๐Ÿš€ :: Deploy version 1.2.0 to AppStore
Browse files Browse the repository at this point in the history
  • Loading branch information
hongsjae committed Oct 6, 2023
2 parents 1f7e1fa + 30d2a93 commit 93cef4a
Show file tree
Hide file tree
Showing 38 changed files with 335 additions and 235 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ clean:
rm -rf **/*.xcodeproj
rm -rf *.xcworkspace

cache_clean:
rm -rf ~/Library/Developer/Xcode/DerivedData/*

reset:
tuist clean
rm -rf **/*.xcodeproj
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ public extension TargetDependency.Core {
}

public extension TargetDependency.Shared {
static let Environment = TargetDependency.project(
target: ModulePaths.Shared.Environment.targetName(type: .sources),
path: .relativeToShared(ModulePaths.Shared.Environment.rawValue)
)
static let DesignSystem = TargetDependency.project(
target: ModulePaths.Shared.DesignSystem.targetName(type: .sources),
path: .relativeToShared(ModulePaths.Shared.DesignSystem.rawValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public extension ModulePaths {

public extension ModulePaths {
enum Shared: String {
case Environment
case DesignSystem
case UtilityModule
case GlobalThirdPartyLibrary
Expand Down
4 changes: 1 addition & 3 deletions Projects/App/Support/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<dict>
<key>AppIdentifierPrefix</key>
<string>$(AppIdentifierPrefix)</string>
<key>BASE_URL</key>
<string>$(API_BASE_URL)</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand All @@ -21,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.1.2</string>
<string>1.2.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>ITSAppUsesNonExemptEncryption</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!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>$(API_BASE_URL)</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand Down
6 changes: 2 additions & 4 deletions Projects/Domain/BaseDomain/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ let project = Project.makeModule(
internalDependencies: [
.Core.JwtStoreInterface,
.Shared.GlobalThirdPartyLibrary,
.Shared.UtilityModule
],
additionalPlistRows: [
"BASE_URL": .string("$(API_BASE_URL)")
.Shared.UtilityModule,
.Shared.Environment
]
)
7 changes: 2 additions & 5 deletions Projects/Domain/BaseDomain/Sources/JobisAPI.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation
import Moya
import Environment

public protocol JobisAPI: TargetType, JwtAuthorizable {
associatedtype ErrorType: Error
Expand All @@ -9,11 +10,7 @@ public protocol JobisAPI: TargetType, JwtAuthorizable {
}

public extension JobisAPI {
var baseURL: URL {
URL(
string: Bundle.main.object(forInfoDictionaryKey: "BASE_URL") as? String ?? ""
) ?? URL(string: "https://www.google.com")!
}
var baseURL: URL { Environment.getUrlValue(key: .apiBaseUrl) }

var path: String {
domain.asURLString + urlPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct RecruitmentEntity: Equatable, Hashable {
public let military: Bool
public let totalHiring: Int
public let jobCodeList: String
public let bookmarked: Bool
public var bookmarked: Bool

public init(
recruitID: Int,
Expand Down
32 changes: 14 additions & 18 deletions Projects/Feature/MyPageFeature/Sources/MyPage/MyPageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,21 @@ struct MyPageView: View {
ScrollView {
VStack(spacing: 40) {
HStack(spacing: 22) {
VStack {
ZStack(alignment: .bottomTrailing) {
Group {
URLImage(
imageURL: viewModel.studentInfo?.profileImageUrl ?? "",
shape: .square(85)
)
}
.frame(width: 85, height: 85)
ZStack(alignment: .bottomTrailing) {
URLImage(
imageURL: viewModel.studentInfo?.profileImageUrl ?? "",
shape: .square(85)
)
.frame(width: 85, height: 85)
.clipShape(Circle())

Image(systemName: "pencil.circle.fill")
.resizable()
.frame(width: 26, height: 26)
.foregroundColor(.Main.lightBlue)
.background(Color.white)
.clipShape(Circle())

Image(systemName: "pencil.circle.fill")
.resizable()
.frame(width: 26, height: 26)
.foregroundColor(.Main.lightBlue)
.background(Color.white)
.clipShape(Circle())
.unredacted()
}
.unredacted()
}
.onTapGesture {
viewModel.isShowImagePicker.toggle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,58 +25,57 @@ struct RecruitmentDetailView: View {
var body: some View {
ZStack {
if let detailInfo = viewModel.recruitmentDetail {
ScrollView {
LazyVStack(alignment: .leading, spacing: 10) {
HStack(spacing: 12) {
URLImage(imageURL: detailInfo.companyProfileUrl, shape: .square(80))
.cornerRadius(15)

Text(detailInfo.companyName)
.JOBISFont(.body(.body1), color: .Sub.gray90)
}
.padding(.bottom, 2)

if !isDetail {
GrayBtn(text: "๊ธฐ์—… ๋ณด๊ธฐ", size: .large) {
viewModel.isNavigateCompanyDetail.toggle()
VStack {
ScrollView {
LazyVStack(alignment: .leading, spacing: 10) {
HStack(spacing: 12) {
URLImage(imageURL: detailInfo.companyProfileUrl, shape: .square(80))
.cornerRadius(15)

Text(detailInfo.companyName)
.JOBISFont(.body(.body1), color: .Sub.gray90)
}
.padding(.bottom, 2)

if !isDetail {
GrayBtn(text: "๊ธฐ์—… ๋ณด๊ธฐ", size: .large) {
viewModel.isNavigateCompanyDetail.toggle()
}
.navigate(
to: findCompanyDetailFactory.makeView(
id: String(detailInfo.companyID),
isDetail: true
).eraseToAnyView(),
when: $viewModel.isNavigateCompanyDetail
)
}
.navigate(
to: findCompanyDetailFactory.makeView(
id: String(detailInfo.companyID),
isDetail: true
).eraseToAnyView(),
when: $viewModel.isNavigateCompanyDetail
)
}

Divider()
.foregroundColor(.Sub.gray40)
Divider()
.foregroundColor(.Sub.gray40)

VStack(alignment: .leading, spacing: 10) {
recruitmentInfoCell(
title: "๋ชจ์ง‘๊ธฐ๊ฐ„",
content: detailInfo.startDate + " ~ " + detailInfo.endDate
)
VStack(alignment: .leading, spacing: 10) {
recruitmentInfoCell(
title: "๋ชจ์ง‘๊ธฐ๊ฐ„",
content: detailInfo.startDate + " ~ " + detailInfo.endDate
)

areaView(areas: detailInfo.areas)
areaView(areas: detailInfo.areas)

ForEach(Array(zip(viewModel.titles, viewModel.contents)), id: \.0) { title, content in
recruitmentInfoCell(title: title, content: content)
ForEach(Array(zip(viewModel.titles, viewModel.contents)), id: \.0) { title, content in
recruitmentInfoCell(title: title, content: content)
}
}
}
.padding(.horizontal, 20)
}
.padding(.bottom, 100)
.padding(.horizontal, 20)
}

VStack {
Spacer()

SolidBtn(text: "์ง€์›ํ•˜๊ธฐ", size: .large) {
viewModel.isTappedApplyButton.toggle()
}
.padding(.vertical, 10)
.padding(.horizontal, 20)
}
.padding(.horizontal, 20)

Color.black
.opacity(viewModel.isTappedApplyButton ? 0.2 : 0)
Expand All @@ -100,6 +99,7 @@ struct RecruitmentDetailView: View {
.frame(maxHeight: .infinity)
}
}
.frame(maxHeight: .infinity)
.navigationBarTitleDisplayMode(.inline)
.onAppear {
viewModel.onAppear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@ import DesignSystem
import Kingfisher

struct RecruitmentListCell: View {
@State private var isBookmarked: Bool = false
let recruitmentEntity: RecruitmentEntity
@Binding var recruitmentEntitys: [RecruitmentEntity]
let index: Int
let bookmark: () -> Void

private let recruitmentDetailFactory: any RecruitmentDetailFactory

init(
recruitmentEntity: RecruitmentEntity,
recruitmentEntitys: Binding<[RecruitmentEntity]>,
index: Int,
recruitmentDetailFactory: any RecruitmentDetailFactory,
bookmark: @escaping () -> Void
) {
self.recruitmentEntity = recruitmentEntity
_recruitmentEntitys = recruitmentEntitys
self.index = index
self.bookmark = bookmark
self.recruitmentDetailFactory = recruitmentDetailFactory
}

var body: some View {
let recruitmentEntity = recruitmentEntitys[index]
NavigationLink {
recruitmentDetailFactory.makeView(
id: "\(recruitmentEntity.recruitID)", isDetail: false
Expand All @@ -33,7 +36,7 @@ struct RecruitmentListCell: View {
.cornerRadius(15)
.padding(8)

VStack(alignment: .leading, spacing: 4) {
VStack(alignment: .leading, spacing: 0) {
Text(recruitmentEntity.jobCodeList)
.multilineTextAlignment(.leading)
.JOBISFont(.body(.body2), color: .Sub.gray90)
Expand All @@ -42,25 +45,28 @@ struct RecruitmentListCell: View {
.JOBISFont(.etc(.caption), color: .Sub.gray60)

Spacer()

Text("์‹ค์Šต ์ˆ˜๋‹น \(recruitmentEntity.trainPay.intComma())๋งŒ์›")
.JOBISFont(.etc(.caption), color: .Sub.gray70)
}
.padding(.leading, 8)
.padding(.top, 14)
.padding(.vertical, 14)

Spacer()

VStack {
JOBISIcon(self.isBookmarked ? .bookmarkOn : .bookmarkOff)
JOBISIcon(recruitmentEntity.bookmarked ? .bookmarkOn : .bookmarkOff)
.frame(width: 12, height: 16)
.padding(5)
.onTapGesture {
isBookmarked.toggle()
recruitmentEntitys[index].bookmarked.toggle()
bookmark()
}

Spacer()

JOBISIcon(.militaryServiceExceptionIcon)
.frame(width: 16, height: 16)
.frame(width: 20, height: 20)
.opacity(recruitmentEntity.military ? 1 : 0)
}
.padding(.vertical, 14)
Expand All @@ -70,9 +76,6 @@ struct RecruitmentListCell: View {
.background(Color.Sub.gray10)
.cornerRadius(15)
.shadow(color: .black, opacity: 0.1, blur: 4)
.onAppear {
self.isBookmarked = self.recruitmentEntity.bookmarked
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,22 @@ struct RecruitmentView: View {
LazyVStack {
searchBar()

if let list = viewModel.recruitmentList {
ForEach(list.recruitments, id: \.self) { recruitmentEntity in
navigateToRecruitmentDetail(recruitmentEntity: recruitmentEntity)
if !viewModel.recruitmentList.recruitments.isEmpty {
ForEach(0..<viewModel.recruitmentList.recruitments.count, id: \.self) { index in
Button {
viewModel.isNavigateRecruitmentDetail.toggle()
} label: {
RecruitmentListCell(
recruitmentEntitys: $viewModel.recruitmentList.recruitments,
index: index,
recruitmentDetailFactory: recruitmentDetailFactory
) {
viewModel.bookmark(id: viewModel.recruitmentList.recruitments[index].recruitID)
}
}
.onAppear {
viewModel.appendRecruitmentList(list: viewModel.recruitmentList.recruitments[index])
}
}
} else {
ProgressView().progressViewStyle(.circular)
Expand Down Expand Up @@ -92,21 +105,4 @@ struct RecruitmentView: View {
.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
}

@ViewBuilder
func navigateToRecruitmentDetail(recruitmentEntity: RecruitmentEntity) -> some View {
Button {
viewModel.isNavigateRecruitmentDetail.toggle()
} label: {
RecruitmentListCell(
recruitmentEntity: recruitmentEntity,
recruitmentDetailFactory: recruitmentDetailFactory
) {
viewModel.bookmark(id: recruitmentEntity.recruitID)
}
}
.onAppear {
viewModel.appendRecruitmentList(list: recruitmentEntity)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class RecruitmentViewModel: BaseViewModel {
@Published var filteringName: String = ""
@Published var listPage: Int = 1

@Published var recruitmentList: RecruitmentListEntity?
@Published var recruitmentList: RecruitmentListEntity = .init(recruitments: [])
@Published var selectedJobCode: CodeEntity? {
didSet {
fetchCodeList(codeType: .tech, code: selectedJobCode?.code)
Expand Down Expand Up @@ -75,7 +75,7 @@ final class RecruitmentViewModel: BaseViewModel {
}

func appendRecruitmentList(list: RecruitmentEntity) {
guard self.recruitmentList?.recruitments.last == list else { return }
guard self.recruitmentList.recruitments.last == list else { return }
var jobCode: String? {
guard let selectedJobCode = selectedJobCode?.code else { return nil }
return String(selectedJobCode)
Expand All @@ -90,7 +90,7 @@ final class RecruitmentViewModel: BaseViewModel {
name: companyText.isEmpty ? nil : companyText
)
) { [weak self] recruitmentList in
self?.recruitmentList?.recruitments.append(contentsOf: recruitmentList.recruitments)
self?.recruitmentList.recruitments.append(contentsOf: recruitmentList.recruitments)
}
}

Expand Down
Loading

0 comments on commit 93cef4a

Please sign in to comment.