Post

Replies

Boosts

Views

Activity

Reply to How do you reload an iOS 14 Widget from an Objective-C app?
If it is possible to reload a SwiftUI widget from an Objective-C main app Sure. You can define a Swift class, and put your reload methods there. Dont forget to add @objc attribute to the function. import WidgetKit class WidgetContentLoader: NSObject { @objc public static func reloadWidgetContent() { WidgetCenter.shared.reloadTimelines(ofKind:..) } } Now you can call the function in the Objective-C file. [WidgetContentLoader reloadWidgetContent];
Sep ’20