1 Reply
      Latest reply on Jan 11, 2019 9:43 AM by iOS-noob
      dougbh Level 1 Level 1 (0 points)

        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)
            
            
          }
          
        }