diff --git a/GMERemittance/AppDelegate.swift b/GMERemittance/AppDelegate.swift
index 1166af9d..40f9eba3 100644
--- a/GMERemittance/AppDelegate.swift
+++ b/GMERemittance/AppDelegate.swift
@@ -60,6 +60,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
setupNavBar()
setEntryPoint()
+ UserDefaults.standard.removeObject(forKey: AppConstants.isOpenedTokenRenwalAlert)
+ UserDefaults.standard.removeObject(forKey: AppConstants.isOpenedPopupNotification)
return true
}
diff --git a/GMERemittance/Info.plist b/GMERemittance/Info.plist
index 5bb61242..987b7f85 100644
--- a/GMERemittance/Info.plist
+++ b/GMERemittance/Info.plist
@@ -30,7 +30,7 @@
CFBundleVersion
- 1
+ 2
Fabric
APIKey
diff --git a/GMERemittance/Module/Home/User Interface/View/HomeViewController.swift b/GMERemittance/Module/Home/User Interface/View/HomeViewController.swift
index 2fde15c6..cd41962a 100644
--- a/GMERemittance/Module/Home/User Interface/View/HomeViewController.swift
+++ b/GMERemittance/Module/Home/User Interface/View/HomeViewController.swift
@@ -237,8 +237,6 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout {
presenter?.showPennyTest()
}
- private func update() {
- let platform = self.user?.platforms ?? []
guard let ios = platform.filter({ $0.os ?? "" == "IOS"}).first else {return}
let critical = ios.critical ?? "N"
@@ -777,7 +775,7 @@ extension HomeViewController {
}
private func checkKFTCToken() {
- if !isShowTokenRenewAlert {
+ if !UserDefaults.standard.bool(forKey: AppConstants.isOpenedTokenRenwalAlert) {
// TODO: Show Alert for token refresh (navigation push)
guard
let remind = UserDefaults.standard.string(forKey: UserKeys.remindKFTCTokenDay),
@@ -798,11 +796,11 @@ extension HomeViewController {
cancelTitle: "later_text".localized(),
okAction: {
AutoDebitWireframe().pushMainView(on: self)
- self.isShowTokenRenewAlert = true
- },
+ UserDefaults.standard.set(true, forKey: AppConstants.isOpenedTokenRenwalAlert)
+ },
cancelAction : {
- self.isShowTokenRenewAlert = true
self.popUpNotification()
+ UserDefaults.standard.set(true, forKey: AppConstants.isOpenedTokenRenwalAlert)
}
)
} else {
@@ -812,8 +810,6 @@ extension HomeViewController {
}
private func popUpNotification() {
- self.isShowTokenRenewAlert = true
-
// FIXME: Temporary expire date
let dateformat = DateFormatter()
dateformat.dateFormat = "yyyy-MM-dd"
diff --git a/GMERemittance/Module/Main/User Interface/Wireframe/MainWireframe.swift b/GMERemittance/Module/Main/User Interface/Wireframe/MainWireframe.swift
index 7272ab99..ca12e345 100644
--- a/GMERemittance/Module/Main/User Interface/Wireframe/MainWireframe.swift
+++ b/GMERemittance/Module/Main/User Interface/Wireframe/MainWireframe.swift
@@ -97,6 +97,8 @@ extension MainWireframe: MainWireframeInput {
store.removeObject(forKey: AppConstants.dateOfDontShowNotification)
store.removeObject(forKey: AppConstants.dateOfExpireNotification)
+ store.removeObject(forKey: AppConstants.isOpenedTokenRenwalAlert)
+ store.removeObject(forKey: AppConstants.isOpenedPopupNotification)
KeyChain.shared.save(data: "0", key: .login)
diff --git a/GMERemittance/Module/PopupNotification/User Interface/View/PopupNotificationViewController.swift b/GMERemittance/Module/PopupNotification/User Interface/View/PopupNotificationViewController.swift
index ce404ba7..183cd247 100644
--- a/GMERemittance/Module/PopupNotification/User Interface/View/PopupNotificationViewController.swift
+++ b/GMERemittance/Module/PopupNotification/User Interface/View/PopupNotificationViewController.swift
@@ -32,6 +32,7 @@ class PopupNotificationViewController: UIViewController {
// MARK: IBActions
@IBAction func touchDontShowAgainTodayButton(_ sender: UIButton) {
+ UserDefaults.standard.set(true, forKey: AppConstants.isOpenedPopupNotification)
// TODO: now를 기록.
let now = Date()
UserDefaults.standard.set(now, forKey: AppConstants.dateOfDontShowNotification)
@@ -39,6 +40,7 @@ class PopupNotificationViewController: UIViewController {
}
@IBAction func touchOkButton(_ sender: UIButton) {
+ UserDefaults.standard.set(true, forKey: AppConstants.isOpenedPopupNotification)
dismiss(animated: true, completion: nil)
}
diff --git a/GMERemittance/Module/PopupNotification/User Interface/Wireframe/PopupNotificationWireframe.swift b/GMERemittance/Module/PopupNotification/User Interface/Wireframe/PopupNotificationWireframe.swift
index 76a3fea6..b414d673 100644
--- a/GMERemittance/Module/PopupNotification/User Interface/Wireframe/PopupNotificationWireframe.swift
+++ b/GMERemittance/Module/PopupNotification/User Interface/Wireframe/PopupNotificationWireframe.swift
@@ -57,6 +57,8 @@ extension PopupNotificationWireframe: PopupNotificationWireframeInput {
UserDefaults.standard.removeObject(forKey: AppConstants.dateOfDontShowNotification)
}
- source.present(getMainView(), animated: true, completion: nil)
+ if !UserDefaults.standard.bool(forKey: AppConstants.isOpenedPopupNotification) {
+ source.present(getMainView(), animated: true, completion: nil)
+ }
}
}
diff --git a/GMERemittance/Utility/AppConstants.swift b/GMERemittance/Utility/AppConstants.swift
index 6f32c368..78d80d3e 100644
--- a/GMERemittance/Utility/AppConstants.swift
+++ b/GMERemittance/Utility/AppConstants.swift
@@ -35,6 +35,8 @@ class AppConstants {
static let accessTokenExpTime = "accessTokenExpTime"
static let dateOfDontShowNotification = "dateOfDontShowNotification"
static let dateOfExpireNotification = "dateOfExpireNotification"
+ static let isOpenedTokenRenwalAlert = "isOpenedTokenRenwalAlert"
+ static let isOpenedPopupNotification = "isOpenedPopupNotification"
}
enum Devices {