I have an application where a user can login. If a user is logged in, then I display a placeholder for my widget and it\'s configurable through an intent extension.
The c
I found this solution, but for dynamic properties only: use different identifiers for every user in your IntentHandler. Example:
class IntentHandler: XXExtension { ... }
extension IntentHandler: XXDynamicXXXSelectionIntentHandling {
func provideXXXOptionsCollection(for intent: XXDynamicXXXSelectionIntent, with completion: @escaping (XXObjectCollection<XXX>?, Error?) -> Void) {
let userId = (UserDefaults.myGroup().object(forKey: "UserId" ) as? String) ?? ""
let items: [XXX] = UserDefaults.myGroup().sharedXxx.map { (sharedXxx) -> XXX in
return XXX(identifier: userId + "_" + sharedXxx.Id // <== add unique prefix ===
display: sharedXxx.visibleName())
}
let collection = XXObjectCollection(items: items)
completion(collection, nil)
}
}
I had the same issue that the widget was showing stale configuration options. I solved this by forcefully refreshing all objects in my shared Core Data database which I was using. I did this in the „getTimeline“ method.