Loading remote JSON data fails sometimes

Hello, my issue is that about 50% of the time the data loads from a GitHub pages JSON file, and the other 50% (roughly) it gets stuck on a ProgressView (which is triggered when there is no data in the model). No errors pop up and it is unpredictable whether it will load or not on any given build. When it does load, everything works as intended, so I don’t think there are any parsing issues.

This is how I’m loading the JSON data:

Adding @ObservedObject to the model in the contentView fixed the issue!

Hi Andrew,

Welcome to the code crew community.

Are you a member of CWC+?

If so then for future reference, your post probably should be under “Course Students” category (within that category there are further sub categories in which to post) rather than in “App Development.” It’s just a way to group posts in the right place. As I said, this is just for future reference.