function adapt

This commit is contained in:
2026-08-30 19:36:25 +08:00
parent bea5ead33d
commit 560f3cbac3
450 changed files with 21193 additions and 8334 deletions
@@ -3,7 +3,7 @@ import Foundation
@available(iOS 17, *)
public struct BackgroundIntent: AppIntent {
static public var title: LocalizedStringResource = "LLMP Widget Action"
static public var title: LocalizedStringResource = "HomeWidget Background Intent"
@Parameter(title: "Widget URI")
var url: URL?
@@ -16,7 +16,7 @@ public struct BackgroundIntent: AppIntent {
public func perform() async throws -> some IntentResult {
NotificationCenter.default.post(
name: Notification.Name("fromWidgetToHost"),
name: Notification.Name("fromWigetToRunner"),
object: nil,
userInfo: ["url": url?.absoluteString ?? ""]
)
@@ -24,6 +24,7 @@ public struct BackgroundIntent: AppIntent {
}
}
/// 在宿主进程中继续执行,使小组件点击能通知主 App(对齐 Flutter Runner/BackgroundIntent)。
@available(iOS 17, *)
@available(iOSApplicationExtension, unavailable)
extension BackgroundIntent: ForegroundContinuableIntent {}