From 7abdf6eaf2ffd3c90a2d5fa6606777b8e18ea324 Mon Sep 17 00:00:00 2001 From: Alessio Nossa Date: Wed, 28 Feb 2024 00:12:14 +0100 Subject: Fix return value of AppIntents in iOS 17 Signed-off-by: Alessio Nossa --- Sources/WireguardAppIntents/BuildPeerConfigurationUpdate.swift | 2 +- Sources/WireguardAppIntents/GetPeers.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/WireguardAppIntents/BuildPeerConfigurationUpdate.swift b/Sources/WireguardAppIntents/BuildPeerConfigurationUpdate.swift index d6c0032..090e52a 100644 --- a/Sources/WireguardAppIntents/BuildPeerConfigurationUpdate.swift +++ b/Sources/WireguardAppIntents/BuildPeerConfigurationUpdate.swift @@ -23,7 +23,7 @@ struct BuildPeerConfigurationUpdate: AppIntent { ) var endpoint: String - func perform() async throws -> some IntentResult { + func perform() async throws -> some IntentResult & ReturnsValue { let peerConfigurationUpdate = AppIntentsPeer() peerConfigurationUpdate.publicKey = publicKey peerConfigurationUpdate.endpoint = endpoint diff --git a/Sources/WireguardAppIntents/GetPeers.swift b/Sources/WireguardAppIntents/GetPeers.swift index ce6849e..00e5399 100644 --- a/Sources/WireguardAppIntents/GetPeers.swift +++ b/Sources/WireguardAppIntents/GetPeers.swift @@ -21,7 +21,7 @@ struct GetPeers: AppIntent { @Dependency var tunnelsManager: TunnelsManager - func perform() async throws -> some ReturnsValue { + func perform() async throws -> some IntentResult & ReturnsValue<[String]> { guard let tunnelContainer = tunnelsManager.tunnel(named: tunnelName) else { throw GetPeersIntentError.wrongTunnel(name: tunnelName) } -- cgit v1.2.3-59-g8ed1b