I want to add more advanced configuration options to my iOS 14 Widgets. This is what I've been working with:
struct WidgetConfig {
let id: UUID
let name: String
let backgroundColor: Color?
let backgroundImage: Data?
let fontColor: Color
let fontStyle: Font.Design
let accentColor: Color
}
The user can create Configurations in the App.
I experimented with storing the Configurations in CoreData, but fetching them in the IntentHandler is very slow and unreliable. Widgets often just render black.
What would be a better strategy to implement this?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…