ControlWidgetToggle can't be refresh when it action with a LiveActivityIntent.

Hi, I'm trying to implement the iOS18 ControlWidget features. When i turn on a ControlWidgetToggle that action with a LiveActivityIntent, the toggle will turn off automatic. The toggle state is read from my sharemanger, but it state won't refresh even i use the ControlCenter.shared.reloadAllControls(). Here is my code.

struct TimerLiveActivityControl: ControlWidget {
    var body: some ControlWidgetConfiguration {
        StaticControlConfiguration(kind: Self.kind) {
            ControlWidgetToggle(isOn: ShareManager.shared.isLiveActivityTimerOn, action: LiveActivityTimerIntent()) { isTurnedOn in
                Image(systemName: isTurnedOn ? "fan.fill":"fan")
                Text(isTurnedOn ? "Turned off" : "Turned On")
            } label: {
                Text("Live Activity Timer")
            }
        } 
    }
}

struct LiveActivityTimerIntent: LiveActivityIntent, SetValueIntent {
    static var title: LocalizedStringResource { "Live Activity timer" }
    
    @Parameter(title: "is Turned On")
    var value: Bool
    
    @MainActor
    func perform() async throws -> some IntentResult {
        TimerLiveActivityTimer.shared.duration = 10
        TimerLiveActivityTimer.shared.startTimer()
        return .result()
    }
}

    func startTimer() {
        self.startActivity()
        self.isLiveActivityTimerOn = true

        Timer.scheduledTimer(withTimeInterval: TimeInterval(self.duration), repeats: false) { timer in
            self.isLiveActivityTimerOn = false
            ControlCenter.shared.reloadAllControls()
            self.endActivity()
        }
        
//The ControlWidgetToggle can't refresh even i refresh it all time 
        Timer.scheduledTimer(withTimeInterval: TimeInterval(0.1), repeats: true) { timer in
            ControlCenter.shared.reloadAllControls()
        }
    }

However the code can work if I use a single SetValueIntent. My Xcode version is 16.0 beta, use iOS 18.0 simulator.

I am running into this same issue and believe it may be a bug in the beta (or I'm clearly doing something wrong).

I am following along the WWDC video and noticed that if I remove LiveActivityIntent & only keep SetValueIntent, my toggle state will be properly updated. However, I then get hit with a Target does not include NSSupportsLiveActivities plist key but I have added the key to both App Target and Extension Target.

When I re-add LiveActivityIntent, my live activity begins correctly but my ControlWidgetToggle state does not stay "on".

If this is not a bug, any advice from the Apple team would be appreciated. Thank you!

ControlWidgetToggle can't be refresh when it action with a LiveActivityIntent.
 
 
Q