Post

Replies

Boosts

Views

Activity

Reply to Simple way to load json remotely from server?
I don't know of a specific tutorial but basically what you want to do is to define a model with these properties that is "Codable" (you can look this up - it will help you move back and forth between instances of the model and the JSON data) and then use URLSession to get data from the network and tell JSONDecoder to use your codable model to decode the data. The model specification and networking code is probably ~20 lines of code total, maybe less. Then you can use it with SwiftUI or in any other way needed.
Jun ’22
Reply to Core Data complaining about store being opened without persistent history tracking... but I don't think that it has been
Compiling against beta 2 and I figured this out. Turns out I was setting my Spotlight delegate before setting the persistent history tracking attribute. Well, setting the Spotlight delegate must open the store and that's where this was coming from... this asserted in b2 making it obvious. The fix was to re-arrange the code so the Spotlight delegate is set last.
Jul ’20