Skip to content

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
rlarjsdn3 committed Oct 20, 2024
2 parents e50bba3 + 763efbf commit e142f14
Show file tree
Hide file tree
Showing 86 changed files with 2,256 additions and 346 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ name: Bibbi
on:
push:
branches:
- feat/*
- fix/*
- release
pull_request:
branches:
- release/**
- release
- develop
types:
- closed

jobs:
build:
Expand Down Expand Up @@ -61,7 +62,7 @@ jobs:
run: tuist generate

- name: fastlane upload_prd_testflight
if: github.event.pull_request.base.ref == 'release' && github.head_ref == 'develop'
if: ${{ github.base_ref == 'release' && github.event_name == 'push' }}
env:
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
Expand All @@ -82,7 +83,7 @@ jobs:


- name: fastlane upload_stg_testflight
if: github.event.pull_request.base.ref == 'develop' && startsWith(github.head_ref, 'feat/')
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop' }}
env:
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
Expand Down
4 changes: 2 additions & 2 deletions 14th-team5-iOS/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ private let targets: [Target] = [
"CFBundleDisplayName": .string("Bibbi"),
"CFBundleVersion": .string("1"),
"CFBuildVersion": .string("0"),
"CFBundleShortVersionString": .string("1.2.2"),
"UILaunchStoryboardName": .string("LaunchScreen.storyboard"),
"CFBundleShortVersionString": .string("1.2.3"),
"UILaunchStoryboardName": .string("LaunchScreen"),
"UISupportedInterfaceOrientations": .array([.string("UIInterfaceOrientationPortrait")]),
"UIUserInterfaceStyle": .string("Dark"),
"NSPhotoLibraryAddUsageDescription" : .string("프로필 사진, 피드 업로드를 위한 사진 촬영을 위해 Bibbi가 앨범에 접근할 수 있도록 허용해 주세요"),
Expand Down
1 change: 1 addition & 0 deletions 14th-team5-iOS/App/Sources/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ extension AppDelegate {
return
}
App.Repository.token.clearAccessToken()
KeychainWrapper.standard.removeAllKeys()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ final class AppDIContainer: BaseContainer {
)
}

private func makeFetchFamilyManagementUseCase() -> FetchIsFirstFamilyManagementUseCaseProtocol {
FetchFamilyManagementUseCase(repository: makeAppRepository())
private func makeCheckIsFirstWidgetAlertUseCase() -> IsFirstWidgetAlertUseCaseProtocol {
IsFirstWidgetAlertUseCase(repository: makeAppRepository())
}

private func makeSaveFamilyManagementUseCase() -> UpdateFamilyManagementUseCaseProtocol {
UpdateFamilyManagementUseCase(repository: makeAppRepository())
private func makeSaveWidgetAlertUseCase() -> SaveIsFirstWidgetAlertUseCaseProtocol {
SaveIsFirstWidgetAlertUseCase(repository: makeAppRepository())
}

private func makeFetchFamilyManagementUseCase() -> IsFirstFamilyManagementUseCaseProtocol {
IsFirstFamilyManagementUseCase(repository: makeAppRepository())
}

private func makeSaveFamilyManagementUseCase() -> SaveIsFirstFamilyManagementUseCaseProtocol {
SaveIsFirstFamilyManagementUseCase(repository: makeAppRepository())
}


Expand All @@ -38,11 +46,15 @@ final class AppDIContainer: BaseContainer {
// MARK: - Register

func registerDependencies() {
container.register(type: FetchIsFirstFamilyManagementUseCaseProtocol.self) { _ in
container.register(type: IsFirstWidgetAlertUseCaseProtocol.self) { _ in
self.makeCheckIsFirstWidgetAlertUseCase()
}

container.register(type: IsFirstFamilyManagementUseCaseProtocol.self) { _ in
self.makeFetchFamilyManagementUseCase()
}

container.register(type: UpdateFamilyManagementUseCaseProtocol.self) { _ in
container.register(type: SaveIsFirstFamilyManagementUseCaseProtocol.self) { _ in
self.makeSaveFamilyManagementUseCase()
}

Expand All @@ -58,6 +70,10 @@ final class AppDIContainer: BaseContainer {
container.register(type: AppUserDefaultsType.self) { _ in
return AppUserDefaults()
}

container.register(type: SaveIsFirstWidgetAlertUseCaseProtocol.self) { _ in
return self.makeSaveWidgetAlertUseCase()
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class NavigatorDIContainer: BaseContainer {
}

container.register(type: MainNavigatorProtocol.self) { _ in
MainNavigator(navigationController: makeUINavigationController())
MainNavigator(navigationController: makeUINavigationController())
}

container.register(type: SplashNavigatorProtocol.self) { _ in
Expand Down Expand Up @@ -90,7 +90,7 @@ final class NavigatorDIContainer: BaseContainer {
}

container.register(type: FamilyEntranceNavigatorProtocol.self) { _ in
FamilyEntranceNavigator(navigationController: makeUINavigationController())
FamilyEntranceNavigator(navigationController: makeUINavigationController())
}

container.register(type: JoinFamilyNavigatorProtocol.self) { _ in
Expand All @@ -116,6 +116,10 @@ final class NavigatorDIContainer: BaseContainer {
navigationController: makeUINavigationController()
)
}

container.register(type: InputFamilyLinkNavigatorProtocol.self) { _ in
InputFamilyLInkNavigator(navigationController: makeUINavigationController())
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// InputFamilyLinkNavigator.swift
// App
//
// Created by 마경미 on 30.09.24.
//

import Core
import UIKit

protocol InputFamilyLinkNavigatorProtocol: BaseNavigator {
func toHome()
func pop()
}

final class InputFamilyLInkNavigator: InputFamilyLinkNavigatorProtocol {

// MARK: - Properties

var navigationController: UINavigationController

// MARK: - Intializer

init(navigationController: UINavigationController) {
self.navigationController = navigationController
}

// MARK: - To

func pop() {
navigationController.popViewController(animated: true)
}

func toHome() {
let vc = MainViewControllerWrapper().viewController
navigationController.setViewControllers([vc], animated: true)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ protocol MainNavigatorProtocol: BaseNavigator {
// alert
func showSurvivalAlert()
func pickAlert(_ name: String)
func showWidgetAlert()
func missionUnlockedAlert()


Expand Down Expand Up @@ -51,7 +52,14 @@ final class MainNavigator: MainNavigatorProtocol {
}

func missionUnlockedAlert() {
BBAlert.style(.mission).show()
let handler: BBAlertActionHandler = { [weak self] alert in
self?.toCamera(.survival)
}
BBAlert.style(.takePhoto, primaryAction: handler).show()
}

func showWidgetAlert() {
BBAlert.style(.widget).show()
}

func showToast(_ image: UIImage?, _ message: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public final class AccountSignInViewController: BaseViewController<AccountSignIn
loginStack.snp.makeConstraints {
$0.height.equalTo(124)
$0.horizontalEdges.equalToSuperview().inset(20)
$0.bottom.equalTo(view.safeAreaLayoutGuide).offset(12)
$0.bottom.equalTo(view.safeAreaLayoutGuide).inset(12)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Core
import Data
import Domain
import Foundation

Expand Down Expand Up @@ -109,22 +110,9 @@ final public class CommentViewReactor: Reactor {
Observable<Mutation>.just(.setEnableCommentTextField(false)),

fetchCommentUseCase.execute(postId: postId, query: query)
.withUnretained(self)
.concatMap {
// 통신에 실패한다면
guard let comments = $0.1 else {
Haptic.notification(type: .error)
$0.0.navigator.showFetchFailureToast()
return Observable.concat(
Observable<Mutation>.just(.setComments([])),
Observable<Mutation>.just(.setHiddenTablePrgressHud(true)),
Observable<Mutation>.just(.setHiddenNoneCommentView(true)),
Observable<Mutation>.just(.setHiddenFetchFailureView(false))
)
}

// 댓글이 없다면
if comments.results.isEmpty {
if $0.results.isEmpty {
return Observable.concat(
Observable<Mutation>.just(.setComments([])),
Observable<Mutation>.just(.setBecomeFirstResponder(true)),
Expand All @@ -136,7 +124,7 @@ final public class CommentViewReactor: Reactor {
)
}

let cells = comments.results
let cells = $0.results
.map { CommentCellReactor($0) }

return Observable.concat(
Expand All @@ -150,6 +138,21 @@ final public class CommentViewReactor: Reactor {
Observable<Mutation>.just(.scrollTableToLast(true))
)
}
.catchError(with: self, of: APIWorkerError.self) {
switch $1 {
case .networkFailure:
Haptic.notification(type: .error)
$0.navigator.showFetchFailureToast()
return Observable.concat(
Observable<Mutation>.just(.setComments([])),
Observable<Mutation>.just(.setHiddenTablePrgressHud(true)),
Observable<Mutation>.just(.setHiddenNoneCommentView(true)),
Observable<Mutation>.just(.setHiddenFetchFailureView(false))
)

default: return Observable<Mutation>.empty()
}
}
)

case let .createComment(content):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,12 @@ extension CommentViewController {
cell.reactor = reactor
return cell
}

dataSource.canEditRowAtIndexPath = {
let myMemberId = App.Repository.member.memberID.value
let commentMemberId = $0[$1].currentState.comment.memberId
return myMemberId == commentMemberId
}

return dataSource
return dataSource
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,20 @@ public final class InputFamilyLinkReactor: Reactor {
// MARK: - Mutate
public enum Mutation {
case setLinkString(String)
case setShowHome(Bool)
case setToastMessage(String)
case setPoped(Bool)
}

// MARK: - State
public struct State {
var linkString: String = ""
var isShowHome: Bool = false
@Pulse var showToastMessage: String = ""
var isPoped: Bool = false
}

// MARK: - Properties
public let initialState: State
public let initialState: State = State()
@Injected var familyUseCase: FamilyUseCaseProtocol

@Injected var joinFamilyUseCase: JoinFamilyUseCaseProtocol

init() {
self.initialState = State()
}
@Navigator var navigator: InputFamilyLinkNavigatorProtocol
}

extension InputFamilyLinkReactor {
Expand All @@ -65,7 +57,9 @@ extension InputFamilyLinkReactor {
// Repository에서 이미 UserDefaults와 App.Repository에 저장하고 있음
App.Repository.member.familyId.accept(joinFamilyData.familyId)
App.Repository.member.familyCreatedAt.accept(joinFamilyData.createdAt)
return Observable.just(Mutation.setShowHome(true))

self.navigator.toHome()
return .empty()
}

if App.Repository.member.familyId.value != nil {
Expand Down Expand Up @@ -93,7 +87,8 @@ extension InputFamilyLinkReactor {
}
}
case .tapPopButton:
return Observable.just(Mutation.setPoped(true))
navigator.pop()
return .empty()
}
}

Expand All @@ -103,12 +98,8 @@ extension InputFamilyLinkReactor {
switch mutation {
case let .setLinkString(link):
newState.linkString = link
case let .setShowHome(isShow):
newState.isShowHome = isShow
case let .setToastMessage(message):
newState.showToastMessage = message
case let .setPoped(isPop):
newState.isPoped = isPop
}
return newState
}
Expand Down
Loading

0 comments on commit e142f14

Please sign in to comment.