ControlWidget can't open APP

My custom control widget is show up and I can set it to Lock Screen, but it doesn't launch my app when I clicked it. any problem?

in A.swift file, code like below:

@available(iOS 18.0, *)
struct LockScreenAppLaunchWidget: ControlWidget {
    var body: some ControlWidgetConfiguration {
        
        StaticControlConfiguration(kind: "abc") {
            ControlWidgetButton(action: LaunchAppIntent()) { // <-- HERE
                Label("Something", systemImage: "arrow.up")
            }
        }
        .displayName("Open app")
    }
}

@available(iOS 18, *)
struct LaunchAppIntent: AppIntent {
    
    static var title: LocalizedStringResource = "ABC"
    static var description: IntentDescription? = "abcd"
    
    static var openAppWhenRun: Bool = true

    @MainActor
    func perform() async throws -> some IntentResult & OpensIntent {
        return .result()
    }
}

ů, ůl mů

@PhonJac your LaunchAppIntent must included in main target

ControlWidget can't open APP
 
 
Q