Problem with ios 12 using INSearchForAccountsIntent

In IOS 11 the code below returns the account data using the siri, but when updating for IOS 12 the siri informs that the app did not obtain result.


extension IntentHandler: INSearchForAccountsIntentHandling {
  
  public func handle(intent: INSearchForAccountsIntent, completion: @escaping (INSearchForAccountsIntentResponse)  -> Void) {
    
    let response: INSearchForAccountsIntentResponse
    
    let nickname = INSpeakableString(vocabularyIdentifier: "Saldo", spokenPhrase: "Saldo", pronunciationHint: "")
    let organization = INSpeakableString(vocabularyIdentifier: "Banco sim", spokenPhrase: "Banco sim", pronunciationHint: "Banco sim")
    let balanceAccount = INBalanceAmount(amount: NSDecimalNumber(string: "100"), currencyCode: "BRL")
    let numberAccount = "33434-1"
    
    let payAccount = INPaymentAccount(nickname: nickname, number: numberAccount, accountType: .debit, organizationName: organization, balance: balanceAccount, secondaryBalance: nil)
    
    
    response = INSearchForAccountsIntentResponse(code: .success, userActivity: nil)
    
    response.accounts?.append(payAccount)
    
    completion(response)
    
    
  }
  
}

Replies

Did you find a solution? I ran into the same issue, and thought I was going mad.