Fix return value of AppIntents in iOS 17

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
This commit is contained in:
Alessio Nossa
2024-02-28 00:12:14 +01:00
parent 97bf1c1309
commit 7abdf6eaf2
2 changed files with 2 additions and 2 deletions
@@ -23,7 +23,7 @@ struct BuildPeerConfigurationUpdate: AppIntent {
)
var endpoint: String
func perform() async throws -> some IntentResult {
func perform() async throws -> some IntentResult & ReturnsValue<AppIntentsPeer> {
let peerConfigurationUpdate = AppIntentsPeer()
peerConfigurationUpdate.publicKey = publicKey
peerConfigurationUpdate.endpoint = endpoint
+1 -1
View File
@@ -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)
}