I had seen that yesterday, but hadn't commited yet, but I think the condition should be if data == nil { right?! Because that's what causes the crash, so if for some weird reason response is not nil but data is still nil it wouldn't crash. Does it make sense or sounds like an impossible scenario?
Yeah I think your right. I took a look at a few other examples. I've changed it to check data and that there is no error in the response now. Let me know what you think.
I had seen that yesterday, but hadn't commited yet, but I think the condition should be
if data == nil {
right?! Because that's what causes the crash, so if for some weird reasonresponse
is notnil
butdata
is stillnil
it wouldn't crash. Does it make sense or sounds like an impossible scenario?