gpt4 book ai didi

ios - 诗丽吉不退还账单

转载 作者:行者123 更新时间:2023-11-30 12:38:31 25 4
gpt4 key购买 nike

我正在尝试使用 Sirikit 退回我存储在 Firebase 上的账单。它不会退还所发现的账单。这是我的句柄功能。我正在使用 getBills 函数从数据库中获取我的账单:

func handle(searchForBills intent: INSearchForBillsIntent, completion: @escaping (INSearchForBillsIntentResponse) -> Void) {
var arrayOfBills: [INBillDetails] = []
APIManager.getBills { (success, bills) in
if(success) {
for bill in bills {
if (bill.type == intent.billType.rawValue) {
var nickname: INSpeakableString = INSpeakableString(identifier: bill.billPayeeNickName, spokenPhrase: bill.billPayeeNickName, pronunciationHint: bill.billPayeeNickName)
var organizationalName: INSpeakableString = INSpeakableString(identifier: bill.billPayeeOrganzationalName, spokenPhrase: bill.billPayeeOrganzationalName, pronunciationHint: bill.billPayeeOrganzationalName)

var billPayee: INBillPayee = INBillPayee(nickname: nickname, number: bill.billPayeeAccountNumber, organizationName: organizationalName)!
var nsDecimalTotal: NSDecimalNumber = NSDecimalNumber(string: bill.total)
var amountDueInCurrency: INCurrencyAmount = INCurrencyAmount(amount: nsDecimalTotal, currencyCode: "$")

var dateC: DateComponents = DateComponents(calendar: Calendar.current , timeZone: TimeZone.current, era: 1, year: 2017, month: 5, day: 23, hour: 2, minute: 2, second: 2, nanosecond: 2, weekday: 3, weekdayOrdinal: 3, quarter: 3, weekOfMonth: 23, weekOfYear: 33, yearForWeekOfYear: 44)

var billToReturn = INBillDetails(billType: INBillType(rawValue: bill.type)!, paymentStatus: INPaymentStatus(rawValue: bill.status)!, billPayee: billPayee, amountDue: amountDueInCurrency, minimumDue: amountDueInCurrency, lateFee: amountDueInCurrency, dueDate: dateC, paymentDate: dateC)
arrayOfBills.append(billToReturn!)
}
}
print("success")
var response = INSearchForBillsIntentResponse(code: .failure, userActivity: nil)
//response.bills = arrayOfBills
completion(response)
}
else {
print("failed")
completion(INSearchForBillsIntentResponse(code: .failure, userActivity: nil))
}
}

最佳答案

您的 INSearchForBillsIntentResponse 在这两种情况下均以“失败”启动。您没有成功代码 - 这可能会导致 Siri 不退回帐单。您还需要取消对响应的帐单分配的注释。

一开始我在 Bills 功能方面也遇到了一些问题,但看起来大多数 bug 都已在 iOS 10.3 beta 4 中修复(尽管 SearchForBills UI 不是那么好)。

关于ios - 诗丽吉不退还账单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42563589/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com