From: Alessio Nossa Date: Tue, 27 Feb 2024 23:12:14 +0000 (+0100) Subject: Fix return value of AppIntents in iOS 17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7abdf6eaf2ffd3c90a2d5fa6606777b8e18ea324;p=thirdparty%2Fwireguard-apple.git Fix return value of AppIntents in iOS 17 Signed-off-by: Alessio Nossa --- 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) }