Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ”€ :: (#1264) ν‘Έμ‹œλ°œμ†‘ μ΄μŠ€ν„°μ—κ·Έ 제거 #1266

Merged
merged 2 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions Projects/App/Sources/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
13 changes: 0 additions & 13 deletions Projects/Features/ArtistFeature/Resources/Artist.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,6 @@
</collectionViewCell>
</cells>
</collectionView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="C0Y-l0-5hD">
<rect key="frame" x="333" y="59" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="81B-uC-Z7e"/>
<constraint firstAttribute="width" constant="40" id="eyc-7O-f4h"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain"/>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nKI-M3-PEL" customClass="NVActivityIndicatorView" customModule="NVActivityIndicatorView">
<rect key="frame" x="181.66666666666666" y="411" width="30" height="30"/>
<constraints>
Expand All @@ -91,10 +81,8 @@
<constraint firstItem="vDu-zF-Fre" firstAttribute="bottom" secondItem="fkE-Zx-Mb6" secondAttribute="bottom" id="2U1-Bg-TdX"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="fkE-Zx-Mb6" secondAttribute="trailing" id="4CI-0P-BNL"/>
<constraint firstItem="fkE-Zx-Mb6" firstAttribute="top" secondItem="5EZ-qb-Rvc" secondAttribute="top" id="Afs-H6-ZxN"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="C0Y-l0-5hD" secondAttribute="trailing" constant="20" id="Jih-WE-Knh"/>
<constraint firstItem="nKI-M3-PEL" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="Jk1-Hm-JCZ"/>
<constraint firstItem="nKI-M3-PEL" firstAttribute="centerY" secondItem="5EZ-qb-Rvc" secondAttribute="centerY" id="h5A-Xk-4FS"/>
<constraint firstItem="C0Y-l0-5hD" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" id="kDO-DH-JXt"/>
<constraint firstItem="fkE-Zx-Mb6" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="s29-DB-PNi"/>
</constraints>
</view>
Expand All @@ -103,7 +91,6 @@
<connections>
<outlet property="activityIndicator" destination="nKI-M3-PEL" id="Ug9-hb-UEy"/>
<outlet property="collectionView" destination="fkE-Zx-Mb6" id="qrS-zx-gK3"/>
<outlet property="easterEggButton" destination="C0Y-l0-5hD" id="RKf-eI-Qte"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import ArtistFeatureInterface
import BaseFeature
import DesignSystem
import KeychainModule
import Localization
import LogManager
import NeedleFoundation
Expand All @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
Loading