Footnote
Footnote copied to clipboard
App crashes when no Quotes exist in Core Data
Describe the bug When you open the app for the first time and go into the settings section and tap export to json the application crashes. The error mentioned:
2020-11-06 21:27:10.719121-0500 Footnote[85377:1996263]
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'+entityForName: nil is not a legal NSPersistentStoreCoordinator for searching for entity name 'Quote''
To Reproduce Steps to reproduce the behavior:
- Open the app for the first time.
- Don't add any quotes.
- Open settings.
- Export to json
Expected behavior Here I would expect an alert saying that there are no quotes to export. I could also see the button being grayed out/disabled because there is nothing in the core data stack.
Smartphone (please complete the following information):
- Device: Simulator
- OS: 13.0
- Version 1.03
Hi, shall I fix this? @cambardell