ko2ic / image_downloader

Flutter plugin that downloads images and movies on the Internet and saves to Photo Library on iOS or specified directory on Android.
https://pub.dartlang.org/packages/image_downloader#-readme-tab-
MIT License
92 stars 115 forks source link

bug: Switch must be exhaustive (Xcode 12) #85

Closed ricolkc closed 3 years ago

ricolkc commented 3 years ago

Failed build an flutter app with Xcode 12 causes some build error like not exhaustive switch statements in the SwiftImageDownloaderPlugin.swift file

Running Xcode build...
Xcode build done.                                            8.6s
Failed to build iOS app
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Error output from Xcode build:
↳
** BUILD FAILED **

Xcode's output:
↳
/Users/programmer/flutter_SDK/flutter/.pub-cache/hosted/pub.dartlang.org/image_downloader-0.20.0/ios/Classes/SwiftImageDownloaderPlugin.swift:37:17: error: switch must be exhaustive
                switch status {
                ^
/Users/programmer/flutter_SDK/flutter/.pub-cache/hosted/pub.dartlang.org/image_downloader-0.20.0/ios/Classes/SwiftImageDownloaderPlugin.swift:37:17: note: do you want to add missing cases?
                switch status {
                ^
Command CompileSwift failed with a nonzero exit code
ko2ic commented 3 years ago

Thank you for your contribution!

Supported in v0.20.1 .