deansyd / icloud_storage

A flutter plugin for uploading and downloading files to and from iCloud
MIT License
42 stars 24 forks source link

Crash on onUploadQueryNotification #12

Closed lorenzOliveto closed 2 years ago

lorenzOliveto commented 2 years ago

I couldn't replicate the problem but I'm getting crash logs on that line with the exception: Unexpectedly found nil while unwrapping an Optional value.

My suspect is that this line is the culprit: let streamHandler = self.streamHandlers[eventChannelName]!

If a stream handler is removed then tried to accessed after then the plugin makes the app crash. Maybe changing it to an if let should resolve the issue but the Flutter part will not receive events.

deansyd commented 2 years ago

This has been fixed in 0.2.3. Thanks for reporting this bug.