I built a drink dispenser for the office. You have to answer quiz questions to earn credits for a drink. It dispenses via bluetooth and retrieves JSON questions from a remote server. The current functioning app was built on UIKit and is based on the CWC quiz app from the UIKit fundamentals section. But I want to rebuild it in SwiftUI.
I have no problems fetching the JSON data. All the questions are there if I print them from that page . I can also make a rough draft question UI as long as I use dummy data supplied within the view. But I can’t successfully get the JSON from the ViewModel to the View.
I’ve tried all the various property wrappers, different inits, changing the model to a function and doing the “onAppear” route and all have failed. I have a feeling the error is simple, but I’m stuck. Thank you in advance for help.
![Screen Shot 2021-04-08 at 9.34.19 AM|248x273]
(upload://zeNZOQToQBR2Mr7fCM8Kd5alsZ1.png)