Hi,
I have developed an iOs app (16+) with SwiftUI.
Now I am adding the ability to use voice commands with Siri by creating App Intents.
I would like to give users the ability to be able to say, "Siri records 2 hours and 30 for client Mark."
For the time part I was thinking of using the @Parameter with data type "Duration" but I get error back and maybe it is not the right type since it accepts seconds as input.
What do you recommend?
Thanks
import Foundation
import AppIntents
import UIKit
struct AddExpense: AppIntent {
static var title: LocalizedStringResource = "Record"
@Parameter(title: "Customer")
var dossier: String
@Parameter(title: "Time")
var tempo: Duration
func perform() async throws -> some IntentResult & ProvidesDialog {
//await addExpense()
let dialog = IntentDialog("Ok!")
return .result(dialog: dialog)
}
}
Error:
Generic class 'IntentParameter' requires that 'Duration' conform to '_IntentValue'
Warning:
Stored property '_tempo' of 'Sendable'-conforming struct 'AddExpense' has non-sendable type '<>'
Documentation
[https://developer.apple.com/documentation/appintents/providing-your-app-s-capabilities-to-system-services]
Post
Replies
Boosts
Views
Activity
Is there a function that allows access to the log of phone calls made?
Hi everyone, I'm desperate, they keep rejecting my app, I don't know what to do anymore.
My app was accepted to be among the "unlisted" ones, but the verification team keeps rejecting the app telling me to apply as an "unlisted" app.
I even replied to them so many times writing that the request was approved as unlisted, I pasted the text of the approval email, but nothing they keep rejecting it.
I have made 2 phone contact requests but they don't call me, I wrote to support but nothing.
Ciao a tutti, sono disperato, mi continuano a rigettarmi la app, non so più cosa fare.
La mia app è stata accettate per essere tra quelle "unlisted", ma il team di verifica continua a rigettare l'app dicendomi di fare la richiesta come app "unlisted".
Ho pure risposto a loro tantissime volte scrivendo che è stata approvata la richiesta come unlisted, ho incollato il testo della mail di approvazione, ma niente continuano a rigettarla.
Ho fatto 2 richieste di contatto telefonico ma non mi chiamano, ho scritto al supporto ma niente.