One thing you could try would be to keep a reference to the discovered peripheral as a property on your delegate. That way, the peripheral object won't be garbage-collected prematurely (this is basically a workaround, the crash shouldn't happen).
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.