-
Hi, I've been using Boutique for a few days now, and have been able to (mostly) rip Core Data out of my app. I was, however, struggling with figuring out how to initialize a store with data on first load. This is useful to me to initialize a default category for items in my app, and it feels like it would also be useful for things like testing. My question is likely borne out of my limited understanding of Swift Concurrency, so I'd really appreciate any help. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hey @reftonull. Glad to hear you're using Boutique and seem to be able to rid yourself of Core Data. A simple way approach to provide data for tests would be similar to how I provide data for tests, loading items in manually from a hardcoded array. But in version 2.0 I'll be adding a new property wrapper, Hope that helps, and if not, let me know and we can try to dig into what I may have missed. |
Beta Was this translation helpful? Give feedback.
Hey @reftonull. Glad to hear you're using Boutique and seem to be able to rid yourself of Core Data.
A simple way approach to provide data for tests would be similar to how I provide data for tests, loading items in manually from a hardcoded array.
But in version 2.0 I'll be adding a new property wrapper,
@StoredValue
, which seems suited to the task of providing a default category for your apps. Even though 2.0 isn't yet released it's stable, I'm mostly making small additive changes and focusing on providing a lot of documentation for exactly the kinds of problems you're running into before releasing it fully. I would recommend using 2.0, the pull request for it is pretty rich with quite …