From 2c7182e44856f3864c0409b51adeaa072ee7fbda Mon Sep 17 00:00:00 2001 From: lifegpc Date: Tue, 6 Feb 2024 13:39:30 +0800 Subject: [PATCH] Try to fix compile error --- ios/Runner/AppDelegate.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 3b054ae..dac7a42 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -17,7 +17,7 @@ func openFile(result: FlutterResult, url: URL, readOnly: Bool, writeOnly: Bool, if append { opts.insert(FileDescriptor.OpenOptions.append) } - let uPath = if #available(iOS 16.0, *) { + var uPath = if #available(iOS 16.0, *) { url.path(percentEncoded: false) } else { url.path @@ -138,13 +138,13 @@ class FilePickerDelegate: NSObject, UIDocumentPickerDelegate { result(FlutterError(code: "FAILED_TO_GET_CACHE_DIRERCTORY", message: nil, details: nil)) return } - let dUrl = if #available(iOS 16.0, *) { + var dUrl = if #available(iOS 16.0, *) { URL.init(filePath: path!) } else { URL.init(fileURLWithPath: path!) } let url = dUrl.appendingPathComponent(fileName + (ext ?? "")) - let uPath = if #available(iOS 16.0, *) { + var uPath = if #available(iOS 16.0, *) { url.path(percentEncoded: false) } else { url.path