Skip to content
Merged
6 changes: 3 additions & 3 deletions Atcha-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2516,7 +2516,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 23SCTLK482;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -2563,7 +2563,7 @@
CODE_SIGN_ENTITLEMENTS = "Atcha-iOS/Atcha-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 23SCTLK482;
EXCLUDED_ARCHS = "";
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -2611,7 +2611,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 23SCTLK482;
FRAMEWORK_SEARCH_PATHS = (
Expand Down
21 changes: 1 addition & 20 deletions Atcha-iOS/Core/Network/Token/TokenInterceptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ final class TokenInterceptor: RequestInterceptor, @unchecked Sendable {
return
}

let actualHeaders = request.request?.allHTTPHeaderFields ?? [:]

guard let refreshToken = tokenStorage.refreshToken else {
SessionController.shared.expireAndRouteToLogin()
completion(.doNotRetry)
Expand Down Expand Up @@ -109,24 +107,7 @@ final class TokenInterceptor: RequestInterceptor, @unchecked Sendable {
waiters.forEach { $0(.doNotRetry) }
return
}

let successBody = [
"newAccessToken": p.accessToken,
"newRefreshToken": p.refreshToken
]

DiscordWebhookManager.shared.sendErrorLog(
baseURL: NetworkConstant.baseURL,
statusCode: 200,
method: "GET",
path: "/auth/reissue",
responseCode: "REISSUE_SUCCESS",
message: "토큰 재발급에 성공하여 새로운 토큰을 수신했습니다.",
requestHeaders: actualHeaders,
requestBody: successBody, // 여기서 받은 토큰 정보를 보냅니다.
requestParameters: nil
)


self.tokenStorage.accessToken = p.accessToken
self.tokenStorage.refreshToken = p.refreshToken

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "setting_home_mark.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "setting_home_mark@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "setting_home_mark@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 68 additions & 1 deletion Atcha-iOS/Presentation/Location/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ final class MainViewController: BaseViewController<MainViewModel>,
if viewModel.isGuest { return false }
return viewModel.isGuideActiveInSession
}
private var guestTapCount = 0

// MARK: - Life Cycle

Expand Down Expand Up @@ -152,6 +153,12 @@ final class MainViewController: BaseViewController<MainViewModel>,
}
}
}

self.guestTapCount = 0
if viewModel.isGuest {
ballonView.isHidden = true
ballonView.alpha = 0
}
}

override func viewDidAppear(_ animated: Bool) {
Expand Down Expand Up @@ -229,6 +236,8 @@ final class MainViewController: BaseViewController<MainViewModel>,
flagImageView.image = UIImage.settingLocationMark
atchaImageView.isUserInteractionEnabled = true
atchaImageView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleBallonTap)))
ballonView.isUserInteractionEnabled = true
ballonView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleBallonTap)))

ballonView.isHidden = true
ballonView.alpha = 0
Expand Down Expand Up @@ -309,6 +318,7 @@ extension MainViewController {
observeArrival()
observeScheduledArrivalTimeout()
observeAlarmTimeout()
observeLoginDismissal()
}

private func bindPermissionAlert() {
Expand Down Expand Up @@ -956,6 +966,13 @@ extension MainViewController {
}

@objc private func handleBallonTap() {
safeStartJump()

if viewModel.isGuest {
handleGuestBallonTap()
return
}

// 알람 등록 후(departure 상태)일 때만 반응
guard viewModel.bottomType == .departure else { return }

Expand Down Expand Up @@ -1014,6 +1031,31 @@ extension MainViewController {
postAlarmTapIndex += 1
}
}

private func handleGuestBallonTap() {
if guestTapCount == 0 {
// 첫 번째 터치: "궁금하면 로그인 해봐요!"
guestTapCount = 1

ballonView.layer.removeAllAnimations()
ballonView.isHidden = false
ballonView.alpha = 1

ballonView.setupTitle(topMessage: nil, bottomMessage: "궁금하면 로그인 해봐요!")
ballonView.animateStaggered(secondaryDelay: 0, fade: 0.25)

} else {
// 두 번째 터치: 로그인 시트 노출
guestTapCount = 0 // 카운트 리셋

// [중요] 말풍선을 즉시 숨김 상태로 만들어야 시트가 내려간 뒤 다시 Persistent(???원) 메시지가 나타납니다.
ballonView.layer.removeAllAnimations()
ballonView.isHidden = true
ballonView.alpha = 0

presentLoginAlert()
}
}
}

// MARK: - Map Delegate & Gesture
Expand Down Expand Up @@ -1233,6 +1275,10 @@ extension MainViewController {
private func showOrUpdatePersistentBalloon(isFirstVisit: Bool, isServiceRegion: Bool?, fareStr: String?) {
guard !isShowingToast else { return }

if viewModel.isGuest && guestTapCount == 1 {
return
}

// [수정] 우리가 정의한 로그인 기반 가이드 로직 적용
let showGuideLine = shouldShowMapGuide
let topText: String? = showGuideLine ? "지도를 움직여 출발지를 설정해요" : nil
Expand All @@ -1242,7 +1288,7 @@ extension MainViewController {
} else {
if viewModel.isGuest {
// 비로그인: 가이드 없이 ???원만 노출
ballonView.separationTitle(grayMessage: "여기서 막차 놓치면 택시비 ", whiteMessage: "???원", showTopLine: false)
ballonView.separationTitle(grayMessage: "여기서 막차 놓치면 택시비 ", whiteMessage: "???원", showTopLine: false)
} else {
// 로그인 상태
if let fare = fareStr {
Expand Down Expand Up @@ -1315,4 +1361,25 @@ extension MainViewController {
balloonHideWorkItem = workItem
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0, execute: workItem)
}

private func observeLoginDismissal() {
NotificationCenter.default.publisher(for: NSNotification.Name("LoginSheetDismissed"))
.receive(on: RunLoop.main)
.sink { [weak self] _ in
guard let self = self else { return }

// 로그인 시트가 내려갔으니 guestTapCount도 초기화해주는 게 자연스러워요
self.guestTapCount = 0

// 현재 검색 모드라면 다시 고정 말풍선 노출
if self.viewModel.bottomType == .search || self.viewModel.bottomType == nil {
self.showOrUpdatePersistentBalloon(
isFirstVisit: self.isFirstVisit,
isServiceRegion: self.latestIsServiceRegion,
fareStr: self.latestFareString
)
}
}
.store(in: &cancellables)
}
}
1 change: 1 addition & 0 deletions Atcha-iOS/Presentation/Login/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ extension LoginViewController {
self.containerView.transform = CGAffineTransform(translationX: 0, y: self.sheetHeight)
}) { _ in
self.dismiss(animated: false) {
NotificationCenter.default.post(name: NSNotification.Name("LoginSheetDismissed"), object: nil)
self.viewModel.loginCancelled?()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,10 @@ final class PushAlarmSheetViewController: BaseViewController<PushAlarmSheetViewM
self.selectedOption = option

self.updateVolumeSliderVisibility(for: option)
// 매니저의 옵션을 먼저 변경한 뒤 미리보기 호출

// 매니저에 옵션 먼저 설정
AlarmManager.shared.setAlarmOption(option)
if option != .onlyVibration {
AlarmManager.shared.previewAlarmVolume(self.volumeSlider.value)
} else {
AlarmManager.shared.stopPreview()
}
AlarmManager.shared.previewAlarmVolume(self.volumeSlider.value)
}

listView.snp.makeConstraints { $0.height.equalTo(52) }
Expand Down
2 changes: 1 addition & 1 deletion Atcha-iOS/Presentation/Splash/SplashViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ final class SplashViewController: BaseViewController<SplashViewModel> {

// 서버 버전이 앱 버전보다 높다면 업데이트가 필요한 상황
if isVersion(appVersion, lessThan: serverVersion) {
showUpdatePopup(isEssential: true)
showUpdatePopup(isEssential: false)
} else {
viewModel.makeInitialFlow()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ final class HomeFindViewController: BaseViewController<HomeFindViewModel>,
backButton)

mapContainerView.delegate = self
flagImageView.image = UIImage.settingLocationMark
flagImageView.image = UIImage.settingHomeMark
backButton.setImage(UIImage.chevronLeft, for: .normal)
backButton.tintColor = .white
backButton.backgroundColor = .black
Expand Down
Loading