Thank you for this tutorial, it was very handy. One question though, what to do if you want to UPDATE your data. Let's say you want to add another category when your app is already installed?
@tundsdev10 ай бұрын
Glad you enjoyed it 👌🏾 & you can just perform normal crud. I cover this in this video here. SwiftData For Beginners: How To Build A To-Do List App In SwiftUI | #1 kzbin.info/www/bejne/oX2xf4GOeZ2LaLc
@mauricederegt10 ай бұрын
@@tundsdev Cool thanks!
@jaimeacasta2 ай бұрын
Amazing video! Greatly explains, however I've got a question... I tried this and the preload works, however, it preloads the data randomly. I want the data array in a certain order. I tried adding a "order" constant to the CategoryResponse and sort the array just before spending to context but this doesn't work. Did you figure out how to get the preloaded array sorted?
@IbrahimAkar11 ай бұрын
This was extremely helpful - thank you. I have managed to get the container built and my JSON file imported OK. However, I have six JSON files to load and I was wondering if I have to create a function for each import or is there a way to import all six with one function call
@tundsdev11 ай бұрын
Glad to hear it helped, yep you’re going to need load each file separately 👌🏾
@munavarpm5342 Жыл бұрын
Thanks bruhh for the content
@tundsdev Жыл бұрын
Glad you enjoy it 👌🏾
@kichuntse47463 ай бұрын
What if i want to preload some images into the model? And the user can also further add images into the model
@simonransom_dxb8 ай бұрын
Hello Is it possible to create a Button in our App to "repopulate" sample data that the User may have deleted? I know we can toggle the ShouldCreateDefaults but that would then require a restart for the user to get the Sample Data... can we do it without an App restart is the question? I am thinking I could put a button in my Setting view for the user to recreate Sample data, just in case. Thanks in advance, Simon
@cinnamonrage Жыл бұрын
Thank you for this!!!
@tundsdev Жыл бұрын
Glad you enjoyed it 🤝
@kevinkivo Жыл бұрын
Thanks so much for this video! I have been playing with SwiftData for a couple months with limited success. I was hoping someone could help with how to enable SwiftData's undoManager... If you are calling the container.create() function in your WindowGroup in the app.swift file, how can you set the isUndoManagerEnabled argument to true? I can't figure out where this would go. It's not a parameter in ModelConfiguration() or in ModelContainer(). It's only available with conformance to Scene, but if I call my custom Container within the App Scene, I cannot add isUndoEnabled without getting the error 'No exact matches in call to instance method 'modelContainer''
@Justin-BroskiMode10 ай бұрын
Thanks this was useful and go arsenal! respect.
@DolHarubang-swift8 ай бұрын
Thanks very helpful video
@haydgately2109 Жыл бұрын
Would this work if it was getting initial config from a network request that returned the JSON instead of loading it from local? Some sort of loading state would be needed I think
@tundsdev Жыл бұрын
Yep it would work, and I have a video course coming very soon that shows you how to do this also 👀
@haydgately2109 Жыл бұрын
@@tundsdev Amazing! Thanks so much for the great video and amazing comms as always ☺️
@claudiocavalli517 Жыл бұрын
thanks for all these interesting videos, did you happen to see the new apple openapi generator presented at wwdc? It would be nice to see some evidence of use.
@tundsdev Жыл бұрын
Glad you found it useful 👌🏾 & nope I haven’t but I can check it out for sure 👀
@iamcodfish Жыл бұрын
Would I be possible to share the code snippet that would pre fill some default ToDo items please?
@tundsdev Жыл бұрын
I have a video for this pretty soon that shows you how to prefill data where there are relationships, that will cover having some default to dos 👌🏾
@MrKamalAit Жыл бұрын
Do you have a video where you explain the same thing but for Core Data? please keep up the good work 👍
@tundsdev Жыл бұрын
Thanks & I don’t but I can create one 👌🏾
@MrKamalAit Жыл бұрын
@@tundsdev Thank you bro, I’m currently struggling to preload data into my app following your video, I setup the json file with its respective model, but got stuck knowing how to map it to CD.
@cinnamonrage Жыл бұрын
Will this work with nested models in JSON just as well?
@tundsdev Жыл бұрын
As long as you handle the mappings side of things, it should do yep
@zainmehar2229 Жыл бұрын
sir can you plz help me I am a junior IOS Developer. My Company assigns a task. I am working on Mobile App which uses Realm to store data locally the task is daily at night 11 pm I have to send Local data from one table to Server through API I am trying silent push notification to accomplish this task but unfortunately, sometimes it delivers notification and some time, not its not a good solution can you plz tell me how I can achieve it??