diff --git a/DontBe-iOS/DontBe-iOS/Presentation/Home/ViewControllers/HomeViewController.swift b/DontBe-iOS/DontBe-iOS/Presentation/Home/ViewControllers/HomeViewController.swift index 12754ab8..ca2d56bb 100644 --- a/DontBe-iOS/DontBe-iOS/Presentation/Home/ViewControllers/HomeViewController.swift +++ b/DontBe-iOS/DontBe-iOS/Presentation/Home/ViewControllers/HomeViewController.swift @@ -26,6 +26,7 @@ final class HomeViewController: UIViewController { var hasAppearedBefore = false var reportTargetNickname: String = "" var relateText: String = "" + let warnUserURL = URL(string: StringLiterals.Network.warnUserGoogleFormURL) var transparentReasonView = DontBePopupReasonView() var deletePostPopupVC = DeletePopupViewController(viewModel: DeletePostViewModel(networkProvider: NetworkService())) @@ -44,8 +45,6 @@ final class HomeViewController: UIViewController { private lazy var fifthReason = self.transparentReasonView.fifthReasonView.radioButton.publisher(for: .touchUpInside).map { _ in }.eraseToAnyPublisher() private lazy var sixthReason = self.transparentReasonView.sixthReasonView.radioButton.publisher(for: .touchUpInside).map { _ in }.eraseToAnyPublisher() private lazy var isPushAllowed = PassthroughSubject() - - let warnUserURL = NSURL(string: "\(StringLiterals.Network.warnUserGoogleFormURL)") // MARK: - UI Components @@ -745,6 +744,12 @@ extension HomeViewController: DontBePopupDelegate { func confirmButtonTapped() { reportPopupView.removeFromSuperview() + let warnView: SFSafariViewController + if let warnURL = self.warnUserURL { + warnView = SFSafariViewController(url: warnURL) + self.present(warnView, animated: true, completion: nil) + } + Task { do { if let accessToken = KeychainWrapper.loadToken(forKey: "accessToken") { diff --git a/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift b/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift index 1e4ae257..2c944b26 100644 --- a/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift +++ b/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift @@ -818,6 +818,12 @@ extension MyPageViewController: DontBePopupDelegate { } else { rootView.reportPopupView.removeFromSuperview() + let warnView: SFSafariViewController + if let warnURL = self.warnUserURL { + warnView = SFSafariViewController(url: warnURL) + self.present(warnView, animated: true, completion: nil) + } + Task { do { if let accessToken = KeychainWrapper.loadToken(forKey: "accessToken") { diff --git a/DontBe-iOS/DontBe-iOS/Presentation/Post/ViewControllers/PostDetailViewController.swift b/DontBe-iOS/DontBe-iOS/Presentation/Post/ViewControllers/PostDetailViewController.swift index 7fdd1a3a..0d8eae5a 100644 --- a/DontBe-iOS/DontBe-iOS/Presentation/Post/ViewControllers/PostDetailViewController.swift +++ b/DontBe-iOS/DontBe-iOS/Presentation/Post/ViewControllers/PostDetailViewController.swift @@ -29,8 +29,6 @@ final class PostDetailViewController: UIViewController { var collectionHeaderView: PostDetailCollectionHeaderView? - let warnUserURL = NSURL(string: "\(StringLiterals.Network.warnUserGoogleFormURL)") - let viewModel: PostDetailViewModel private var cancelBag = CancelBag() @@ -55,6 +53,7 @@ final class PostDetailViewController: UIViewController { var contentText: String = "" var reportTargetNickname: String = "" var relateText: String = "" + let warnUserURL = URL(string: StringLiterals.Network.warnUserGoogleFormURL) // MARK: - UI Components @@ -1071,6 +1070,12 @@ extension PostDetailViewController: DontBePopupDelegate { func confirmButtonTapped() { reportPopupView.removeFromSuperview() + let warnView: SFSafariViewController + if let warnURL = self.warnUserURL { + warnView = SFSafariViewController(url: warnURL) + self.present(warnView, animated: true, completion: nil) + } + Task { do { if let accessToken = KeychainWrapper.loadToken(forKey: "accessToken") {