algolia / voice-overlay-ios

🗣 An overlay that gets your user’s voice permission and input as text in a customizable UI
https://alg.li/voice
MIT License
544 stars 62 forks source link

Crash when dismissed #16

Closed ahmadmssm closed 5 years ago

ahmadmssm commented 5 years ago

In VoiceOverlayController -> showRecordingScreen -> line number 112, app crash due to trying to set a de-allocated object, i fixed it by replacing un-owned with weak and making self optional -. self?, So please fix it.

spinach commented 5 years ago

Hello,

This is a similar issue to #4 I think. It should be weak as a safety check, but you're not supposed to get this error if you implement the VoiceOverlayController correctly on your end (see #4). Also feel free to send a PR for that, will gladly merge!

ahmadmssm commented 5 years ago

@spinach thanks for that, it works. One more thing, could you add the following function to allow dismissing the voice overlay view ?!

public func dismiss() {
        self.inputViewController?.dismiss(animated: true, completion: nil)
    }