Skip to content
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
1 change: 0 additions & 1 deletion Projects/App/Sources/Splash/SplashGradientView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ final class SplashGradientView: UIView {
gradientLayer.add(colorAnimation, forKey: "dynamicColorChange")
}
}

2 changes: 1 addition & 1 deletion Projects/Domains/BaseDomain/Sources/BaseRepository.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import Combine
import Foundation

import NetworkModule

Expand Down
1 change: 0 additions & 1 deletion Projects/Domains/BaseDomain/Sources/Utils/Secrets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public enum KeyKind: String {

public func config(key: KeyKind) -> String {
guard let secrets = Bundle.main.object(forInfoDictionaryKey: "SECRETS") as? [String: Any] else {
print("NO SECRETS")
return ""
}
return secrets[key.rawValue] as? String ?? "not found key"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public final class LiveStreamViewController: BaseViewController<LiveStreamViewMo
}

deinit {
print("Deinit \(Self.self)")

}

public override func viewDidLoad() {
Expand Down Expand Up @@ -91,7 +91,6 @@ public final class LiveStreamViewController: BaseViewController<LiveStreamViewMo
view.backgroundColor = .black

infoView.configureUI(with: (_title, _owner + (_description.isEmpty ? " " : " • ") + _description))
print("description: ", _description)
bottomGuideView.backgroundColor = DesignSystemAsset.Color.darkGray.color
}

Expand Down Expand Up @@ -197,7 +196,7 @@ public final class LiveStreamViewController: BaseViewController<LiveStreamViewMo
output.videoURLString
.receive(on: DispatchQueue.main)
.sink { [weak self] urlString in
guard let self ,let url = URL(string: urlString) else { return }
guard let self, let url = URL(string: urlString) else { return }
self.playerView.fetchVideo(m3u8URL: url)

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public final class LiveStreamViewModel: ViewModel {
}

deinit {
print("Deinit \(Self.self)")
chattingSocket.closeWebSocket()
}

Expand Down Expand Up @@ -154,7 +153,7 @@ public final class LiveStreamViewModel: ViewModel {
.sink(
receiveCompletion: { commpletion in
switch commpletion {
case let .failure(error):
case .failure:
output.showAlert.send(())

case .finished:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,13 @@ extension ShookPlayerView {
private func handlePlayItemStatus(_ status: AVPlayerItem.Status) {
switch status {
case .readyToPlay: // 성공
guard let playerItem else { return }
guard let item = player.currentItem else {
return
}

let seekableDuration = item.seekableTimeRanges.last?.timeRangeValue.end.seconds ?? 0.0
playerControlView.timeControlView.maxValue = Float(seekableDuration) // HLS 사용 시 seek 가능한 영역 갱신
case.failed, .unknown:
#warning("에러")
break

@unknown default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ extension SettingUIViewController: UITableViewDelegate, UITableViewDataSource {
}
return streamingNameCell
} else {
#warning("TextDidChange 변경하기")
streamingDescriptionCell.configure(
label: "방송정보",
placeholder: placeholderStringOfCells[indexPath.row]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,7 @@ public class BroadcastCollectionViewModel: ViewModel {
.eraseToAnyPublisher()
}
.sink(
receiveCompletion: { completion in
switch completion {
case .finished: break
case .failure(let error): print("Error: \(error)")
}
},
receiveCompletion: { _ in },
receiveValue: { [weak self] channels in
let filteredChannels = channels.filter { !($0.id == self?.channelID) }
self?.output.channels.send(filteredChannels)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public class SoketTestViewController: UIViewController {

button.setTitle("보내기", for: .normal)
button.setTitleColor(.white, for: .normal)
button.addAction(UIAction(handler: { [weak self] _ in
button.addAction(UIAction { [weak self] _ in
guard let self else { return }
self.webSocket.send(data: ChatMessage(type: .CHAT, content: "HELLo", sender: "iOS", roomId: "1234"))
}), for: .touchUpInside)
}, for: .touchUpInside)

tableView.translatesAutoresizingMaskIntoConstraints = false
button.translatesAutoresizingMaskIntoConstraints = false
Expand Down Expand Up @@ -61,10 +61,10 @@ public class SoketTestViewController: UIViewController {

extension SoketTestViewController: URLSessionWebSocketDelegate {
public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didOpenWithProtocol protocol: String?) {
print("open")
}

}
public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?) {
print("close")

}
}

Expand Down
10 changes: 3 additions & 7 deletions Projects/Modules/ChatSoketModule/Sources/WebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ public final class WebSocket: NSObject {
guard let data = try? encoder.encode(data) else { return }

let taskMessage = URLSessionWebSocketTask.Message.data(data)
print("Send message \(taskMessage)")

self.webSocketTask?.send(taskMessage) { error in
guard let error = error else { return }
print("WebSOcket sending error: \(error)")
guard error != nil else { return }
}
}

Expand All @@ -60,7 +59,6 @@ public final class WebSocket: NSObject {
public func receive(onReceive: @escaping ((ChatMessage?) -> Void)) {
self.onReceiveClosure = onReceive
self.webSocketTask?.receive { [weak self] result in
print("Receive \(result)")
guard let self else { return }
switch result {
case let .success(message):
Expand Down Expand Up @@ -98,8 +96,7 @@ public final class WebSocket: NSObject {
}
private func ping() {
self.webSocketTask?.sendPing { [weak self] error in
guard let error = error else { return }
print("Ping failed \(error)")
guard error != nil else { return }
self?.startPing()
}
}
Expand Down Expand Up @@ -136,7 +133,6 @@ extension WebSocket: URLSessionWebSocketDelegate {
extension WebSocket {
func config(key: String) -> String {
guard let secrets = Bundle.main.object(forInfoDictionaryKey: "SECRETS") as? [String: Any] else {
print("NO SECRETS")
return ""
}
return secrets[key] as? String ?? "not found key"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import UIKit

protocol SHFontable {
var font: UIFont { get }
// var lineHeight: CGFloat { get }
}

public extension UIFont {
Expand All @@ -23,7 +22,7 @@ public extension UIFont {

public extension UIFont.SHFontSystem {
enum SHFontWeight {
case bold , semiBold , regular, medium
case bold, semiBold, regular, medium
}

var font: UIFont {
Expand Down Expand Up @@ -55,7 +54,6 @@ public extension UIFont.SHFontSystem {

}


private extension UIFont.SHFontSystem.SHFontWeight {
var font: DesignSystemFontConvertible {
switch self {
Expand Down
4 changes: 4 additions & 0 deletions Scripts/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
disabled_rules:
- trailing_whitespace
- line_length
- identifier_name
- type_name

opt_in_rules:
- empty_count
Expand All @@ -14,6 +16,8 @@ included:

excluded:
- /Tuist
- '**/Project.swift'
- '**/Derived/**'

custom_rules:
no_print_statements:
Expand Down
Loading