Cannot find 'WidgetCenter' in scope

Hello Everyone
In my OC project, I have create a widget extension
and in my main app I need to know all my widget info

So I create a swift file to import widget kit.
Debug is fine but archive can not success with error
Cannot find 'WidgetCenter' in scope

Anyone can help me?
I fixed my question by doing this

Code Block swift@available(iOS 14, *)    @objc public func reloadAllWidget() {        #if arch(arm64)  arch(i386)  arch(x86_64)        WidgetCenter.shared.reloadAllTimelines()        #endif    }


But I wonder is this arch limit should developer to know and use?
Cannot find 'WidgetCenter' in scope
 
 
Q