目录

Does AppStorage allow for object sharing between threads? If not, what is the recommended alternative?

AppStorage supports state sharing between multiple UIAbility instances in the main thread of an application. However, AppStorage does not allow for data sharing between threads as it is UI-thread specific. Currently, there is no alternative for sharing AppStorage across threads.

Reference

AppStorage: Storing Application-wide UI State