Hello again eveybody,
I have another problem on my view. It is about 200 lines long. I have the same problem each time I write " guard let billId = bill.id else {"
The problem is the following: Initializer for conditional binding must have Optional type, not 'String'
Here's some examples where we find this line:
func updatePaymentDateForBill(bill: Bill, paymentDate: Date) {
guard let userID = Auth.auth().currentUser?.uid else { return }
guard let billId = bill.id else {
print("❌ ID de facture manquant.")
return
}
func markBillAsUnpaid(bill: Bill) {
guard let userID = Auth.auth().currentUser?.uid else { return }
guard let billId = bill.id else {
print("❌ ID de facture manquant.")
return
}
If you find the solution you are my God
All the best,