Skip to content

Commit

Permalink
Merge branch 'release/v4.17.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyunsik-Yoo committed Dec 12, 2024
2 parents 546ddc8 + bb5d670 commit 7f9b161
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 62 deletions.
2 changes: 0 additions & 2 deletions App/Targets/AppInterface/Sources/AppModuleInterface.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public protocol AppModuleInterface {
func createWebViewController(webviewType: WebViewType) -> UIViewController
func shareKakao(storeId: Int, storeType: StoreType, storeDetailOverview: StoreDetailOverview)
func requestATTIfNeeded()
func subscribeMarketingFCMTopic(completion: @escaping ((Error?) -> Void))
func unsubscribeMarketingFCMTopic(completion: @escaping ((Error?) -> Void))
func showFrontAdmob(adType: AdType, viewController: UIViewController)
func createBookmarkURL(folderId: String, name: String) async -> String

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,6 @@ final class AppModuleInterfaceImpl: NSObject, AppModuleInterface {
Analytics.setUserProperty(String(age), forName: "user_age")
}

func subscribeMarketingFCMTopic(completion: @escaping ((Error?) -> Void)) {
Messaging.messaging().subscribe(toTopic: "marketing_ios", completion: completion)
}

func unsubscribeMarketingFCMTopic(completion: @escaping ((Error?) -> Void)) {
Messaging.messaging().unsubscribe(fromTopic: "marketing_ios", completion: completion)
}

func showFrontAdmob(adType: AdType, viewController: UIViewController) {
let request = GADRequest()
GADInterstitialAd.load(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ final class SplashViewController: BaseViewController {

setupUI()
setupNotification()
viewModel.input.load.send(())
}

override var preferredStatusBarStyle: UIStatusBarStyle {
Expand Down
9 changes: 0 additions & 9 deletions Modules/Core/Common/Sources/Preference.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ public final class Preference {
}
}

public var subscribedMarketingTopic: Bool {
get {
instance.bool(forKey: "KEY_SUBSCRIBE_MARKETING_TOPIC")
}
set {
instance.set(newValue, forKey: "KEY_SUBSCRIBE_MARKETING_TOPIC")
}
}

public func setShownMainBannerDate(id: Int) {
instance.set(DateUtils.todayString(), forKey: "KEY_SHOWN_MAIN_BANNER_\(id)")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,8 @@ final class HomeViewModel: BaseViewModel {
.compactMapValue()
.withUnretained(self)
.sink { (owner: HomeViewModel, user: UserDetailResponse) in
switch MarketingConsent(value: user.settings.marketingConsent) {
case .approve:
owner.subscribeMarketingTopic()
case .unverified:
owner.output.route.send(.presentPolicy)
case .deny, .unknown:
break
}
guard MarketingConsent(value: user.settings.marketingConsent) == .unverified else { return }
owner.output.route.send(.presentPolicy)
}
.store(in: &cancellables)

Expand Down Expand Up @@ -619,18 +613,6 @@ final class HomeViewModel: BaseViewModel {
.store(in: &viewModel.cancellables)
}

private func subscribeMarketingTopic() {
guard !dependency.preference.subscribedMarketingTopic else { return }

dependency.appModuleInterface.subscribeMarketingFCMTopic { [weak self] error in
if let error {
self?.output.route.send(.showErrorAlert(error))
} else {
self?.dependency.preference.subscribedMarketingTopic = true
}
}
}

private func hiddenTooltip() {
guard dependency.preference.isShownFilterTooltip.isNot else { return }
dependency.preference.isShownFilterTooltip = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ final class PolicyViewModel: Common.BaseViewModel {
output.route.send(.showLoading(isShow: false))
switch changeMarketingConsent {
case .success(_):
subscribeMarketingTopic()

output.route.send(.dismiss)
case .failure(let error):
output.route.send(.showErrorAlert(error))
}
Expand All @@ -121,15 +120,4 @@ final class PolicyViewModel: Common.BaseViewModel {
}
}
}

private func subscribeMarketingTopic() {
appInterface.subscribeMarketingFCMTopic { [weak self] error in
if let error {
self?.output.route.send(.showErrorAlert(error))
} else {
self?.preference.subscribedMarketingTopic = true
self?.output.route.send(.dismiss)
}
}
}
}
8 changes: 0 additions & 8 deletions Modules/Mock/Sources/MockAppModuleInterfaceImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ public final class MockAppModuleInterfaceImpl: AppModuleInterface {

public func sendEvent(name: String, parameters: [String : Any]?) { }

public func subscribeMarketingFCMTopic(completion: @escaping ((Error?) -> Void)) {
ToastManager.shared.show(message: "subscribeMarketingFCMTopic")
}

public func unsubscribeMarketingFCMTopic(completion: @escaping ((Error?) -> Void)) {
ToastManager.shared.show(message: "unsubscribeMarketingFCMTopic")
}

public func presentMailComposeViewController(nickname: String, targetViewController: UIViewController) {
ToastManager.shared.show(message: "presentMailComposeViewController")
}
Expand Down
2 changes: 1 addition & 1 deletion Tuist/ProjectDescriptionHelpers/DefaultSetting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ProjectDescription

public struct DefaultSetting {
public static let targetVersion: SettingValue = "14.0"
public static let appVersion: SettingValue = "4.17.0"
public static let appVersion: SettingValue = "4.17.1"
public static let buildNumber: SettingValue = "1"
public static let organizationName = "macgongmon"
public static let appIdentifier = "-dollar-in-my-pocket"
Expand Down

0 comments on commit 7f9b161

Please sign in to comment.