You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
objc[45250]: Class AVAssetDownloadTask is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework/CFNetwork (0x4ddd0ec) and /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AVFoundation.framework/AVFoundation (0x16aea494). One of the two will be used. Which one is undefined.
objc[45250]: Class AVAssetDownloadURLSession is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework/CFNetwork (0x4dddd44) and /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AVFoundation.framework/AVFoundation (0x16aea4bc). One of the two will be used. Which one is undefined.
The workaround is to remove Combine based API, and use completion block.
Instead of dataTaskPublisher which hangs indefinitely, no sink is reported
URLSession.shared
.dataTaskPublisher(for: url).map({ $0.data }).decode(type:T.self, decoder:JSONDecoder()).eraseToAnyPublisher().receive(on:RunLoop.main).sink(receiveCompletion:{ completionStatus in
switch completionStatus {case.finished:
break
case.failure(let error):completion(.failure(error))}}, receiveValue:{ value incompletion(.success(value))})
just use normal
lettask=URLSession.shared.dataTask(with: url, completionHandler:{ data, response, error in
if let data = data,let model =try?JSONDecoder().decode(T.self, from: data){completion(.success(model))}else{completion(.failure(error ??ServiceError.noInternet))}})
task.resume()
The text was updated successfully, but these errors were encountered:
https://stackoverflow.com/questions/59724731/class-avassetdownloadtask-is-implemented-in-both-cfnetwork-and-avfoundation
Then URLSession stops working.
The workaround is to remove Combine based API, and use completion block.
Instead of
dataTaskPublisher
which hangs indefinitely, nosink
is reportedjust use normal
The text was updated successfully, but these errors were encountered: