Build Information
Failed to build YouTubeKit, reference main (6532af), with Swift 6.1 for Linux on 11 Aug 2026 20:33:03 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-54344849-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1Build Log
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:263:82: error: cannot find type 'URL' in scope
261 | /// - Parameter cipher: The raw `signatureCipher` string from the streaming data JSON.
262 | /// - Returns: A fully formed URL with the signature applied.
263 | private func decipherFormatURL(signatureCipher cipher: String) throws -> URL {
| `- error: cannot find type 'URL' in scope
264 | guard let url = cipher.ytkFirstGroupMatch(for: "&?url=([^\\s|&]*)")?.removingPercentEncoding else { throw "Can't find URL in cipher" }
265 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:64: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:49: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:346:78: error: cannot find type 'URL' in scope
344 | /// - Parameter urlString: The raw `hlsManifestUrl` string from the streaming data JSON.
345 | /// - Returns: The manifest URL with the `n` path segment replaced, or the original URL if decoding fails.
346 | public func decodeNParameterInHLSManifestURL(_ urlString: String) -> URL? {
| `- error: cannot find type 'URL' in scope
347 | #if canImport(JavaScriptCore)
348 | guard
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:401:24: error: cannot find type 'URL' in scope
399 | private static func scrapePlayer(
400 | playerName: String,
401 | playerURL: URL
| `- error: cannot find type 'URL' in scope
402 | ) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
403 | let playerData = try downloadPlayer(playerURL: playerURL)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:70: error: cannot find type 'Data' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'Data' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:55: error: cannot find type 'URL' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'URL' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:466:54: error: cannot find type 'Operation' in scope
464 |
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
| `- error: cannot find type 'Operation' in scope
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:467:26: error: property does not override any property from its superclass
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
| `- error: property does not override any property from its superclass
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:468:26: error: property does not override any property from its superclass
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
| `- error: property does not override any property from its superclass
469 | override var isFinished: Bool { !isExecuting }
470 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:469:26: error: property does not override any property from its superclass
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
| `- error: property does not override any property from its superclass
470 |
471 | private let playerURL: URL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:471:36: error: cannot find type 'URL' in scope
469 | override var isFinished: Bool { !isExecuting }
470 |
471 | private let playerURL: URL
| `- error: cannot find type 'URL' in scope
472 | private var task: URLSessionDataTask?
473 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:472:31: error: cannot find type 'URLSessionDataTask' in scope
470 |
471 | private let playerURL: URL
472 | private var task: URLSessionDataTask?
| `- error: cannot find type 'URLSessionDataTask' in scope
473 |
474 | var result: Result<Data, Error>? {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:474:32: error: cannot find type 'Data' in scope
472 | private var task: URLSessionDataTask?
473 |
474 | var result: Result<Data, Error>? {
| `- error: cannot find type 'Data' in scope
475 | didSet {
476 | if result != nil { self.task = nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:480:29: error: cannot find type 'URL' in scope
478 | }
479 |
480 | init(playerURL: URL) {
| `- error: cannot find type 'URL' in scope
481 | self.playerURL = playerURL
482 | super.init()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:485:27: error: method does not override any method from its superclass
483 | }
484 |
485 | override func start() {
| `- error: method does not override any method from its superclass
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:79:40: error: cannot find 'FileManager' in scope
77 | guard
78 | let cacheDirectory = try? getCacheDirectory(),
79 | let instructionsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:81:41: error: cannot find 'JSONDecoder' in scope
79 | let instructionsData = FileManager.default.contents(
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
| `- error: cannot find 'JSONDecoder' in scope
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:83:36: error: cannot find 'FileManager' in scope
81 | let instructions = try? JSONDecoder().decode(
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
84 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path)
85 | else { return nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:98:17: error: cannot find 'FileManager' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
98 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:100:35: error: cannot find 'JSONEncoder' in scope
98 | FileManager.default.createFile(
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
| `- error: cannot find 'JSONEncoder' in scope
101 | )
102 | FileManager.default.createFile(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:102:17: error: cannot find 'FileManager' in scope
100 | contents: try JSONEncoder().encode(instructions)
101 | )
102 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
103 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path,
104 | contents: playerData
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:113:40: error: cannot find 'FileManager' in scope
111 | static func removePlayerFilesFromDisk(playerName: String) throws {
112 | for directory in try getPlayerDirectories() {
113 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
114 | at: directory,
115 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:115:49: error: 'nil' requires a contextual type
113 | guard let enumerator = FileManager.default.enumerator(
114 | at: directory,
115 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
116 | ) else { continue }
117 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:129:40: error: cannot find 'FileManager' in scope
127 | static func removeAllDiskFiles() throws {
128 | for directory in try getPlayerDirectories() {
129 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
130 | at: directory,
131 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:131:49: error: 'nil' requires a contextual type
129 | guard let enumerator = FileManager.default.enumerator(
130 | at: directory,
131 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
132 | ) else { continue }
133 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:133:38: error: cannot find type 'URL' in scope
131 | includingPropertiesForKeys: nil
132 | ) else { continue }
133 | for case let file as URL in enumerator {
| `- error: cannot find type 'URL' in scope
134 | let name = file.lastPathComponent
135 | if name.hasPrefix("YouTubeKitPlayers-")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:146:32: error: cannot find 'FileManager' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
| `- error: cannot find 'FileManager' in scope
147 | for: .documentDirectory,
148 | in: .userDomainMask
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:147:23: error: cannot infer contextual base in reference to member 'documentDirectory'
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
| `- error: cannot infer contextual base in reference to member 'documentDirectory'
148 | in: .userDomainMask
149 | ).first {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:148:22: error: cannot infer contextual base in reference to member 'userDomainMask'
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
148 | in: .userDomainMask
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
149 | ).first {
150 | directories.append(documents)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:30: error: cannot find 'FileManager' in scope
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot find 'FileManager' in scope
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:61: error: cannot infer contextual base in reference to member 'cachesDirectory'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'cachesDirectory'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:83: error: cannot infer contextual base in reference to member 'userDomainMask'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:160:17: error: cannot find 'FileManager' in scope
158 | }
159 | let directory = root.appendingPathComponent("YouTubeKitPlayers", isDirectory: true)
160 | try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
| `- error: cannot find 'FileManager' in scope
161 | return directory
162 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:246:36: error: cannot find 'NSRegularExpression' in scope
244 | String(selectorTail[..<$0.upperBound])
245 | } ?? selectorTail
246 | guard let regex = try? NSRegularExpression(pattern: #""([0-9A-Za-z_-]{20})""#) else {
| `- error: cannot find 'NSRegularExpression' in scope
247 | return nil
248 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:251:24: error: cannot find 'NSRange' in scope
249 | let matches = regex.matches(
250 | in: functionTail,
251 | range: NSRange(functionTail.startIndex..., in: functionTail))
| `- error: cannot find 'NSRange' in scope
252 | guard let match = matches.last,
253 | let range = Range(match.range(at: 1), in: functionTail)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:292:35: error: cannot find 'URL' in scope
290 | result = result.replacingOccurrences(of: ",", with: "%2C")
291 |
292 | guard let resultURL = URL(string: result) else { throw "Failed to create URL from result string" }
| `- error: cannot find 'URL' in scope
293 |
294 | return resultURL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:326:22: error: cannot find type 'URL' in scope
324 | /// - Returns: The same format with its `url` fully processed, including `n`-parameter decoding.
325 | public func processDownloadFormatURL(item: inout AdaptiveDownloadFormat) throws {
326 | let url: URL
| `- error: cannot find type 'URL' in scope
327 | if let cipher = item.signatureCipher {
328 | url = try self.decipherFormatURL(signatureCipher: cipher)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:380:19: error: cannot find 'URL' in scope
378 | /// - Returns: The decoded instruction array and the full player JS content.
379 | private static func processPlayerScrapping(playerPath: String, playerName: String) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
380 | guard URL(string: "https://youtube.com\(playerPath)") != nil else {
| `- error: cannot find 'URL' in scope
381 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
382 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:388:35: error: cannot find 'URL' in scope
386 | }
387 |
388 | guard let playerURL = URL(string: "https://youtube.com\(playerPath)") else {
| `- error: cannot find 'URL' in scope
389 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
390 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:405:87: error: cannot infer contextual base in reference to member 'newlines'
403 | let playerData = try downloadPlayer(playerURL: playerURL)
404 | let dataString = String(decoding: playerData, as: UTF8.self)
405 | let separatedByLinePlayer: [String] = dataString.components(separatedBy: .newlines)
| `- error: cannot infer contextual base in reference to member 'newlines'
406 |
407 | var knownPlayerCipherDecodeInstructions: [String: CipherDecodeInstruction] = [:]
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:482:17: error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
480 | init(playerURL: URL) {
481 | self.playerURL = playerURL
482 | super.init()
| `- error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
483 | }
484 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:486:24: error: cannot find 'isCancelled' in scope
484 |
485 | override func start() {
486 | guard !isCancelled else { return }
| `- error: cannot find 'isCancelled' in scope
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:487:33: error: cannot find 'DispatchSemaphore' in scope
485 | override func start() {
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
| `- error: cannot find 'DispatchSemaphore' in scope
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:29: error: cannot find 'URLSession' in scope
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot find 'URLSession' in scope
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:56: error: cannot infer contextual base in reference to member 'ephemeral'
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot infer contextual base in reference to member 'ephemeral'
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:490:40: error: cannot infer contextual base in reference to member 'success'
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
490 | self.result = .success(data)
| `- error: cannot infer contextual base in reference to member 'success'
491 | } else {
492 | self.result = .failure(error ?? "Player download failed but no error was emitted.")
[54/117] Compiling YouTubeKit VideoCommentsResponse.swift
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:95:112: error: cannot find type 'Data' in scope
93 | /// - instructions: Cipher decode instructions extracted from the player.
94 | /// - playerData: Raw contents of base.js for this player.
95 | static func saveToDisk(playerName: String, instructions: [Player.CipherDecodeInstruction], playerData: Data) {
| `- error: cannot find type 'Data' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:143:63: error: cannot find type 'URL' in scope
141 | }
142 |
143 | private static func getPlayerDirectories() throws -> [URL] {
| `- error: cannot find type 'URL' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:155:59: error: cannot find type 'URL' in scope
153 | }
154 |
155 | private static func getCacheDirectory() throws -> URL {
| `- error: cannot find type 'URL' in scope
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:263:82: error: cannot find type 'URL' in scope
261 | /// - Parameter cipher: The raw `signatureCipher` string from the streaming data JSON.
262 | /// - Returns: A fully formed URL with the signature applied.
263 | private func decipherFormatURL(signatureCipher cipher: String) throws -> URL {
| `- error: cannot find type 'URL' in scope
264 | guard let url = cipher.ytkFirstGroupMatch(for: "&?url=([^\\s|&]*)")?.removingPercentEncoding else { throw "Can't find URL in cipher" }
265 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:64: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:49: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:346:78: error: cannot find type 'URL' in scope
344 | /// - Parameter urlString: The raw `hlsManifestUrl` string from the streaming data JSON.
345 | /// - Returns: The manifest URL with the `n` path segment replaced, or the original URL if decoding fails.
346 | public func decodeNParameterInHLSManifestURL(_ urlString: String) -> URL? {
| `- error: cannot find type 'URL' in scope
347 | #if canImport(JavaScriptCore)
348 | guard
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:401:24: error: cannot find type 'URL' in scope
399 | private static func scrapePlayer(
400 | playerName: String,
401 | playerURL: URL
| `- error: cannot find type 'URL' in scope
402 | ) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
403 | let playerData = try downloadPlayer(playerURL: playerURL)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:70: error: cannot find type 'Data' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'Data' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:55: error: cannot find type 'URL' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'URL' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:466:54: error: cannot find type 'Operation' in scope
464 |
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
| `- error: cannot find type 'Operation' in scope
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:467:26: error: property does not override any property from its superclass
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
| `- error: property does not override any property from its superclass
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:468:26: error: property does not override any property from its superclass
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
| `- error: property does not override any property from its superclass
469 | override var isFinished: Bool { !isExecuting }
470 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:469:26: error: property does not override any property from its superclass
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
| `- error: property does not override any property from its superclass
470 |
471 | private let playerURL: URL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:471:36: error: cannot find type 'URL' in scope
469 | override var isFinished: Bool { !isExecuting }
470 |
471 | private let playerURL: URL
| `- error: cannot find type 'URL' in scope
472 | private var task: URLSessionDataTask?
473 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:472:31: error: cannot find type 'URLSessionDataTask' in scope
470 |
471 | private let playerURL: URL
472 | private var task: URLSessionDataTask?
| `- error: cannot find type 'URLSessionDataTask' in scope
473 |
474 | var result: Result<Data, Error>? {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:474:32: error: cannot find type 'Data' in scope
472 | private var task: URLSessionDataTask?
473 |
474 | var result: Result<Data, Error>? {
| `- error: cannot find type 'Data' in scope
475 | didSet {
476 | if result != nil { self.task = nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:480:29: error: cannot find type 'URL' in scope
478 | }
479 |
480 | init(playerURL: URL) {
| `- error: cannot find type 'URL' in scope
481 | self.playerURL = playerURL
482 | super.init()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:485:27: error: method does not override any method from its superclass
483 | }
484 |
485 | override func start() {
| `- error: method does not override any method from its superclass
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:79:40: error: cannot find 'FileManager' in scope
77 | guard
78 | let cacheDirectory = try? getCacheDirectory(),
79 | let instructionsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:81:41: error: cannot find 'JSONDecoder' in scope
79 | let instructionsData = FileManager.default.contents(
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
| `- error: cannot find 'JSONDecoder' in scope
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:83:36: error: cannot find 'FileManager' in scope
81 | let instructions = try? JSONDecoder().decode(
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
84 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path)
85 | else { return nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:98:17: error: cannot find 'FileManager' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
98 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:100:35: error: cannot find 'JSONEncoder' in scope
98 | FileManager.default.createFile(
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
| `- error: cannot find 'JSONEncoder' in scope
101 | )
102 | FileManager.default.createFile(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:102:17: error: cannot find 'FileManager' in scope
100 | contents: try JSONEncoder().encode(instructions)
101 | )
102 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
103 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path,
104 | contents: playerData
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:113:40: error: cannot find 'FileManager' in scope
111 | static func removePlayerFilesFromDisk(playerName: String) throws {
112 | for directory in try getPlayerDirectories() {
113 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
114 | at: directory,
115 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:115:49: error: 'nil' requires a contextual type
113 | guard let enumerator = FileManager.default.enumerator(
114 | at: directory,
115 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
116 | ) else { continue }
117 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:129:40: error: cannot find 'FileManager' in scope
127 | static func removeAllDiskFiles() throws {
128 | for directory in try getPlayerDirectories() {
129 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
130 | at: directory,
131 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:131:49: error: 'nil' requires a contextual type
129 | guard let enumerator = FileManager.default.enumerator(
130 | at: directory,
131 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
132 | ) else { continue }
133 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:133:38: error: cannot find type 'URL' in scope
131 | includingPropertiesForKeys: nil
132 | ) else { continue }
133 | for case let file as URL in enumerator {
| `- error: cannot find type 'URL' in scope
134 | let name = file.lastPathComponent
135 | if name.hasPrefix("YouTubeKitPlayers-")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:146:32: error: cannot find 'FileManager' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
| `- error: cannot find 'FileManager' in scope
147 | for: .documentDirectory,
148 | in: .userDomainMask
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:147:23: error: cannot infer contextual base in reference to member 'documentDirectory'
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
| `- error: cannot infer contextual base in reference to member 'documentDirectory'
148 | in: .userDomainMask
149 | ).first {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:148:22: error: cannot infer contextual base in reference to member 'userDomainMask'
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
148 | in: .userDomainMask
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
149 | ).first {
150 | directories.append(documents)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:30: error: cannot find 'FileManager' in scope
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot find 'FileManager' in scope
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:61: error: cannot infer contextual base in reference to member 'cachesDirectory'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'cachesDirectory'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:83: error: cannot infer contextual base in reference to member 'userDomainMask'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:160:17: error: cannot find 'FileManager' in scope
158 | }
159 | let directory = root.appendingPathComponent("YouTubeKitPlayers", isDirectory: true)
160 | try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
| `- error: cannot find 'FileManager' in scope
161 | return directory
162 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:246:36: error: cannot find 'NSRegularExpression' in scope
244 | String(selectorTail[..<$0.upperBound])
245 | } ?? selectorTail
246 | guard let regex = try? NSRegularExpression(pattern: #""([0-9A-Za-z_-]{20})""#) else {
| `- error: cannot find 'NSRegularExpression' in scope
247 | return nil
248 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:251:24: error: cannot find 'NSRange' in scope
249 | let matches = regex.matches(
250 | in: functionTail,
251 | range: NSRange(functionTail.startIndex..., in: functionTail))
| `- error: cannot find 'NSRange' in scope
252 | guard let match = matches.last,
253 | let range = Range(match.range(at: 1), in: functionTail)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:292:35: error: cannot find 'URL' in scope
290 | result = result.replacingOccurrences(of: ",", with: "%2C")
291 |
292 | guard let resultURL = URL(string: result) else { throw "Failed to create URL from result string" }
| `- error: cannot find 'URL' in scope
293 |
294 | return resultURL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:326:22: error: cannot find type 'URL' in scope
324 | /// - Returns: The same format with its `url` fully processed, including `n`-parameter decoding.
325 | public func processDownloadFormatURL(item: inout AdaptiveDownloadFormat) throws {
326 | let url: URL
| `- error: cannot find type 'URL' in scope
327 | if let cipher = item.signatureCipher {
328 | url = try self.decipherFormatURL(signatureCipher: cipher)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:380:19: error: cannot find 'URL' in scope
378 | /// - Returns: The decoded instruction array and the full player JS content.
379 | private static func processPlayerScrapping(playerPath: String, playerName: String) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
380 | guard URL(string: "https://youtube.com\(playerPath)") != nil else {
| `- error: cannot find 'URL' in scope
381 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
382 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:388:35: error: cannot find 'URL' in scope
386 | }
387 |
388 | guard let playerURL = URL(string: "https://youtube.com\(playerPath)") else {
| `- error: cannot find 'URL' in scope
389 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
390 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:405:87: error: cannot infer contextual base in reference to member 'newlines'
403 | let playerData = try downloadPlayer(playerURL: playerURL)
404 | let dataString = String(decoding: playerData, as: UTF8.self)
405 | let separatedByLinePlayer: [String] = dataString.components(separatedBy: .newlines)
| `- error: cannot infer contextual base in reference to member 'newlines'
406 |
407 | var knownPlayerCipherDecodeInstructions: [String: CipherDecodeInstruction] = [:]
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:482:17: error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
480 | init(playerURL: URL) {
481 | self.playerURL = playerURL
482 | super.init()
| `- error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
483 | }
484 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:486:24: error: cannot find 'isCancelled' in scope
484 |
485 | override func start() {
486 | guard !isCancelled else { return }
| `- error: cannot find 'isCancelled' in scope
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:487:33: error: cannot find 'DispatchSemaphore' in scope
485 | override func start() {
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
| `- error: cannot find 'DispatchSemaphore' in scope
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:29: error: cannot find 'URLSession' in scope
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot find 'URLSession' in scope
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:56: error: cannot infer contextual base in reference to member 'ephemeral'
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot infer contextual base in reference to member 'ephemeral'
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:490:40: error: cannot infer contextual base in reference to member 'success'
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
490 | self.result = .success(data)
| `- error: cannot infer contextual base in reference to member 'success'
491 | } else {
492 | self.result = .failure(error ?? "Player download failed but no error was emitted.")
[55/117] Compiling YouTubeKit VideoDownloadFormat.swift
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:95:112: error: cannot find type 'Data' in scope
93 | /// - instructions: Cipher decode instructions extracted from the player.
94 | /// - playerData: Raw contents of base.js for this player.
95 | static func saveToDisk(playerName: String, instructions: [Player.CipherDecodeInstruction], playerData: Data) {
| `- error: cannot find type 'Data' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:143:63: error: cannot find type 'URL' in scope
141 | }
142 |
143 | private static func getPlayerDirectories() throws -> [URL] {
| `- error: cannot find type 'URL' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:155:59: error: cannot find type 'URL' in scope
153 | }
154 |
155 | private static func getCacheDirectory() throws -> URL {
| `- error: cannot find type 'URL' in scope
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:263:82: error: cannot find type 'URL' in scope
261 | /// - Parameter cipher: The raw `signatureCipher` string from the streaming data JSON.
262 | /// - Returns: A fully formed URL with the signature applied.
263 | private func decipherFormatURL(signatureCipher cipher: String) throws -> URL {
| `- error: cannot find type 'URL' in scope
264 | guard let url = cipher.ytkFirstGroupMatch(for: "&?url=([^\\s|&]*)")?.removingPercentEncoding else { throw "Can't find URL in cipher" }
265 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:64: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:49: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:346:78: error: cannot find type 'URL' in scope
344 | /// - Parameter urlString: The raw `hlsManifestUrl` string from the streaming data JSON.
345 | /// - Returns: The manifest URL with the `n` path segment replaced, or the original URL if decoding fails.
346 | public func decodeNParameterInHLSManifestURL(_ urlString: String) -> URL? {
| `- error: cannot find type 'URL' in scope
347 | #if canImport(JavaScriptCore)
348 | guard
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:401:24: error: cannot find type 'URL' in scope
399 | private static func scrapePlayer(
400 | playerName: String,
401 | playerURL: URL
| `- error: cannot find type 'URL' in scope
402 | ) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
403 | let playerData = try downloadPlayer(playerURL: playerURL)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:70: error: cannot find type 'Data' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'Data' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:55: error: cannot find type 'URL' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'URL' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:466:54: error: cannot find type 'Operation' in scope
464 |
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
| `- error: cannot find type 'Operation' in scope
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:467:26: error: property does not override any property from its superclass
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
| `- error: property does not override any property from its superclass
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:468:26: error: property does not override any property from its superclass
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
| `- error: property does not override any property from its superclass
469 | override var isFinished: Bool { !isExecuting }
470 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:469:26: error: property does not override any property from its superclass
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
| `- error: property does not override any property from its superclass
470 |
471 | private let playerURL: URL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:471:36: error: cannot find type 'URL' in scope
469 | override var isFinished: Bool { !isExecuting }
470 |
471 | private let playerURL: URL
| `- error: cannot find type 'URL' in scope
472 | private var task: URLSessionDataTask?
473 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:472:31: error: cannot find type 'URLSessionDataTask' in scope
470 |
471 | private let playerURL: URL
472 | private var task: URLSessionDataTask?
| `- error: cannot find type 'URLSessionDataTask' in scope
473 |
474 | var result: Result<Data, Error>? {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:474:32: error: cannot find type 'Data' in scope
472 | private var task: URLSessionDataTask?
473 |
474 | var result: Result<Data, Error>? {
| `- error: cannot find type 'Data' in scope
475 | didSet {
476 | if result != nil { self.task = nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:480:29: error: cannot find type 'URL' in scope
478 | }
479 |
480 | init(playerURL: URL) {
| `- error: cannot find type 'URL' in scope
481 | self.playerURL = playerURL
482 | super.init()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:485:27: error: method does not override any method from its superclass
483 | }
484 |
485 | override func start() {
| `- error: method does not override any method from its superclass
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:79:40: error: cannot find 'FileManager' in scope
77 | guard
78 | let cacheDirectory = try? getCacheDirectory(),
79 | let instructionsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:81:41: error: cannot find 'JSONDecoder' in scope
79 | let instructionsData = FileManager.default.contents(
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
| `- error: cannot find 'JSONDecoder' in scope
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:83:36: error: cannot find 'FileManager' in scope
81 | let instructions = try? JSONDecoder().decode(
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
84 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path)
85 | else { return nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:98:17: error: cannot find 'FileManager' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
98 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:100:35: error: cannot find 'JSONEncoder' in scope
98 | FileManager.default.createFile(
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
| `- error: cannot find 'JSONEncoder' in scope
101 | )
102 | FileManager.default.createFile(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:102:17: error: cannot find 'FileManager' in scope
100 | contents: try JSONEncoder().encode(instructions)
101 | )
102 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
103 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path,
104 | contents: playerData
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:113:40: error: cannot find 'FileManager' in scope
111 | static func removePlayerFilesFromDisk(playerName: String) throws {
112 | for directory in try getPlayerDirectories() {
113 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
114 | at: directory,
115 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:115:49: error: 'nil' requires a contextual type
113 | guard let enumerator = FileManager.default.enumerator(
114 | at: directory,
115 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
116 | ) else { continue }
117 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:129:40: error: cannot find 'FileManager' in scope
127 | static func removeAllDiskFiles() throws {
128 | for directory in try getPlayerDirectories() {
129 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
130 | at: directory,
131 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:131:49: error: 'nil' requires a contextual type
129 | guard let enumerator = FileManager.default.enumerator(
130 | at: directory,
131 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
132 | ) else { continue }
133 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:133:38: error: cannot find type 'URL' in scope
131 | includingPropertiesForKeys: nil
132 | ) else { continue }
133 | for case let file as URL in enumerator {
| `- error: cannot find type 'URL' in scope
134 | let name = file.lastPathComponent
135 | if name.hasPrefix("YouTubeKitPlayers-")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:146:32: error: cannot find 'FileManager' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
| `- error: cannot find 'FileManager' in scope
147 | for: .documentDirectory,
148 | in: .userDomainMask
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:147:23: error: cannot infer contextual base in reference to member 'documentDirectory'
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
| `- error: cannot infer contextual base in reference to member 'documentDirectory'
148 | in: .userDomainMask
149 | ).first {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:148:22: error: cannot infer contextual base in reference to member 'userDomainMask'
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
148 | in: .userDomainMask
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
149 | ).first {
150 | directories.append(documents)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:30: error: cannot find 'FileManager' in scope
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot find 'FileManager' in scope
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:61: error: cannot infer contextual base in reference to member 'cachesDirectory'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'cachesDirectory'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:83: error: cannot infer contextual base in reference to member 'userDomainMask'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:160:17: error: cannot find 'FileManager' in scope
158 | }
159 | let directory = root.appendingPathComponent("YouTubeKitPlayers", isDirectory: true)
160 | try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
| `- error: cannot find 'FileManager' in scope
161 | return directory
162 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:246:36: error: cannot find 'NSRegularExpression' in scope
244 | String(selectorTail[..<$0.upperBound])
245 | } ?? selectorTail
246 | guard let regex = try? NSRegularExpression(pattern: #""([0-9A-Za-z_-]{20})""#) else {
| `- error: cannot find 'NSRegularExpression' in scope
247 | return nil
248 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:251:24: error: cannot find 'NSRange' in scope
249 | let matches = regex.matches(
250 | in: functionTail,
251 | range: NSRange(functionTail.startIndex..., in: functionTail))
| `- error: cannot find 'NSRange' in scope
252 | guard let match = matches.last,
253 | let range = Range(match.range(at: 1), in: functionTail)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:292:35: error: cannot find 'URL' in scope
290 | result = result.replacingOccurrences(of: ",", with: "%2C")
291 |
292 | guard let resultURL = URL(string: result) else { throw "Failed to create URL from result string" }
| `- error: cannot find 'URL' in scope
293 |
294 | return resultURL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:326:22: error: cannot find type 'URL' in scope
324 | /// - Returns: The same format with its `url` fully processed, including `n`-parameter decoding.
325 | public func processDownloadFormatURL(item: inout AdaptiveDownloadFormat) throws {
326 | let url: URL
| `- error: cannot find type 'URL' in scope
327 | if let cipher = item.signatureCipher {
328 | url = try self.decipherFormatURL(signatureCipher: cipher)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:380:19: error: cannot find 'URL' in scope
378 | /// - Returns: The decoded instruction array and the full player JS content.
379 | private static func processPlayerScrapping(playerPath: String, playerName: String) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
380 | guard URL(string: "https://youtube.com\(playerPath)") != nil else {
| `- error: cannot find 'URL' in scope
381 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
382 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:388:35: error: cannot find 'URL' in scope
386 | }
387 |
388 | guard let playerURL = URL(string: "https://youtube.com\(playerPath)") else {
| `- error: cannot find 'URL' in scope
389 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
390 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:405:87: error: cannot infer contextual base in reference to member 'newlines'
403 | let playerData = try downloadPlayer(playerURL: playerURL)
404 | let dataString = String(decoding: playerData, as: UTF8.self)
405 | let separatedByLinePlayer: [String] = dataString.components(separatedBy: .newlines)
| `- error: cannot infer contextual base in reference to member 'newlines'
406 |
407 | var knownPlayerCipherDecodeInstructions: [String: CipherDecodeInstruction] = [:]
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:482:17: error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
480 | init(playerURL: URL) {
481 | self.playerURL = playerURL
482 | super.init()
| `- error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
483 | }
484 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:486:24: error: cannot find 'isCancelled' in scope
484 |
485 | override func start() {
486 | guard !isCancelled else { return }
| `- error: cannot find 'isCancelled' in scope
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:487:33: error: cannot find 'DispatchSemaphore' in scope
485 | override func start() {
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
| `- error: cannot find 'DispatchSemaphore' in scope
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:29: error: cannot find 'URLSession' in scope
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot find 'URLSession' in scope
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:56: error: cannot infer contextual base in reference to member 'ephemeral'
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot infer contextual base in reference to member 'ephemeral'
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:490:40: error: cannot infer contextual base in reference to member 'success'
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
490 | self.result = .success(data)
| `- error: cannot infer contextual base in reference to member 'success'
491 | } else {
492 | self.result = .failure(error ?? "Player download failed but no error was emitted.")
[56/117] Compiling YouTubeKit VideoInfosResponse.swift
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:95:112: error: cannot find type 'Data' in scope
93 | /// - instructions: Cipher decode instructions extracted from the player.
94 | /// - playerData: Raw contents of base.js for this player.
95 | static func saveToDisk(playerName: String, instructions: [Player.CipherDecodeInstruction], playerData: Data) {
| `- error: cannot find type 'Data' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:143:63: error: cannot find type 'URL' in scope
141 | }
142 |
143 | private static func getPlayerDirectories() throws -> [URL] {
| `- error: cannot find type 'URL' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:155:59: error: cannot find type 'URL' in scope
153 | }
154 |
155 | private static func getCacheDirectory() throws -> URL {
| `- error: cannot find type 'URL' in scope
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:263:82: error: cannot find type 'URL' in scope
261 | /// - Parameter cipher: The raw `signatureCipher` string from the streaming data JSON.
262 | /// - Returns: A fully formed URL with the signature applied.
263 | private func decipherFormatURL(signatureCipher cipher: String) throws -> URL {
| `- error: cannot find type 'URL' in scope
264 | guard let url = cipher.ytkFirstGroupMatch(for: "&?url=([^\\s|&]*)")?.removingPercentEncoding else { throw "Can't find URL in cipher" }
265 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:64: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:49: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:346:78: error: cannot find type 'URL' in scope
344 | /// - Parameter urlString: The raw `hlsManifestUrl` string from the streaming data JSON.
345 | /// - Returns: The manifest URL with the `n` path segment replaced, or the original URL if decoding fails.
346 | public func decodeNParameterInHLSManifestURL(_ urlString: String) -> URL? {
| `- error: cannot find type 'URL' in scope
347 | #if canImport(JavaScriptCore)
348 | guard
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:401:24: error: cannot find type 'URL' in scope
399 | private static func scrapePlayer(
400 | playerName: String,
401 | playerURL: URL
| `- error: cannot find type 'URL' in scope
402 | ) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
403 | let playerData = try downloadPlayer(playerURL: playerURL)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:70: error: cannot find type 'Data' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'Data' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:55: error: cannot find type 'URL' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'URL' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:466:54: error: cannot find type 'Operation' in scope
464 |
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
| `- error: cannot find type 'Operation' in scope
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:467:26: error: property does not override any property from its superclass
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
| `- error: property does not override any property from its superclass
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:468:26: error: property does not override any property from its superclass
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
| `- error: property does not override any property from its superclass
469 | override var isFinished: Bool { !isExecuting }
470 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:469:26: error: property does not override any property from its superclass
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
| `- error: property does not override any property from its superclass
470 |
471 | private let playerURL: URL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:471:36: error: cannot find type 'URL' in scope
469 | override var isFinished: Bool { !isExecuting }
470 |
471 | private let playerURL: URL
| `- error: cannot find type 'URL' in scope
472 | private var task: URLSessionDataTask?
473 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:472:31: error: cannot find type 'URLSessionDataTask' in scope
470 |
471 | private let playerURL: URL
472 | private var task: URLSessionDataTask?
| `- error: cannot find type 'URLSessionDataTask' in scope
473 |
474 | var result: Result<Data, Error>? {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:474:32: error: cannot find type 'Data' in scope
472 | private var task: URLSessionDataTask?
473 |
474 | var result: Result<Data, Error>? {
| `- error: cannot find type 'Data' in scope
475 | didSet {
476 | if result != nil { self.task = nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:480:29: error: cannot find type 'URL' in scope
478 | }
479 |
480 | init(playerURL: URL) {
| `- error: cannot find type 'URL' in scope
481 | self.playerURL = playerURL
482 | super.init()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:485:27: error: method does not override any method from its superclass
483 | }
484 |
485 | override func start() {
| `- error: method does not override any method from its superclass
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:79:40: error: cannot find 'FileManager' in scope
77 | guard
78 | let cacheDirectory = try? getCacheDirectory(),
79 | let instructionsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:81:41: error: cannot find 'JSONDecoder' in scope
79 | let instructionsData = FileManager.default.contents(
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
| `- error: cannot find 'JSONDecoder' in scope
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:83:36: error: cannot find 'FileManager' in scope
81 | let instructions = try? JSONDecoder().decode(
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
84 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path)
85 | else { return nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:98:17: error: cannot find 'FileManager' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
98 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:100:35: error: cannot find 'JSONEncoder' in scope
98 | FileManager.default.createFile(
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
| `- error: cannot find 'JSONEncoder' in scope
101 | )
102 | FileManager.default.createFile(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:102:17: error: cannot find 'FileManager' in scope
100 | contents: try JSONEncoder().encode(instructions)
101 | )
102 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
103 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path,
104 | contents: playerData
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:113:40: error: cannot find 'FileManager' in scope
111 | static func removePlayerFilesFromDisk(playerName: String) throws {
112 | for directory in try getPlayerDirectories() {
113 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
114 | at: directory,
115 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:115:49: error: 'nil' requires a contextual type
113 | guard let enumerator = FileManager.default.enumerator(
114 | at: directory,
115 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
116 | ) else { continue }
117 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:129:40: error: cannot find 'FileManager' in scope
127 | static func removeAllDiskFiles() throws {
128 | for directory in try getPlayerDirectories() {
129 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
130 | at: directory,
131 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:131:49: error: 'nil' requires a contextual type
129 | guard let enumerator = FileManager.default.enumerator(
130 | at: directory,
131 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
132 | ) else { continue }
133 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:133:38: error: cannot find type 'URL' in scope
131 | includingPropertiesForKeys: nil
132 | ) else { continue }
133 | for case let file as URL in enumerator {
| `- error: cannot find type 'URL' in scope
134 | let name = file.lastPathComponent
135 | if name.hasPrefix("YouTubeKitPlayers-")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:146:32: error: cannot find 'FileManager' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
| `- error: cannot find 'FileManager' in scope
147 | for: .documentDirectory,
148 | in: .userDomainMask
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:147:23: error: cannot infer contextual base in reference to member 'documentDirectory'
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
| `- error: cannot infer contextual base in reference to member 'documentDirectory'
148 | in: .userDomainMask
149 | ).first {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:148:22: error: cannot infer contextual base in reference to member 'userDomainMask'
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
148 | in: .userDomainMask
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
149 | ).first {
150 | directories.append(documents)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:30: error: cannot find 'FileManager' in scope
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot find 'FileManager' in scope
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:61: error: cannot infer contextual base in reference to member 'cachesDirectory'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'cachesDirectory'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:83: error: cannot infer contextual base in reference to member 'userDomainMask'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:160:17: error: cannot find 'FileManager' in scope
158 | }
159 | let directory = root.appendingPathComponent("YouTubeKitPlayers", isDirectory: true)
160 | try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
| `- error: cannot find 'FileManager' in scope
161 | return directory
162 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:246:36: error: cannot find 'NSRegularExpression' in scope
244 | String(selectorTail[..<$0.upperBound])
245 | } ?? selectorTail
246 | guard let regex = try? NSRegularExpression(pattern: #""([0-9A-Za-z_-]{20})""#) else {
| `- error: cannot find 'NSRegularExpression' in scope
247 | return nil
248 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:251:24: error: cannot find 'NSRange' in scope
249 | let matches = regex.matches(
250 | in: functionTail,
251 | range: NSRange(functionTail.startIndex..., in: functionTail))
| `- error: cannot find 'NSRange' in scope
252 | guard let match = matches.last,
253 | let range = Range(match.range(at: 1), in: functionTail)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:292:35: error: cannot find 'URL' in scope
290 | result = result.replacingOccurrences(of: ",", with: "%2C")
291 |
292 | guard let resultURL = URL(string: result) else { throw "Failed to create URL from result string" }
| `- error: cannot find 'URL' in scope
293 |
294 | return resultURL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:326:22: error: cannot find type 'URL' in scope
324 | /// - Returns: The same format with its `url` fully processed, including `n`-parameter decoding.
325 | public func processDownloadFormatURL(item: inout AdaptiveDownloadFormat) throws {
326 | let url: URL
| `- error: cannot find type 'URL' in scope
327 | if let cipher = item.signatureCipher {
328 | url = try self.decipherFormatURL(signatureCipher: cipher)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:380:19: error: cannot find 'URL' in scope
378 | /// - Returns: The decoded instruction array and the full player JS content.
379 | private static func processPlayerScrapping(playerPath: String, playerName: String) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
380 | guard URL(string: "https://youtube.com\(playerPath)") != nil else {
| `- error: cannot find 'URL' in scope
381 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
382 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:388:35: error: cannot find 'URL' in scope
386 | }
387 |
388 | guard let playerURL = URL(string: "https://youtube.com\(playerPath)") else {
| `- error: cannot find 'URL' in scope
389 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
390 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:405:87: error: cannot infer contextual base in reference to member 'newlines'
403 | let playerData = try downloadPlayer(playerURL: playerURL)
404 | let dataString = String(decoding: playerData, as: UTF8.self)
405 | let separatedByLinePlayer: [String] = dataString.components(separatedBy: .newlines)
| `- error: cannot infer contextual base in reference to member 'newlines'
406 |
407 | var knownPlayerCipherDecodeInstructions: [String: CipherDecodeInstruction] = [:]
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:482:17: error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
480 | init(playerURL: URL) {
481 | self.playerURL = playerURL
482 | super.init()
| `- error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
483 | }
484 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:486:24: error: cannot find 'isCancelled' in scope
484 |
485 | override func start() {
486 | guard !isCancelled else { return }
| `- error: cannot find 'isCancelled' in scope
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:487:33: error: cannot find 'DispatchSemaphore' in scope
485 | override func start() {
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
| `- error: cannot find 'DispatchSemaphore' in scope
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:29: error: cannot find 'URLSession' in scope
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot find 'URLSession' in scope
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:56: error: cannot infer contextual base in reference to member 'ephemeral'
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot infer contextual base in reference to member 'ephemeral'
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:490:40: error: cannot infer contextual base in reference to member 'success'
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
490 | self.result = .success(data)
| `- error: cannot infer contextual base in reference to member 'success'
491 | } else {
492 | self.result = .failure(error ?? "Player download failed but no error was emitted.")
[57/117] Compiling YouTubeKit VideoInfosWithDownloadFormatsResponse.swift
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:95:112: error: cannot find type 'Data' in scope
93 | /// - instructions: Cipher decode instructions extracted from the player.
94 | /// - playerData: Raw contents of base.js for this player.
95 | static func saveToDisk(playerName: String, instructions: [Player.CipherDecodeInstruction], playerData: Data) {
| `- error: cannot find type 'Data' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:143:63: error: cannot find type 'URL' in scope
141 | }
142 |
143 | private static func getPlayerDirectories() throws -> [URL] {
| `- error: cannot find type 'URL' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:155:59: error: cannot find type 'URL' in scope
153 | }
154 |
155 | private static func getCacheDirectory() throws -> URL {
| `- error: cannot find type 'URL' in scope
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:263:82: error: cannot find type 'URL' in scope
261 | /// - Parameter cipher: The raw `signatureCipher` string from the streaming data JSON.
262 | /// - Returns: A fully formed URL with the signature applied.
263 | private func decipherFormatURL(signatureCipher cipher: String) throws -> URL {
| `- error: cannot find type 'URL' in scope
264 | guard let url = cipher.ytkFirstGroupMatch(for: "&?url=([^\\s|&]*)")?.removingPercentEncoding else { throw "Can't find URL in cipher" }
265 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:64: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:49: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:346:78: error: cannot find type 'URL' in scope
344 | /// - Parameter urlString: The raw `hlsManifestUrl` string from the streaming data JSON.
345 | /// - Returns: The manifest URL with the `n` path segment replaced, or the original URL if decoding fails.
346 | public func decodeNParameterInHLSManifestURL(_ urlString: String) -> URL? {
| `- error: cannot find type 'URL' in scope
347 | #if canImport(JavaScriptCore)
348 | guard
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:401:24: error: cannot find type 'URL' in scope
399 | private static func scrapePlayer(
400 | playerName: String,
401 | playerURL: URL
| `- error: cannot find type 'URL' in scope
402 | ) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
403 | let playerData = try downloadPlayer(playerURL: playerURL)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:70: error: cannot find type 'Data' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'Data' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:55: error: cannot find type 'URL' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'URL' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:466:54: error: cannot find type 'Operation' in scope
464 |
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
| `- error: cannot find type 'Operation' in scope
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:467:26: error: property does not override any property from its superclass
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
| `- error: property does not override any property from its superclass
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:468:26: error: property does not override any property from its superclass
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
| `- error: property does not override any property from its superclass
469 | override var isFinished: Bool { !isExecuting }
470 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:469:26: error: property does not override any property from its superclass
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
| `- error: property does not override any property from its superclass
470 |
471 | private let playerURL: URL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:471:36: error: cannot find type 'URL' in scope
469 | override var isFinished: Bool { !isExecuting }
470 |
471 | private let playerURL: URL
| `- error: cannot find type 'URL' in scope
472 | private var task: URLSessionDataTask?
473 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:472:31: error: cannot find type 'URLSessionDataTask' in scope
470 |
471 | private let playerURL: URL
472 | private var task: URLSessionDataTask?
| `- error: cannot find type 'URLSessionDataTask' in scope
473 |
474 | var result: Result<Data, Error>? {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:474:32: error: cannot find type 'Data' in scope
472 | private var task: URLSessionDataTask?
473 |
474 | var result: Result<Data, Error>? {
| `- error: cannot find type 'Data' in scope
475 | didSet {
476 | if result != nil { self.task = nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:480:29: error: cannot find type 'URL' in scope
478 | }
479 |
480 | init(playerURL: URL) {
| `- error: cannot find type 'URL' in scope
481 | self.playerURL = playerURL
482 | super.init()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:485:27: error: method does not override any method from its superclass
483 | }
484 |
485 | override func start() {
| `- error: method does not override any method from its superclass
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:79:40: error: cannot find 'FileManager' in scope
77 | guard
78 | let cacheDirectory = try? getCacheDirectory(),
79 | let instructionsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:81:41: error: cannot find 'JSONDecoder' in scope
79 | let instructionsData = FileManager.default.contents(
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
| `- error: cannot find 'JSONDecoder' in scope
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:83:36: error: cannot find 'FileManager' in scope
81 | let instructions = try? JSONDecoder().decode(
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
84 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path)
85 | else { return nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:98:17: error: cannot find 'FileManager' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
98 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:100:35: error: cannot find 'JSONEncoder' in scope
98 | FileManager.default.createFile(
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
| `- error: cannot find 'JSONEncoder' in scope
101 | )
102 | FileManager.default.createFile(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:102:17: error: cannot find 'FileManager' in scope
100 | contents: try JSONEncoder().encode(instructions)
101 | )
102 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
103 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path,
104 | contents: playerData
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:113:40: error: cannot find 'FileManager' in scope
111 | static func removePlayerFilesFromDisk(playerName: String) throws {
112 | for directory in try getPlayerDirectories() {
113 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
114 | at: directory,
115 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:115:49: error: 'nil' requires a contextual type
113 | guard let enumerator = FileManager.default.enumerator(
114 | at: directory,
115 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
116 | ) else { continue }
117 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:129:40: error: cannot find 'FileManager' in scope
127 | static func removeAllDiskFiles() throws {
128 | for directory in try getPlayerDirectories() {
129 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
130 | at: directory,
131 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:131:49: error: 'nil' requires a contextual type
129 | guard let enumerator = FileManager.default.enumerator(
130 | at: directory,
131 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
132 | ) else { continue }
133 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:133:38: error: cannot find type 'URL' in scope
131 | includingPropertiesForKeys: nil
132 | ) else { continue }
133 | for case let file as URL in enumerator {
| `- error: cannot find type 'URL' in scope
134 | let name = file.lastPathComponent
135 | if name.hasPrefix("YouTubeKitPlayers-")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:146:32: error: cannot find 'FileManager' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
| `- error: cannot find 'FileManager' in scope
147 | for: .documentDirectory,
148 | in: .userDomainMask
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:147:23: error: cannot infer contextual base in reference to member 'documentDirectory'
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
| `- error: cannot infer contextual base in reference to member 'documentDirectory'
148 | in: .userDomainMask
149 | ).first {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:148:22: error: cannot infer contextual base in reference to member 'userDomainMask'
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
148 | in: .userDomainMask
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
149 | ).first {
150 | directories.append(documents)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:30: error: cannot find 'FileManager' in scope
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot find 'FileManager' in scope
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:61: error: cannot infer contextual base in reference to member 'cachesDirectory'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'cachesDirectory'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:83: error: cannot infer contextual base in reference to member 'userDomainMask'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:160:17: error: cannot find 'FileManager' in scope
158 | }
159 | let directory = root.appendingPathComponent("YouTubeKitPlayers", isDirectory: true)
160 | try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
| `- error: cannot find 'FileManager' in scope
161 | return directory
162 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:246:36: error: cannot find 'NSRegularExpression' in scope
244 | String(selectorTail[..<$0.upperBound])
245 | } ?? selectorTail
246 | guard let regex = try? NSRegularExpression(pattern: #""([0-9A-Za-z_-]{20})""#) else {
| `- error: cannot find 'NSRegularExpression' in scope
247 | return nil
248 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:251:24: error: cannot find 'NSRange' in scope
249 | let matches = regex.matches(
250 | in: functionTail,
251 | range: NSRange(functionTail.startIndex..., in: functionTail))
| `- error: cannot find 'NSRange' in scope
252 | guard let match = matches.last,
253 | let range = Range(match.range(at: 1), in: functionTail)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:292:35: error: cannot find 'URL' in scope
290 | result = result.replacingOccurrences(of: ",", with: "%2C")
291 |
292 | guard let resultURL = URL(string: result) else { throw "Failed to create URL from result string" }
| `- error: cannot find 'URL' in scope
293 |
294 | return resultURL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:326:22: error: cannot find type 'URL' in scope
324 | /// - Returns: The same format with its `url` fully processed, including `n`-parameter decoding.
325 | public func processDownloadFormatURL(item: inout AdaptiveDownloadFormat) throws {
326 | let url: URL
| `- error: cannot find type 'URL' in scope
327 | if let cipher = item.signatureCipher {
328 | url = try self.decipherFormatURL(signatureCipher: cipher)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:380:19: error: cannot find 'URL' in scope
378 | /// - Returns: The decoded instruction array and the full player JS content.
379 | private static func processPlayerScrapping(playerPath: String, playerName: String) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
380 | guard URL(string: "https://youtube.com\(playerPath)") != nil else {
| `- error: cannot find 'URL' in scope
381 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
382 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:388:35: error: cannot find 'URL' in scope
386 | }
387 |
388 | guard let playerURL = URL(string: "https://youtube.com\(playerPath)") else {
| `- error: cannot find 'URL' in scope
389 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
390 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:405:87: error: cannot infer contextual base in reference to member 'newlines'
403 | let playerData = try downloadPlayer(playerURL: playerURL)
404 | let dataString = String(decoding: playerData, as: UTF8.self)
405 | let separatedByLinePlayer: [String] = dataString.components(separatedBy: .newlines)
| `- error: cannot infer contextual base in reference to member 'newlines'
406 |
407 | var knownPlayerCipherDecodeInstructions: [String: CipherDecodeInstruction] = [:]
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:482:17: error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
480 | init(playerURL: URL) {
481 | self.playerURL = playerURL
482 | super.init()
| `- error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
483 | }
484 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:486:24: error: cannot find 'isCancelled' in scope
484 |
485 | override func start() {
486 | guard !isCancelled else { return }
| `- error: cannot find 'isCancelled' in scope
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:487:33: error: cannot find 'DispatchSemaphore' in scope
485 | override func start() {
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
| `- error: cannot find 'DispatchSemaphore' in scope
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:29: error: cannot find 'URLSession' in scope
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot find 'URLSession' in scope
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:56: error: cannot infer contextual base in reference to member 'ephemeral'
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot infer contextual base in reference to member 'ephemeral'
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:490:40: error: cannot infer contextual base in reference to member 'success'
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
490 | self.result = .success(data)
| `- error: cannot infer contextual base in reference to member 'success'
491 | } else {
492 | self.result = .failure(error ?? "Player download failed but no error was emitted.")
[58/117] Compiling YouTubeKit [URLQueryItem]+makeUnique.swift
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:95:112: error: cannot find type 'Data' in scope
93 | /// - instructions: Cipher decode instructions extracted from the player.
94 | /// - playerData: Raw contents of base.js for this player.
95 | static func saveToDisk(playerName: String, instructions: [Player.CipherDecodeInstruction], playerData: Data) {
| `- error: cannot find type 'Data' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:143:63: error: cannot find type 'URL' in scope
141 | }
142 |
143 | private static func getPlayerDirectories() throws -> [URL] {
| `- error: cannot find type 'URL' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:155:59: error: cannot find type 'URL' in scope
153 | }
154 |
155 | private static func getCacheDirectory() throws -> URL {
| `- error: cannot find type 'URL' in scope
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:263:82: error: cannot find type 'URL' in scope
261 | /// - Parameter cipher: The raw `signatureCipher` string from the streaming data JSON.
262 | /// - Returns: A fully formed URL with the signature applied.
263 | private func decipherFormatURL(signatureCipher cipher: String) throws -> URL {
| `- error: cannot find type 'URL' in scope
264 | guard let url = cipher.ytkFirstGroupMatch(for: "&?url=([^\\s|&]*)")?.removingPercentEncoding else { throw "Can't find URL in cipher" }
265 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:64: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:49: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:346:78: error: cannot find type 'URL' in scope
344 | /// - Parameter urlString: The raw `hlsManifestUrl` string from the streaming data JSON.
345 | /// - Returns: The manifest URL with the `n` path segment replaced, or the original URL if decoding fails.
346 | public func decodeNParameterInHLSManifestURL(_ urlString: String) -> URL? {
| `- error: cannot find type 'URL' in scope
347 | #if canImport(JavaScriptCore)
348 | guard
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:401:24: error: cannot find type 'URL' in scope
399 | private static func scrapePlayer(
400 | playerName: String,
401 | playerURL: URL
| `- error: cannot find type 'URL' in scope
402 | ) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
403 | let playerData = try downloadPlayer(playerURL: playerURL)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:70: error: cannot find type 'Data' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'Data' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:55: error: cannot find type 'URL' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'URL' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:466:54: error: cannot find type 'Operation' in scope
464 |
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
| `- error: cannot find type 'Operation' in scope
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:467:26: error: property does not override any property from its superclass
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
| `- error: property does not override any property from its superclass
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:468:26: error: property does not override any property from its superclass
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
| `- error: property does not override any property from its superclass
469 | override var isFinished: Bool { !isExecuting }
470 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:469:26: error: property does not override any property from its superclass
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
| `- error: property does not override any property from its superclass
470 |
471 | private let playerURL: URL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:471:36: error: cannot find type 'URL' in scope
469 | override var isFinished: Bool { !isExecuting }
470 |
471 | private let playerURL: URL
| `- error: cannot find type 'URL' in scope
472 | private var task: URLSessionDataTask?
473 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:472:31: error: cannot find type 'URLSessionDataTask' in scope
470 |
471 | private let playerURL: URL
472 | private var task: URLSessionDataTask?
| `- error: cannot find type 'URLSessionDataTask' in scope
473 |
474 | var result: Result<Data, Error>? {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:474:32: error: cannot find type 'Data' in scope
472 | private var task: URLSessionDataTask?
473 |
474 | var result: Result<Data, Error>? {
| `- error: cannot find type 'Data' in scope
475 | didSet {
476 | if result != nil { self.task = nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:480:29: error: cannot find type 'URL' in scope
478 | }
479 |
480 | init(playerURL: URL) {
| `- error: cannot find type 'URL' in scope
481 | self.playerURL = playerURL
482 | super.init()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:485:27: error: method does not override any method from its superclass
483 | }
484 |
485 | override func start() {
| `- error: method does not override any method from its superclass
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:79:40: error: cannot find 'FileManager' in scope
77 | guard
78 | let cacheDirectory = try? getCacheDirectory(),
79 | let instructionsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:81:41: error: cannot find 'JSONDecoder' in scope
79 | let instructionsData = FileManager.default.contents(
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
| `- error: cannot find 'JSONDecoder' in scope
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:83:36: error: cannot find 'FileManager' in scope
81 | let instructions = try? JSONDecoder().decode(
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
84 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path)
85 | else { return nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:98:17: error: cannot find 'FileManager' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
98 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:100:35: error: cannot find 'JSONEncoder' in scope
98 | FileManager.default.createFile(
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
| `- error: cannot find 'JSONEncoder' in scope
101 | )
102 | FileManager.default.createFile(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:102:17: error: cannot find 'FileManager' in scope
100 | contents: try JSONEncoder().encode(instructions)
101 | )
102 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
103 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path,
104 | contents: playerData
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:113:40: error: cannot find 'FileManager' in scope
111 | static func removePlayerFilesFromDisk(playerName: String) throws {
112 | for directory in try getPlayerDirectories() {
113 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
114 | at: directory,
115 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:115:49: error: 'nil' requires a contextual type
113 | guard let enumerator = FileManager.default.enumerator(
114 | at: directory,
115 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
116 | ) else { continue }
117 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:129:40: error: cannot find 'FileManager' in scope
127 | static func removeAllDiskFiles() throws {
128 | for directory in try getPlayerDirectories() {
129 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
130 | at: directory,
131 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:131:49: error: 'nil' requires a contextual type
129 | guard let enumerator = FileManager.default.enumerator(
130 | at: directory,
131 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
132 | ) else { continue }
133 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:133:38: error: cannot find type 'URL' in scope
131 | includingPropertiesForKeys: nil
132 | ) else { continue }
133 | for case let file as URL in enumerator {
| `- error: cannot find type 'URL' in scope
134 | let name = file.lastPathComponent
135 | if name.hasPrefix("YouTubeKitPlayers-")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:146:32: error: cannot find 'FileManager' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
| `- error: cannot find 'FileManager' in scope
147 | for: .documentDirectory,
148 | in: .userDomainMask
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:147:23: error: cannot infer contextual base in reference to member 'documentDirectory'
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
| `- error: cannot infer contextual base in reference to member 'documentDirectory'
148 | in: .userDomainMask
149 | ).first {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:148:22: error: cannot infer contextual base in reference to member 'userDomainMask'
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
148 | in: .userDomainMask
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
149 | ).first {
150 | directories.append(documents)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:30: error: cannot find 'FileManager' in scope
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot find 'FileManager' in scope
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:61: error: cannot infer contextual base in reference to member 'cachesDirectory'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'cachesDirectory'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:83: error: cannot infer contextual base in reference to member 'userDomainMask'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:160:17: error: cannot find 'FileManager' in scope
158 | }
159 | let directory = root.appendingPathComponent("YouTubeKitPlayers", isDirectory: true)
160 | try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
| `- error: cannot find 'FileManager' in scope
161 | return directory
162 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:246:36: error: cannot find 'NSRegularExpression' in scope
244 | String(selectorTail[..<$0.upperBound])
245 | } ?? selectorTail
246 | guard let regex = try? NSRegularExpression(pattern: #""([0-9A-Za-z_-]{20})""#) else {
| `- error: cannot find 'NSRegularExpression' in scope
247 | return nil
248 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:251:24: error: cannot find 'NSRange' in scope
249 | let matches = regex.matches(
250 | in: functionTail,
251 | range: NSRange(functionTail.startIndex..., in: functionTail))
| `- error: cannot find 'NSRange' in scope
252 | guard let match = matches.last,
253 | let range = Range(match.range(at: 1), in: functionTail)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:292:35: error: cannot find 'URL' in scope
290 | result = result.replacingOccurrences(of: ",", with: "%2C")
291 |
292 | guard let resultURL = URL(string: result) else { throw "Failed to create URL from result string" }
| `- error: cannot find 'URL' in scope
293 |
294 | return resultURL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:326:22: error: cannot find type 'URL' in scope
324 | /// - Returns: The same format with its `url` fully processed, including `n`-parameter decoding.
325 | public func processDownloadFormatURL(item: inout AdaptiveDownloadFormat) throws {
326 | let url: URL
| `- error: cannot find type 'URL' in scope
327 | if let cipher = item.signatureCipher {
328 | url = try self.decipherFormatURL(signatureCipher: cipher)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:380:19: error: cannot find 'URL' in scope
378 | /// - Returns: The decoded instruction array and the full player JS content.
379 | private static func processPlayerScrapping(playerPath: String, playerName: String) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
380 | guard URL(string: "https://youtube.com\(playerPath)") != nil else {
| `- error: cannot find 'URL' in scope
381 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
382 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:388:35: error: cannot find 'URL' in scope
386 | }
387 |
388 | guard let playerURL = URL(string: "https://youtube.com\(playerPath)") else {
| `- error: cannot find 'URL' in scope
389 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
390 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:405:87: error: cannot infer contextual base in reference to member 'newlines'
403 | let playerData = try downloadPlayer(playerURL: playerURL)
404 | let dataString = String(decoding: playerData, as: UTF8.self)
405 | let separatedByLinePlayer: [String] = dataString.components(separatedBy: .newlines)
| `- error: cannot infer contextual base in reference to member 'newlines'
406 |
407 | var knownPlayerCipherDecodeInstructions: [String: CipherDecodeInstruction] = [:]
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:482:17: error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
480 | init(playerURL: URL) {
481 | self.playerURL = playerURL
482 | super.init()
| `- error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
483 | }
484 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:486:24: error: cannot find 'isCancelled' in scope
484 |
485 | override func start() {
486 | guard !isCancelled else { return }
| `- error: cannot find 'isCancelled' in scope
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:487:33: error: cannot find 'DispatchSemaphore' in scope
485 | override func start() {
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
| `- error: cannot find 'DispatchSemaphore' in scope
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:29: error: cannot find 'URLSession' in scope
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot find 'URLSession' in scope
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:56: error: cannot infer contextual base in reference to member 'ephemeral'
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot infer contextual base in reference to member 'ephemeral'
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:490:40: error: cannot infer contextual base in reference to member 'success'
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
490 | self.result = .success(data)
| `- error: cannot infer contextual base in reference to member 'success'
491 | } else {
492 | self.result = .failure(error ?? "Player download failed but no error was emitted.")
[59/117] Compiling YouTubeKit resource_bundle_accessor.swift
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:95:112: error: cannot find type 'Data' in scope
93 | /// - instructions: Cipher decode instructions extracted from the player.
94 | /// - playerData: Raw contents of base.js for this player.
95 | static func saveToDisk(playerName: String, instructions: [Player.CipherDecodeInstruction], playerData: Data) {
| `- error: cannot find type 'Data' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:143:63: error: cannot find type 'URL' in scope
141 | }
142 |
143 | private static func getPlayerDirectories() throws -> [URL] {
| `- error: cannot find type 'URL' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:155:59: error: cannot find type 'URL' in scope
153 | }
154 |
155 | private static func getCacheDirectory() throws -> URL {
| `- error: cannot find type 'URL' in scope
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:263:82: error: cannot find type 'URL' in scope
261 | /// - Parameter cipher: The raw `signatureCipher` string from the streaming data JSON.
262 | /// - Returns: A fully formed URL with the signature applied.
263 | private func decipherFormatURL(signatureCipher cipher: String) throws -> URL {
| `- error: cannot find type 'URL' in scope
264 | guard let url = cipher.ytkFirstGroupMatch(for: "&?url=([^\\s|&]*)")?.removingPercentEncoding else { throw "Can't find URL in cipher" }
265 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:64: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:301:49: error: cannot find type 'URL' in scope
299 | /// - Returns: The same URL with its `n` parameter replaced by the decoded value.
300 | /// - Throws: If JavaScriptCore is unavailable or decoding fails.
301 | public func processNParameterInURL(url: URL) throws -> URL {
| `- error: cannot find type 'URL' in scope
302 | #if canImport(JavaScriptCore)
303 | guard var components = URLComponents(string: url.absoluteString),
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:346:78: error: cannot find type 'URL' in scope
344 | /// - Parameter urlString: The raw `hlsManifestUrl` string from the streaming data JSON.
345 | /// - Returns: The manifest URL with the `n` path segment replaced, or the original URL if decoding fails.
346 | public func decodeNParameterInHLSManifestURL(_ urlString: String) -> URL? {
| `- error: cannot find type 'URL' in scope
347 | #if canImport(JavaScriptCore)
348 | guard
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:401:24: error: cannot find type 'URL' in scope
399 | private static func scrapePlayer(
400 | playerName: String,
401 | playerURL: URL
| `- error: cannot find type 'URL' in scope
402 | ) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
403 | let playerData = try downloadPlayer(playerURL: playerURL)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:70: error: cannot find type 'Data' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'Data' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:448:55: error: cannot find type 'URL' in scope
446 | /// - Parameter playerURL: The URL of the player script.
447 | /// - Returns: The raw data for the player JavaScript file.
448 | private static func downloadPlayer(playerURL: URL) throws -> Data {
| `- error: cannot find type 'URL' in scope
449 | let downloadOperation = DownloadPlayerOperation(playerURL: playerURL)
450 | downloadOperation.start()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:466:54: error: cannot find type 'Operation' in scope
464 |
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
| `- error: cannot find type 'Operation' in scope
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:467:26: error: property does not override any property from its superclass
465 | /// Operation used to download the player.
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
| `- error: property does not override any property from its superclass
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:468:26: error: property does not override any property from its superclass
466 | private final class DownloadPlayerOperation: Operation, @unchecked Sendable {
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
| `- error: property does not override any property from its superclass
469 | override var isFinished: Bool { !isExecuting }
470 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:469:26: error: property does not override any property from its superclass
467 | override var isAsynchronous: Bool { true }
468 | override var isExecuting: Bool { result == nil }
469 | override var isFinished: Bool { !isExecuting }
| `- error: property does not override any property from its superclass
470 |
471 | private let playerURL: URL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:471:36: error: cannot find type 'URL' in scope
469 | override var isFinished: Bool { !isExecuting }
470 |
471 | private let playerURL: URL
| `- error: cannot find type 'URL' in scope
472 | private var task: URLSessionDataTask?
473 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:472:31: error: cannot find type 'URLSessionDataTask' in scope
470 |
471 | private let playerURL: URL
472 | private var task: URLSessionDataTask?
| `- error: cannot find type 'URLSessionDataTask' in scope
473 |
474 | var result: Result<Data, Error>? {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:474:32: error: cannot find type 'Data' in scope
472 | private var task: URLSessionDataTask?
473 |
474 | var result: Result<Data, Error>? {
| `- error: cannot find type 'Data' in scope
475 | didSet {
476 | if result != nil { self.task = nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:480:29: error: cannot find type 'URL' in scope
478 | }
479 |
480 | init(playerURL: URL) {
| `- error: cannot find type 'URL' in scope
481 | self.playerURL = playerURL
482 | super.init()
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:485:27: error: method does not override any method from its superclass
483 | }
484 |
485 | override func start() {
| `- error: method does not override any method from its superclass
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:79:40: error: cannot find 'FileManager' in scope
77 | guard
78 | let cacheDirectory = try? getCacheDirectory(),
79 | let instructionsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:81:41: error: cannot find 'JSONDecoder' in scope
79 | let instructionsData = FileManager.default.contents(
80 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path),
81 | let instructions = try? JSONDecoder().decode(
| `- error: cannot find 'JSONDecoder' in scope
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:83:36: error: cannot find 'FileManager' in scope
81 | let instructions = try? JSONDecoder().decode(
82 | [Player.CipherDecodeInstruction].self, from: instructionsData),
83 | let playerJsData = FileManager.default.contents(
| `- error: cannot find 'FileManager' in scope
84 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path)
85 | else { return nil }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:98:17: error: cannot find 'FileManager' in scope
96 | guard let cacheDirectory = try? getCacheDirectory() else { return }
97 | do {
98 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:100:35: error: cannot find 'JSONEncoder' in scope
98 | FileManager.default.createFile(
99 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).ab").path,
100 | contents: try JSONEncoder().encode(instructions)
| `- error: cannot find 'JSONEncoder' in scope
101 | )
102 | FileManager.default.createFile(
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:102:17: error: cannot find 'FileManager' in scope
100 | contents: try JSONEncoder().encode(instructions)
101 | )
102 | FileManager.default.createFile(
| `- error: cannot find 'FileManager' in scope
103 | atPath: cacheDirectory.appendingPathComponent("YouTubeKitPlayers-\(playerName).abn").path,
104 | contents: playerData
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:113:40: error: cannot find 'FileManager' in scope
111 | static func removePlayerFilesFromDisk(playerName: String) throws {
112 | for directory in try getPlayerDirectories() {
113 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
114 | at: directory,
115 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:115:49: error: 'nil' requires a contextual type
113 | guard let enumerator = FileManager.default.enumerator(
114 | at: directory,
115 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
116 | ) else { continue }
117 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:129:40: error: cannot find 'FileManager' in scope
127 | static func removeAllDiskFiles() throws {
128 | for directory in try getPlayerDirectories() {
129 | guard let enumerator = FileManager.default.enumerator(
| `- error: cannot find 'FileManager' in scope
130 | at: directory,
131 | includingPropertiesForKeys: nil
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:131:49: error: 'nil' requires a contextual type
129 | guard let enumerator = FileManager.default.enumerator(
130 | at: directory,
131 | includingPropertiesForKeys: nil
| `- error: 'nil' requires a contextual type
132 | ) else { continue }
133 | for case let file as URL in enumerator {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:133:38: error: cannot find type 'URL' in scope
131 | includingPropertiesForKeys: nil
132 | ) else { continue }
133 | for case let file as URL in enumerator {
| `- error: cannot find type 'URL' in scope
134 | let name = file.lastPathComponent
135 | if name.hasPrefix("YouTubeKitPlayers-")
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:146:32: error: cannot find 'FileManager' in scope
144 | var directories = [try getCacheDirectory()]
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
| `- error: cannot find 'FileManager' in scope
147 | for: .documentDirectory,
148 | in: .userDomainMask
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:147:23: error: cannot infer contextual base in reference to member 'documentDirectory'
145 | // TODO: remove check for documents directory
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
| `- error: cannot infer contextual base in reference to member 'documentDirectory'
148 | in: .userDomainMask
149 | ).first {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:148:22: error: cannot infer contextual base in reference to member 'userDomainMask'
146 | if let documents = FileManager.default.urls(
147 | for: .documentDirectory,
148 | in: .userDomainMask
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
149 | ).first {
150 | directories.append(documents)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:30: error: cannot find 'FileManager' in scope
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot find 'FileManager' in scope
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:61: error: cannot infer contextual base in reference to member 'cachesDirectory'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'cachesDirectory'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:156:83: error: cannot infer contextual base in reference to member 'userDomainMask'
154 |
155 | private static func getCacheDirectory() throws -> URL {
156 | guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
| `- error: cannot infer contextual base in reference to member 'userDomainMask'
157 | throw Player.ResponseError(step: .getDocumentDirectory, reason: "Failed to get the caches directory.")
158 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:160:17: error: cannot find 'FileManager' in scope
158 | }
159 | let directory = root.appendingPathComponent("YouTubeKitPlayers", isDirectory: true)
160 | try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
| `- error: cannot find 'FileManager' in scope
161 | return directory
162 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:246:36: error: cannot find 'NSRegularExpression' in scope
244 | String(selectorTail[..<$0.upperBound])
245 | } ?? selectorTail
246 | guard let regex = try? NSRegularExpression(pattern: #""([0-9A-Za-z_-]{20})""#) else {
| `- error: cannot find 'NSRegularExpression' in scope
247 | return nil
248 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:251:24: error: cannot find 'NSRange' in scope
249 | let matches = regex.matches(
250 | in: functionTail,
251 | range: NSRange(functionTail.startIndex..., in: functionTail))
| `- error: cannot find 'NSRange' in scope
252 | guard let match = matches.last,
253 | let range = Range(match.range(at: 1), in: functionTail)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:292:35: error: cannot find 'URL' in scope
290 | result = result.replacingOccurrences(of: ",", with: "%2C")
291 |
292 | guard let resultURL = URL(string: result) else { throw "Failed to create URL from result string" }
| `- error: cannot find 'URL' in scope
293 |
294 | return resultURL
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:326:22: error: cannot find type 'URL' in scope
324 | /// - Returns: The same format with its `url` fully processed, including `n`-parameter decoding.
325 | public func processDownloadFormatURL(item: inout AdaptiveDownloadFormat) throws {
326 | let url: URL
| `- error: cannot find type 'URL' in scope
327 | if let cipher = item.signatureCipher {
328 | url = try self.decipherFormatURL(signatureCipher: cipher)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:380:19: error: cannot find 'URL' in scope
378 | /// - Returns: The decoded instruction array and the full player JS content.
379 | private static func processPlayerScrapping(playerPath: String, playerName: String) throws -> (instructions: [CipherDecodeInstruction], playerJs: String) {
380 | guard URL(string: "https://youtube.com\(playerPath)") != nil else {
| `- error: cannot find 'URL' in scope
381 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
382 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:388:35: error: cannot find 'URL' in scope
386 | }
387 |
388 | guard let playerURL = URL(string: "https://youtube.com\(playerPath)") else {
| `- error: cannot find 'URL' in scope
389 | throw ResponseError(step: .processPlayerScrapping, reason: "Could not create player URL (tried: https://youtube.com\(playerPath)")
390 | }
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:405:87: error: cannot infer contextual base in reference to member 'newlines'
403 | let playerData = try downloadPlayer(playerURL: playerURL)
404 | let dataString = String(decoding: playerData, as: UTF8.self)
405 | let separatedByLinePlayer: [String] = dataString.components(separatedBy: .newlines)
| `- error: cannot infer contextual base in reference to member 'newlines'
406 |
407 | var knownPlayerCipherDecodeInstructions: [String: CipherDecodeInstruction] = [:]
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:482:17: error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
480 | init(playerURL: URL) {
481 | self.playerURL = playerURL
482 | super.init()
| `- error: 'super' cannot be used in class 'DownloadPlayerOperation' because it has no superclass
483 | }
484 |
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:486:24: error: cannot find 'isCancelled' in scope
484 |
485 | override func start() {
486 | guard !isCancelled else { return }
| `- error: cannot find 'isCancelled' in scope
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:487:33: error: cannot find 'DispatchSemaphore' in scope
485 | override func start() {
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
| `- error: cannot find 'DispatchSemaphore' in scope
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:29: error: cannot find 'URLSession' in scope
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot find 'URLSession' in scope
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:488:56: error: cannot infer contextual base in reference to member 'ephemeral'
486 | guard !isCancelled else { return }
487 | let semaphore = DispatchSemaphore(value: 0)
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
| `- error: cannot infer contextual base in reference to member 'ephemeral'
489 | if let data = data {
490 | self.result = .success(data)
/host/spi-builder-workspace/Sources/YouTubeKit/YouTubeResponseTypes/VideoInfos/PlayerProcessing.swift:490:40: error: cannot infer contextual base in reference to member 'success'
488 | self.task = URLSession(configuration: .ephemeral).dataTask(with: self.playerURL) { data, _, error in
489 | if let data = data {
490 | self.result = .success(data)
| `- error: cannot infer contextual base in reference to member 'success'
491 | } else {
492 | self.result = .failure(error ?? "Player download failed but no error was emitted.")
[60/117] Compiling YouTubeKit YouTubeVideo+getCaptions.swift
[61/117] Compiling YouTubeKit YouTubeVideo+likeActions.swift
[62/117] Compiling YouTubeKit YouTubeVideo.swift
[63/117] Compiling YouTubeKit YTCaption.swift
[64/117] Compiling YouTubeKit YTChannel.swift
[65/117] Compiling YouTubeKit YTComment+actions.swift
[66/117] Compiling YouTubeKit YTComment.swift
[67/117] Compiling YouTubeKit YTLittleChannelInfos.swift
[68/117] Compiling YouTubeKit YTPlaylist+canShowBeDecoded.swift
[69/117] Compiling YouTubeKit YTPlaylist+decodeShowFromJSON.swift
[70/117] Compiling YouTubeKit YTPlaylist+fetchVideos.swift
[71/117] Compiling YouTubeKit YTPlaylist.swift
[72/117] Compiling YouTubeKit YTStoryboard.swift
[73/117] Compiling YouTubeKit YTThumbnail.swift
[74/117] Compiling YouTubeKit YTVideo+decodeShortFromJSON.swift
[75/117] Compiling YouTubeKit YTLikeStatus.swift
[76/117] Compiling YouTubeKit YTPrivacy.swift
[77/117] Compiling YouTubeKit YouTubeChannel+fetchInfos.swift
[78/117] Compiling YouTubeKit YouTubeChannel+subscribeActions.swift
[79/117] Compiling YouTubeKit YouTubeChannel.swift
[80/117] Compiling YouTubeKit AuthenticatedContinuableResponse+fetchContinuation.swift
[81/117] Compiling YouTubeKit AuthenticatedContinuableResponse.swift
[82/117] Compiling YouTubeKit ContinuableResponse+fetchContinuation.swift
[83/117] Compiling YouTubeKit ContinuableResponse+mergeContinuation.swift
[84/117] Compiling YouTubeKit ContinuableResponse.swift
[85/117] Compiling YouTubeKit ResponseContinuation.swift
[86/117] Compiling YouTubeKit YouTubeVideo+fetchAllPossibleHostPlaylists.swift
[87/117] Compiling YouTubeKit YouTubeVideo+fetchMoreInfos.swift
[88/117] Compiling YouTubeKit YouTubeVideo+fetchStreamingInfos.swift
[89/117] Compiling YouTubeKit YouTubeVideo+fetchStreamingInfosWithDownloadFormats.swift
[90/117] Compiling YouTubeKit ChannelContent.swift
[91/117] Compiling YouTubeKit ChannelInfosResponse.swift
[92/117] Compiling YouTubeKit ListableChannelContent+addChannelInfos.swift
[93/117] Compiling YouTubeKit ListableChannelContent.swift
[94/117] Compiling YouTubeKit HomeScreenResponse.swift
[95/117] Compiling YouTubeKit PlaylistInfosResponse.swift
[96/117] Compiling YouTubeKit SearchResponse.swift
[97/117] Compiling YouTubeKit YTSearchResult+canBeDecoded.swift
[98/117] Compiling YouTubeKit YTSearchResult+decodeJSON.swift
[99/117] Compiling YouTubeKit YTSearchResult+filterTypes.swift
[100/117] Compiling YouTubeKit YTSearchResult.swift
[101/117] Compiling YouTubeKit YTSearchResultType.swift
[102/117] Compiling YouTubeKit TrendingVideosResponse.swift
[103/117] Compiling YouTubeKit AudioOnlyFormat.swift
[104/117] Compiling YouTubeKit CreateCommentResponse.swift
[105/117] Compiling YouTubeKit DeleteCommentResponse.swift
[106/117] Compiling YouTubeKit DislikeCommentResponse.swift
[107/117] Compiling YouTubeKit EditCommentResponse.swift
[108/117] Compiling YouTubeKit EditReplyCommandResponse.swift
[109/117] Compiling YouTubeKit LikeCommentResponse.swift
[110/117] Compiling YouTubeKit RemoveDislikeCommentResponse.swift
[111/117] Compiling YouTubeKit RemoveLikeCommentResponse.swift
[112/117] Compiling YouTubeKit ReplyCommentResponse.swift
[113/117] Compiling YouTubeKit HistoryBlockContent.swift
[114/117] Compiling YouTubeKit HistoryReponse+removeVideo.swift
[115/117] Compiling YouTubeKit HistoryResponse.swift
[116/117] Compiling YouTubeKit RemoveVideoFromHistroryResponse.swift
[117/117] Compiling YouTubeKit AddVideoToPlaylistResponse.swift
BUILD FAILURE 6.1 linux