WidgetKit failing to compile for armv7

When building in Release configuration, my app fails to compile with the error Cannot find WidgetCenter in scope for armv7.

Wrapping my usage of WidgetCenter in #if arch(arm64) will get it to build, but it looks like the WidgetKit.framework is supposed to support armv7. Is this a bug, or am i misinterpreting the WidgetKit.tbd file?
You should first import WidgetKit in your file, and add the function reloadAllWidget below.

Code Block
@objc public func reloadAllWidget() {
#if arch(arm64) arch(i386) arch(x86_64)
WidgetCenter.shared.reloadAllTimelines()
#endif
}


When you want to update timeline, you use

Code Block
if #available(iOS 14.0, *) {
self.reloadAllWidget()
}


WidgetKit failing to compile for armv7
 
 
Q