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?
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 ruclips.net/video/kLNNNXD8X2U/видео.html
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?
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
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
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
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''
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 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.
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??
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?
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
ruclips.net/video/kLNNNXD8X2U/видео.html
@@tundsdev Cool thanks!
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?
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
Glad to hear it helped, yep you’re going to need load each file separately 👌🏾
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
Thanks this was useful and go arsenal! respect.
Thanks bruhh for the content
Glad you enjoy it 👌🏾
Thank you for this!!!
Glad you enjoyed it 🤝
What if i want to preload some images into the model? And the user can also further add images into the model
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
Yep it would work, and I have a video course coming very soon that shows you how to do this also 👀
@@tundsdev Amazing! Thanks so much for the great video and amazing comms as always ☺️
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''
Thanks very helpful video
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.
Glad you found it useful 👌🏾 & nope I haven’t but I can check it out for sure 👀
Do you have a video where you explain the same thing but for Core Data? please keep up the good work 👍
Thanks & I don’t but I can create one 👌🏾
@@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.
Will this work with nested models in JSON just as well?
As long as you handle the mappings side of things, it should do yep
Would I be possible to share the code snippet that would pre fill some default ToDo items please?
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 👌🏾
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??