AbedElazizShe / light_compressor

A powerful and easy-to-use video compression plugin for Flutter.
MIT License
59 stars 34 forks source link

Unable to build iOS project #15

Closed D4G4 closed 2 years ago

D4G4 commented 3 years ago

Some problem in .Swift file

Xcode's output:
↳
    Command CompileSwift failed with a nonzero exit code
    /Users/daksh/Development/flutter/.pub-cache/hosted/pub.dartlang.org/light_compressor-1.2.1/ios/Classes/LightCompressor.swift:205:45: error: cannot find 'ompletion' in scope
                                                ompletion(.onSuccess(destination))

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.1, on macOS 11.5.2 20G95 darwin-arm, locale
    en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] IntelliJ IDEA Community Edition (version 2021.1.3)
[✓] VS Code (version 1.60.2)
[✓] Connected device (2 available)

• No issues found!

P.S I even tried creating a new Flutter Project and added just this dependency!

wilfredonoyola commented 2 years ago

The same here!

Tom3652 commented 2 years ago

Simply go to the line and add a "c" letter to the word "ompletion". Of course this should be fixed in the package but this works for me, you only have to update the swift file : /Users/daksh/Development/flutter/.pub-cache/hosted/pub.dartlang.org/light_compressor-1.2.1/ios/Classes/LightCompressor.swift:205:45

AbedElazizShe commented 2 years ago

Thanks alot @Tom3652 my bad, fixed and will release an update shortly.

AbedElazizShe commented 2 years ago

The new version is out. Thank you.