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 assertionFailure
above result in a crash in my production app?