kineapps / flutter_archive

Flutter plugin for creating and extracting ZIP files.
https://pub.dev/packages/flutter_archive
BSD 3-Clause "New" or "Revised" License
57 stars 43 forks source link

Archive init errors #78

Closed MagTuxGit closed 3 months ago

MagTuxGit commented 3 months ago

Hi. I've got next errors while building my app with flutter_archive 6.0.2 dependency:

Could not build the precompiled application for the device.
Swift Compiler Error (Xcode): Cannot use optional chaining on non-optional value of type 'Archive'
/Users/trand/.pub-cache/hosted/pub.dev/flutter_archive-6.0.2/ios/Classes/SwiftFlutterArchivePlugin.swift:148:35

Swift Compiler Error (Xcode): Cannot use optional chaining on non-optional value of type 'Archive'
/Users/trand/.pub-cache/hosted/pub.dev/flutter_archive-6.0.2/ios/Classes/SwiftFlutterArchivePlugin.swift:320:23

Swift Compiler Error (Xcode): Call can throw but is not marked with 'try'
/Users/trand/.pub-cache/hosted/pub.dev/flutter_archive-6.0.2/ios/Classes/SwiftFlutterArchivePlugin.swift:263:22

I guess the issue is that flutter_archive changed its dependency to ZIPFoundation 0.9.19, but didn't change all Archive initializations.

ZIPFoundation 0.9.17 changelog says:

Added throwing initializers for Archive

Now it's not nullable but throws.

allenbrunson commented 3 months ago

having the same issue, commenting to follow

martinsustek commented 3 months ago

I am having the same issue with 6.0.2, in 6.0.0 it works.

kinex commented 3 months ago

6.0.3 should fix this