Fix return value of AppIntents in iOS 17
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user