1

I have an optional value, and I want to add an assert if the value is nil. So, I want to do something like:

if let val = val {
    ...
} else {
    assertionFailure("No fields for key \(my dictionary key)")
}

My question is, will the assertionFailureabove result in a crash in my production app?

Paulo Mattos
  • 17,605
  • 10
  • 69
  • 79
Evgeniy Kleban
  • 6,532
  • 12
  • 46
  • 99

0 Answers0