I am using a very simple code to download an image from url
let url = URL(string: "https://images.unsplash.com/photo-1577771488438-6307361e4023?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=668&q=80")!
let data1 = try? Data(contentsOf: url)
let image = UIImage(data: data1!);
print("want to show download progress here") // here want to show download progress.
UIImageWriteToSavedPhotosAlbum(image!, nil, nil, nil)
My only problem is that i am unable to show the download progress(just want to print the progress and not show in the UI)
P.S:- I am creating a plugin for flutter which uses native code to run. its easier for me to create the plugin on android(since I am from android background).