Post

Replies

Boosts

Views

Activity

Reply to Is that possible to update ModelContainer?
Thank you, I tried, and I think the key is modelContainer(_:) method Now I have login and register view inside my MainScreenView. MainScreenView is the top View, which uses modelContainer(_:) method inject the container to the View, and the container is saved in a singleton actor. So the injection is finished right now, although I changed the container in singleton actor, that's the reason it won't affect anything. I think what I should do is, separate the inject, rearrange the hierarchy, make sure when MainScreen is open it could access the new Container, am I right? BTW, I have some data which happened before register, when registration is done, I want to save that data to a new Container, and I got illegal inject error. So it's not possible to save the model data from another ModelContext to a new ModelContext, is that right? I should save them to another format then transfer to Model Data.
Nov ’25
Reply to Xcode 26.3 not rendering Unicode/Emoji in Simulator or Canvas
I am facing the same issue 😠, and come on Apple Develop Team, this is so silly and shouldn't happen.
Replies
Boosts
Views
Activity
1w
Reply to Is that possible to update ModelContainer?
Thank you, and I made it, the code is still simple and intuitive. 再次感谢 boss 陈,祝早日当上大锦鲤 :P
Replies
Boosts
Views
Activity
Nov ’25
Reply to Is that possible to update ModelContainer?
Thank you, I tried, and I think the key is modelContainer(_:) method Now I have login and register view inside my MainScreenView. MainScreenView is the top View, which uses modelContainer(_:) method inject the container to the View, and the container is saved in a singleton actor. So the injection is finished right now, although I changed the container in singleton actor, that's the reason it won't affect anything. I think what I should do is, separate the inject, rearrange the hierarchy, make sure when MainScreen is open it could access the new Container, am I right? BTW, I have some data which happened before register, when registration is done, I want to save that data to a new Container, and I got illegal inject error. So it's not possible to save the model data from another ModelContext to a new ModelContext, is that right? I should save them to another format then transfer to Model Data.
Replies
Boosts
Views
Activity
Nov ’25