I am trying to re-create a modified quiz app by using firestore as the databse to store questions and answers. Each topic has been organized in collections, and each collection has its own questions (which are the documents). Within each document is the question, the answers, correctAnswerIndex, and feedback.
I have created the model seen below to retrieve the questions form the database, but when I run the project the questions and answer choices are not presented. I added breakpoints within the QuestionModel and it does not seem to be able to read the documents and add them to an array of Questions which I would like to pass back to the ViewController.
Did I organize my database correctly in order to be able to retrieve the questions? I checked the permissions in Firestore and there is access to read and write.
I have tried googling this problem and searching for it on the forum but I cannot find an answer. I have also spend quite a bit of time playing around with the code.
Please find attached screenshots of my code. Please ask me any questions if you need more information to help me with this issue. Your help is much appreciated.