Когда я компилирую проект, я постоянно получаю эту ошибку.
Захват «exportSession» с неотправляемым типом «AVAssetExportSession» в замыкании @Sendable; это ошибка языкового режима Swift 6
Код: Выделить всё
func convertVideo(onSuccess: @escaping (URL) -> Void, onError: @escaping (Error?) -> Void) {
let fileUrl = generateFileUrl()
guard let exportSession = createExportSession(for: fileUrl) else { return }
exportSession.exportAsynchronously {
switch exportSession.status { // error
case .completed:
onSuccess(fileUrl)
default:
onError(exportSession.error)
}
}
}
Есть идеи, что может быть причиной этого?
Подробнее здесь: https://stackoverflow.com/questions/793 ... ift-5-mode
Мобильная версия