doorbell / ios-sdk

The Doorbell iOS SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash if completion block is nil

reydanro opened this issue · comments

If I present the feedback dialog with a nil completion block, the sdk will crash in the [Doorbell finish] method when calling self.block(nil, NO).

Please note that I am using the sdk in a Swift project.

Thanks for reporting! Will try and have a look at this!

Didn't even know you can use it in a Swift project, would definitely love to hear more about that!

I hot-fixed the bug by testing if self.block is not nil before calling it.
PS: On the swift matter, I commented on the other ticket.

Thanks for debugging this! I'll have a look and see if I can make that code to behave well for ObjC and Swift!