From 7271ee6d3757bfbb7d459f98a22730364e67ab05 Mon Sep 17 00:00:00 2001 From: Rody Davis <31253215+AppleEducate@users.noreply.github.com> Date: Thu, 16 Aug 2018 10:32:06 -0400 Subject: [PATCH] Update SwiftFlutterSmsPlugin.swift --- ios/Classes/SwiftFlutterSmsPlugin.swift | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ios/Classes/SwiftFlutterSmsPlugin.swift b/ios/Classes/SwiftFlutterSmsPlugin.swift index 3362b6e..03948af 100644 --- a/ios/Classes/SwiftFlutterSmsPlugin.swift +++ b/ios/Classes/SwiftFlutterSmsPlugin.swift @@ -32,18 +32,4 @@ public class SwiftFlutterSmsPlugin: NSObject, FlutterPlugin, UINavigationControl UIApplication.shared.keyWindow?.rootViewController?.dismiss(animated: true, completion: nil) message = "Sent!" } - - private func saveToFile(image: UIImage) -> Any { - guard let data = UIImageJPEGRepresentation(image, 1.0) else { - return FlutterError(code: "image_encoding_error", message: "Could not read image", details: nil) - } - let tempDir = NSTemporaryDirectory() - let imageName = "image_picker_\(ProcessInfo().globallyUniqueString).jpg" - let filePath = tempDir.appending(imageName) - if FileManager.default.createFile(atPath: filePath, contents: data, attributes: nil) { - return filePath - } else { - return FlutterError(code: "image_save_failed", message: "Could not save image to disk", details: nil) - } - } }