From 33cd363cfb90070b8208b539cd8d96c57df6d3ae Mon Sep 17 00:00:00 2001 From: KTH Date: Sat, 31 Aug 2024 15:56:21 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A5::=20[#1264]=20=ED=91=B8?= =?UTF-8?q?=EC=8B=9C=EB=B0=9C=EC=86=A1=20=EC=9D=B4=EC=8A=A4=ED=84=B0=20?= =?UTF-8?q?=EC=97=90=EA=B7=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../App/Sources/Application/AppDelegate.swift | 15 ---- .../ArtistFeature/Resources/Artist.storyboard | 13 ---- .../ArtistViewController.swift | 72 ------------------- 3 files changed, 100 deletions(-) diff --git a/Projects/App/Sources/Application/AppDelegate.swift b/Projects/App/Sources/Application/AppDelegate.swift index 054e09640..a0d9a60a0 100644 --- a/Projects/App/Sources/Application/AppDelegate.swift +++ b/Projects/App/Sources/Application/AppDelegate.swift @@ -57,20 +57,6 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { } extension AppDelegate { - func application( - _ application: UIApplication, - didReceiveRemoteNotification userInfo: [AnyHashable: Any] - ) { - // If you are receiving a notification message while your app is in the background, - // this callback will not be fired till the user taps on the notification launching the application. - - // With swizzling disabled you must let Messaging know about the message, for Analytics - Messaging.messaging().appDidReceiveMessage(userInfo) - - // Print full message. - LogManager.printDebug("๐Ÿ””:: \(userInfo)") - } - /// [START receive_message] func application( _ application: UIApplication, @@ -87,7 +73,6 @@ extension AppDelegate { return UIBackgroundFetchResult.newData } - // [END receive_message] func application( diff --git a/Projects/Features/ArtistFeature/Resources/Artist.storyboard b/Projects/Features/ArtistFeature/Resources/Artist.storyboard index 050a4f4d4..ddb2f0446 100644 --- a/Projects/Features/ArtistFeature/Resources/Artist.storyboard +++ b/Projects/Features/ArtistFeature/Resources/Artist.storyboard @@ -67,16 +67,6 @@ - @@ -91,10 +81,8 @@ - - @@ -103,7 +91,6 @@ - diff --git a/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistViewController.swift b/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistViewController.swift index cdf1edf28..45948439e 100644 --- a/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistViewController.swift +++ b/Projects/Features/ArtistFeature/Sources/ViewControllers/ArtistViewController.swift @@ -1,7 +1,6 @@ import ArtistFeatureInterface import BaseFeature import DesignSystem -import KeychainModule import Localization import LogManager import NeedleFoundation @@ -21,7 +20,6 @@ public final class ArtistViewController: @IBOutlet weak var collectionView: UICollectionView! @IBOutlet weak var activityIndicator: NVActivityIndicatorView! - @IBOutlet weak var easterEggButton: UIButton! private let retryWarningView = WMRetryWarningView( description: LocalizationStrings.unknownErrorWarning, retryButtonTitle: LocalizationStrings.titleRetry @@ -79,15 +77,6 @@ public final class ArtistViewController: .bind(with: self) { owner, _ in let offsetY: CGFloat = owner.collectionView.contentOffset.y + STATUS_BAR_HEGHIT() owner.translucentView.alpha = min(max(offsetY / owner.translucentView.frame.height, 0), 1) - owner.easterEggButton.isHidden = owner.collectionView.contentOffset.y > 10 - } - .disposed(by: disposeBag) - - easterEggButton.rx.tap - .bind(with: self) { owner, _ in - owner.showTextInputAlert { id in - owner.postNotification(id: id ?? "") - } } .disposed(by: disposeBag) } @@ -228,64 +217,3 @@ extension ArtistViewController: UIGestureRecognizerDelegate { return false } } - -#if DEBUG || QA - #warning("๐ŸŽ‰:: ๋””๋ฒ„๊ทธ์šฉ ์ด์Šคํ„ฐ์—๊ทธ") - private extension ArtistViewController { - func showTextInputAlert(completion: @escaping (String?) -> Void) { - let alertController = UIAlertController( - title: "ํ‘ธ์‹œ๋ฐœ์†ก", - message: "songID๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.", - preferredStyle: .alert - ) - - alertController.addTextField { textField in - textField.placeholder = "songID๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”." - } - - let okAction = UIAlertAction(title: "OK", style: .default) { _ in - let textField = alertController.textFields?.first - let inputText = textField?.text - completion(inputText) - } - - let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil) - alertController.addAction(okAction) - alertController.addAction(cancelAction) - - present(alertController, animated: true, completion: nil) - } - - func postNotification(id: String) { - let urlString = "U5l/gXs0ZmvBbJC8Lj4REKUhMpiYZByzM3MgyVD4Bk+LR+6IMoZBaEDwQB47DcpH" - guard let url = URL(string: AES256.decrypt(encoded: urlString)) else { - return - } - - var request = URLRequest(url: url) - request.httpMethod = "POST" - request.setValue("application/json", forHTTPHeaderField: "Content-Type") - - let keychain = KeychainImpl() - request.addValue("bearer \(keychain.load(type: .accessToken))", forHTTPHeaderField: "Authorization") - - let parameters: [String: String] = [ - "page": "songDetail", - "songId": id - ] - - if let bodyData = try? JSONSerialization.data(withJSONObject: parameters, options: []) { - request.httpBody = bodyData - } - - let task = URLSession.shared.dataTask(with: request) { _, response, error in - if let error = error { - LogManager.printDebug("Error: \(error.localizedDescription)") - return - } - LogManager.printDebug("response: \(String(describing: response))") - } - task.resume() - } - } -#endif From e024cf3da75a8eaeb3c9411b7d6561439cd6a260 Mon Sep 17 00:00:00 2001 From: "pikagreen@nate.com" Date: Sat, 31 Aug 2024 15:56:27 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8E=A8=20::=20=EC=BD=94=EB=93=9C=20Fo?= =?UTF-8?q?rmatting=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/App/Sources/Application/AppDelegate.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Projects/App/Sources/Application/AppDelegate.swift b/Projects/App/Sources/Application/AppDelegate.swift index a0d9a60a0..162350f4b 100644 --- a/Projects/App/Sources/Application/AppDelegate.swift +++ b/Projects/App/Sources/Application/AppDelegate.swift @@ -73,6 +73,7 @@ extension AppDelegate { return UIBackgroundFetchResult.newData } + // [END receive_message] func application(