Retroarch freezes in game or menu randomly ios

I’ve been using 1.6.8 version of retroarch and every once in a while it freezes weather I’m in game or menu. I’m using iOS version 10.0.2 and controllers for all with a PS4 controller it’s is jail broken with yalu102. My iOS has to be shutdown compleatly then jail broken with yalu102 then I can run the game with no problems without freezing. But when I open and close it again after a while of playing it freezes.