We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4b9dbe commit a0e2357Copy full SHA for a0e2357
1 file changed
KYPhotoLibrary/Sources/Video/KYPhotoLibrary+VideoExport.swift
@@ -100,7 +100,14 @@ extension KYPhotoLibrary {
100
let outputURL: URL = try await exportOptions.prepareOutputURL(for: asset)
101
102
try Task.checkCancellation()
103
- try await session.export(to: outputURL, as: outputFileType)
+
104
+ if #available(iOS 18, *) {
105
+ try await session.export(to: outputURL, as: outputFileType)
106
+ } else {
107
+ session.outputURL = outputURL
108
+ session.outputFileType = outputFileType
109
+ await session.export()
110
+ }
111
112
KYPhotoLibraryLog("Export Session Completed")
113
return outputURL
0 commit comments