Getting a warning from the Xcode compiler about accessing a context outside of a view. It popped up in white text on a purple background, not the usual white on yellow warning color.
The actual warning text is: Accessing Environment<ModelContext>'s value outside of being installed on a View. This will always read the default value and will not update.
This seems to mean that any datastore access must be done within a view, and isn't possible from the model or some sort of DataManager class. Am I reading this correctly? I'm trying to keep the business logic out of the views. I can do it with everything except the datastore code because of this context issue. Doesn't seem to make sense.
Suggestions greatly appreciated.