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
  • 18,845
  • 10
  • 77
  • 85
Evgeniy Kleban
  • 6,794
  • 13
  • 54
  • 107

0 Answers0