Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value #126

Closed
bardram opened this issue Nov 6, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@bardram
Copy link

bardram commented Nov 6, 2019

When trying to receive calendar info on iOS, I get an

Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

in SwiftDeviceCalendarPlugin.swift line 217.

This is in the

private func createEventFromEkEvent(calendarId: String, ekEvent: EKEvent) 

function, when accessing the ekEvent.title value.

@nickrandolph
Copy link
Contributor

Hi @bardram are you able to replicate this using the example app that's part of the source code? If so, would you be able to submit a WIP pull request that demonstrates the issue - we can take a look and see if we can reproduce and fix the issue.

@bhl09
Copy link
Contributor

bhl09 commented Jan 19, 2020

Creating an event from Android calendar app (or account's software such as Outlook) and reading that in the plugin from an iOS device will cause this issue, as ekEvent.title cannot be null. (Nullable for Android)

The fix will be adding a null check and default to something like "New Event" for both platforms to be consistent. I'll fix this up in the next update.

@bhl09 bhl09 added the bug Something isn't working label Jan 19, 2020
@bhl09 bhl09 self-assigned this Jan 19, 2020
@bhl09
Copy link
Contributor

bhl09 commented Mar 25, 2020

This has been fixed in v3.1.0

@bhl09 bhl09 closed this as completed Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants