Open mattyohe opened 9 years ago
Had an old version of your code in our app and there was a crasher due to over-removing the sessionVolumeKeyPath in dealloc. I'm not sure what scenario led to the observer not properly being added.
I would recommend wrapping this line: https://github.com/jpsim/JPSVolumeButtonHandler/blob/master/JPSVolumeButtonHandler/JPSVolumeButtonHandler.m#L47
in an empty @try so that this no longer crashes in odd scenarios.
hey @mattyohe did this ever get resolved for you?
@underscoretang Sure, I just did exactly what I said in the comment above. Is that not clear? Let me know.
Had an old version of your code in our app and there was a crasher due to over-removing the sessionVolumeKeyPath in dealloc. I'm not sure what scenario led to the observer not properly being added.
I would recommend wrapping this line: https://github.com/jpsim/JPSVolumeButtonHandler/blob/master/JPSVolumeButtonHandler/JPSVolumeButtonHandler.m#L47
in an empty @try so that this no longer crashes in odd scenarios.